harvesthealth commited on
Commit
d9a7eda
·
verified ·
1 Parent(s): 52515c3

Add: Documentation for build fix

Browse files

Added README.md explaining the changes made to fix the Docker build issue with module replacement

Files changed (1) hide show
  1. README.md +32 -1153
README.md CHANGED
@@ -1,1169 +1,48 @@
1
- ---
2
- title: GitHub MCP Server
3
- emoji: 🐙
4
- colorFrom: blue
5
- colorTo: green
6
- sdk: docker
7
- pinned: false
8
- ---
9
 
10
- # GitHub MCP Server
11
 
12
- The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and PRs, analyze code, and automate workflows. All through natural language interactions.
13
 
14
- ### Use Cases
15
-
16
- - Repository Management: Browse and query code, search files, analyze commits, and understand project structure across any repository you have access to.
17
- - Issue & PR Automation: Create, update, and manage issues and pull requests. Let AI help triage bugs, review code changes, and maintain project boards.
18
- - CI/CD & Workflow Intelligence: Monitor GitHub Actions workflow runs, analyze build failures, manage releases, and get insights into your development pipeline.
19
- - Code Analysis: Examine security findings, review Dependabot alerts, understand code patterns, and get comprehensive insights into your codebase.
20
- - Team Collaboration: Access discussions, manage notifications, analyze team activity, and streamline processes for your team.
21
-
22
- Built for developers who want to connect their AI tools to GitHub context and capabilities, from simple natural language queries to complex multi-step agent workflows.
23
-
24
- ---
25
-
26
- ## Remote GitHub MCP Server
27
-
28
- [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2F%22%7D) [![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2F%22%7D&quality=insiders)
29
-
30
- The remote GitHub MCP Server is hosted by GitHub and provides the easiest method for getting up and running. If your MCP host does not support remote MCP servers, don't worry! You can use the [local version of the GitHub MCP Server](https://github.com/github/github-mcp-server?tab=readme-ov-file#local-github-mcp-server) instead.
31
-
32
- ### Prerequisites
33
-
34
- 1. A compatible MCP host with remote server support (VS Code 1.101+, Claude Desktop, Cursor, Windsurf, etc.)
35
- 2. Any applicable [policies enabled](https://github.com/github/github-mcp-server/blob/main/docs/policies-and-governance.md)
36
-
37
- ### Install in VS Code
38
-
39
- For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start. Make sure you're using [VS Code 1.101](https://code.visualstudio.com/updates/v1_101) or [later](https://code.visualstudio.com/updates) for remote MCP and OAuth support.
40
-
41
- Alternatively, to manually configure VS Code, choose the appropriate JSON block from the examples below and add it to your host configuration:
42
-
43
- <table>
44
- <tr><th>Using OAuth</th><th>Using a GitHub PAT</th></tr>
45
- <tr><th align=left colspan=2>VS Code (version 1.101 or greater)</th></tr>
46
- <tr valign=top>
47
- <td>
48
-
49
- ```json
50
- {
51
- "servers": {
52
- "github": {
53
- "type": "http",
54
- "url": "https://api.githubcopilot.com/mcp/"
55
- }
56
- }
57
- }
58
- ```
59
-
60
- </td>
61
- <td>
62
-
63
- ```json
64
- {
65
- "servers": {
66
- "github": {
67
- "type": "http",
68
- "url": "https://api.githubcopilot.com/mcp/",
69
- "headers": {
70
- "Authorization": "Bearer ${input:github_mcp_pat}"
71
- }
72
- }
73
- },
74
- "inputs": [
75
- {
76
- "type": "promptString",
77
- "id": "github_mcp_pat",
78
- "description": "GitHub Personal Access Token",
79
- "password": true
80
- }
81
- ]
82
- }
83
- ```
84
-
85
- </td>
86
- </tr>
87
- </table>
88
-
89
- ### Install in other MCP hosts
90
- - **[GitHub Copilot in other IDEs](/docs/installation-guides/install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
91
- - **[Claude Applications](/docs/installation-guides/install-claude.md)** - Installation guide for Claude Web, Claude Desktop and Claude Code CLI
92
- - **[Cursor](/docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
93
- - **[Windsurf](/docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE
94
-
95
- > **Note:** Each MCP host application needs to configure a GitHub App or OAuth App to support remote access via OAuth. Any host application that supports remote MCP servers should support the remote GitHub server with PAT authentication. Configuration details and support levels vary by host. Make sure to refer to the host application's documentation for more info.
96
-
97
- > ⚠️ **Public Preview Status:** The **remote** GitHub MCP Server is currently in Public Preview. During preview, access may be gated depending on authentication type and surface:
98
- > - OAuth: Subject to GitHub Copilot Editor Preview Policy until GA
99
- > - PAT: Controlled via your organization's PAT policies
100
- > - MCP Servers in Copilot policy: Enables/disables access to all MCP servers in VS Code, with other Copilot editors migrating to this policy in the coming months.
101
-
102
- ### Configuration
103
- See [Remote Server Documentation](/docs/remote-server.md) on how to pass additional configuration settings to the remote GitHub MCP Server.
104
-
105
- ---
106
-
107
- ## Local GitHub MCP Server
108
-
109
- [![Install with Docker in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=github&inputs=%5B%7B%22id%22%3A%22github_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22GitHub%20Personal%20Access%20Token%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22-e%22%2C%22GITHUB_PERSONAL_ACCESS_TOKEN%22%2C%22ghcr.io%2Fgithub%2Fgithub-mcp-server%22%5D%2C%22env%22%3A%7B%22GITHUB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agithub_token%7D%22%7D%7D) [![Install with Docker in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=github&inputs=%5B%7B%22id%22%3A%22github_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22GitHub%20Personal%20Access%20Token%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22-e%22%2C%22GITHUB_PERSONAL_ACCESS_TOKEN%22%2C%22ghcr.io%2Fgithub%2Fgithub-mcp-server%22%5D%2C%22env%22%3A%7B%22GITHUB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agithub_token%7D%22%7D%7D&quality=insiders)
110
-
111
- ### Prerequisites
112
-
113
- 1. To run the server in a container, you will need to have [Docker](https://www.docker.com/) installed.
114
- 2. Once Docker is installed, you will also need to ensure Docker is running. The image is public; if you get errors on pull, you may have an expired token and need to `docker logout ghcr.io`.
115
- 3. Lastly you will need to [Create a GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new).
116
- The MCP server can use many of the GitHub APIs, so enable the permissions that you feel comfortable granting your AI tools (to learn more about access tokens, please check out the [documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)).
117
-
118
- <details><summary><b>Handling PATs Securely</b></summary>
119
-
120
- ### Environment Variables (Recommended)
121
- To keep your GitHub PAT secure and reusable across different MCP hosts:
122
-
123
- 1. **Store your PAT in environment variables**
124
- ```bash
125
- export GITHUB_PAT=your_token_here
126
- ```
127
- Or create a `.env` file:
128
- ```env
129
- GITHUB_PAT=your_token_here
130
- ```
131
-
132
- 2. **Protect your `.env` file**
133
- ```bash
134
- # Add to .gitignore to prevent accidental commits
135
- echo ".env" >> .gitignore
136
- ```
137
-
138
- 3. **Reference the token in configurations**
139
- ```bash
140
- # CLI usage
141
- claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT
142
-
143
- # In config files (where supported)
144
- "env": {
145
- "GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
146
- }
147
- ```
148
-
149
- > **Note**: Environment variable support varies by host app and IDE. Some applications (like Windsurf) require hardcoded tokens in config files.
150
-
151
- ### Token Security Best Practices
152
-
153
- - **Minimum scopes**: Only grant necessary permissions
154
- - `repo` - Repository operations
155
- - `read:packages` - Docker image access
156
- - `read:org` - Organization team access
157
- - **Separate tokens**: Use different PATs for different projects/environments
158
- - **Regular rotation**: Update tokens periodically
159
- - **Never commit**: Keep tokens out of version control
160
- - **File permissions**: Restrict access to config files containing tokens
161
- ```bash
162
- chmod 600 ~/.your-app/config.json
163
- ```
164
-
165
- </details>
166
-
167
- ## Installation
168
-
169
- ### Install in GitHub Copilot on VS Code
170
-
171
- For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.
172
-
173
- More about using MCP server tools in VS Code's [agent mode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
174
-
175
- Install in GitHub Copilot on other IDEs (JetBrains, Visual Studio, Eclipse, etc.)
176
-
177
- Add the following JSON block to your IDE's MCP settings.
178
-
179
- ```json
180
- {
181
- "mcp": {
182
- "inputs": [
183
- {
184
- "type": "promptString",
185
- "id": "github_token",
186
- "description": "GitHub Personal Access Token",
187
- "password": true
188
- }
189
- ],
190
- "servers": {
191
- "github": {
192
- "command": "docker",
193
- "args": [
194
- "run",
195
- "-i",
196
- "--rm",
197
- "-e",
198
- "GITHUB_PERSONAL_ACCESS_TOKEN",
199
- "ghcr.io/github/github-mcp-server"
200
- ],
201
- "env": {
202
- "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
203
- }
204
- }
205
- }
206
- }
207
- }
208
- ```
209
-
210
- Optionally, you can add a similar example (i.e. without the mcp key) to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with other host applications that accept the same format.
211
-
212
- <details>
213
- <summary><b>Example JSON block without the MCP key included</b></summary>
214
- <br>
215
-
216
- ```json
217
- {
218
- "inputs": [
219
- {
220
- "type": "promptString",
221
- "id": "github_token",
222
- "description": "GitHub Personal Access Token",
223
- "password": true
224
- }
225
- ],
226
- "servers": {
227
- "github": {
228
- "command": "docker",
229
- "args": [
230
- "run",
231
- "-i",
232
- "--rm",
233
- "-e",
234
- "GITHUB_PERSONAL_ACCESS_TOKEN",
235
- "ghcr.io/github/github-mcp-server"
236
- ],
237
- "env": {
238
- "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
239
- }
240
- }
241
- }
242
- }
243
  ```
244
-
245
- </details>
246
-
247
- ### Install in Other MCP Hosts
248
-
249
- For other MCP host applications, please refer to our installation guides:
250
-
251
- - **[GitHub Copilot in other IDEs](/docs/installation-guides/install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
252
- - **[Claude Code & Claude Desktop](docs/installation-guides/install-claude.md)** - Installation guide for Claude Code and Claude Desktop
253
- - **[Cursor](docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
254
- - **[Windsurf](docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE
255
-
256
- For a complete overview of all installation options, see our **[Installation Guides Index](docs/installation-guides)**.
257
-
258
- > **Note:** Any host application that supports local MCP servers should be able to access the local GitHub MCP server. However, the specific configuration process, syntax and stability of the integration will vary by host application. While many may follow a similar format to the examples above, this is not guaranteed. Please refer to your host application's documentation for the correct MCP configuration syntax and setup process.
259
-
260
- ### Build from source
261
-
262
- If you don't have Docker, you can use `go build` to build the binary in the
263
- `cmd/github-mcp-server` directory, and use the `github-mcp-server stdio` command with the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to your token. To specify the output location of the build, use the `-o` flag. You should configure your server to use the built executable as its `command`. For example:
264
-
265
- ```JSON
266
- {
267
- "mcp": {
268
- "servers": {
269
- "github": {
270
- "command": "/path/to/github-mcp-server",
271
- "args": ["stdio"],
272
- "env": {
273
- "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
274
- }
275
- }
276
- }
277
- }
278
- }
279
  ```
280
 
281
- ## Tool Configuration
282
-
283
- The GitHub MCP Server supports enabling or disabling specific groups of functionalities via the `--toolsets` flag. This allows you to control which GitHub API capabilities are available to your AI tools. Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size.
284
-
285
- _Toolsets are not limited to Tools. Relevant MCP Resources and Prompts are also included where applicable._
286
-
287
- ### Available Toolsets
288
-
289
- The following sets of tools are available (all are on by default):
290
-
291
- <!-- START AUTOMATED TOOLSETS -->
292
- | Toolset | Description |
293
- | ----------------------- | ------------------------------------------------------------- |
294
- | `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |
295
- | `actions` | GitHub Actions workflows and CI/CD operations |
296
- | `code_security` | Code security related tools, such as GitHub Code Scanning |
297
- | `dependabot` | Dependabot tools |
298
- | `discussions` | GitHub Discussions related tools |
299
- | `experiments` | Experimental features that are not considered stable yet |
300
- | `gists` | GitHub Gist related tools |
301
- | `issues` | GitHub Issues related tools |
302
- | `notifications` | GitHub Notifications related tools |
303
- | `orgs` | GitHub Organization related tools |
304
- | `pull_requests` | GitHub Pull Request related tools |
305
- | `repos` | GitHub Repository related tools |
306
- | `secret_protection` | Secret protection related tools, such as GitHub Secret Scanning |
307
- | `security_advisories` | Security advisories related tools |
308
- | `users` | GitHub User related tools |
309
- <!-- END AUTOMATED TOOLSETS -->
310
-
311
- ## Tools
312
-
313
-
314
- <!-- START AUTOMATED TOOLS -->
315
- <details>
316
-
317
- <summary>Actions</summary>
318
-
319
- - **cancel_workflow_run** - Cancel workflow run
320
- - `owner`: Repository owner (string, required)
321
- - `repo`: Repository name (string, required)
322
- - `run_id`: The unique identifier of the workflow run (number, required)
323
-
324
- - **delete_workflow_run_logs** - Delete workflow logs
325
- - `owner`: Repository owner (string, required)
326
- - `repo`: Repository name (string, required)
327
- - `run_id`: The unique identifier of the workflow run (number, required)
328
-
329
- - **download_workflow_run_artifact** - Download workflow artifact
330
- - `artifact_id`: The unique identifier of the artifact (number, required)
331
- - `owner`: Repository owner (string, required)
332
- - `repo`: Repository name (string, required)
333
-
334
- - **get_job_logs** - Get job logs
335
- - `failed_only`: When true, gets logs for all failed jobs in run_id (boolean, optional)
336
- - `job_id`: The unique identifier of the workflow job (required for single job logs) (number, optional)
337
- - `owner`: Repository owner (string, required)
338
- - `repo`: Repository name (string, required)
339
- - `return_content`: Returns actual log content instead of URLs (boolean, optional)
340
- - `run_id`: Workflow run ID (required when using failed_only) (number, optional)
341
- - `tail_lines`: Number of lines to return from the end of the log (number, optional)
342
-
343
- - **get_workflow_run** - Get workflow run
344
- - `owner`: Repository owner (string, required)
345
- - `repo`: Repository name (string, required)
346
- - `run_id`: The unique identifier of the workflow run (number, required)
347
-
348
- - **get_workflow_run_logs** - Get workflow run logs
349
- - `owner`: Repository owner (string, required)
350
- - `repo`: Repository name (string, required)
351
- - `run_id`: The unique identifier of the workflow run (number, required)
352
-
353
- - **get_workflow_run_usage** - Get workflow usage
354
- - `owner`: Repository owner (string, required)
355
- - `repo`: Repository name (string, required)
356
- - `run_id`: The unique identifier of the workflow run (number, required)
357
-
358
- - **list_workflow_jobs** - List workflow jobs
359
- - `filter`: Filters jobs by their completed_at timestamp (string, optional)
360
- - `owner`: Repository owner (string, required)
361
- - `page`: Page number for pagination (min 1) (number, optional)
362
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
363
- - `repo`: Repository name (string, required)
364
- - `run_id`: The unique identifier of the workflow run (number, required)
365
-
366
- - **list_workflow_run_artifacts** - List workflow artifacts
367
- - `owner`: Repository owner (string, required)
368
- - `page`: Page number for pagination (min 1) (number, optional)
369
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
370
- - `repo`: Repository name (string, required)
371
- - `run_id`: The unique identifier of the workflow run (number, required)
372
-
373
- - **list_workflow_runs** - List workflow runs
374
- - `actor`: Returns someone's workflow runs. Use the login for the user who created the workflow run. (string, optional)
375
- - `branch`: Returns workflow runs associated with a branch. Use the name of the branch. (string, optional)
376
- - `event`: Returns workflow runs for a specific event type (string, optional)
377
- - `owner`: Repository owner (string, required)
378
- - `page`: Page number for pagination (min 1) (number, optional)
379
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
380
- - `repo`: Repository name (string, required)
381
- - `status`: Returns workflow runs with the check run status (string, optional)
382
- - `workflow_id`: The workflow ID or workflow file name (string, required)
383
-
384
- - **list_workflows** - List workflows
385
- - `owner`: Repository owner (string, required)
386
- - `page`: Page number for pagination (min 1) (number, optional)
387
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
388
- - `repo`: Repository name (string, required)
389
-
390
- - **rerun_failed_jobs** - Rerun failed jobs
391
- - `owner`: Repository owner (string, required)
392
- - `repo`: Repository name (string, required)
393
- - `run_id`: The unique identifier of the workflow run (number, required)
394
-
395
- - **rerun_workflow_run** - Rerun workflow run
396
- - `owner`: Repository owner (string, required)
397
- - `repo`: Repository name (string, required)
398
- - `run_id`: The unique identifier of the workflow run (number, required)
399
-
400
- - **run_workflow** - Run workflow
401
- - `inputs`: Inputs the workflow accepts (object, optional)
402
- - `owner`: Repository owner (string, required)
403
- - `ref`: The git reference for the workflow. The reference can be a branch or tag name. (string, required)
404
- - `repo`: Repository name (string, required)
405
- - `workflow_id`: The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml) (string, required)
406
-
407
- </details>
408
-
409
- <details>
410
-
411
- <summary>Code Security</summary>
412
-
413
- - **get_code_scanning_alert** - Get code scanning alert
414
- - `alertNumber`: The number of the alert. (number, required)
415
- - `owner`: The owner of the repository. (string, required)
416
- - `repo`: The name of the repository. (string, required)
417
-
418
- - **list_code_scanning_alerts** - List code scanning alerts
419
- - `owner`: The owner of the repository. (string, required)
420
- - `ref`: The Git reference for the results you want to list. (string, optional)
421
- - `repo`: The name of the repository. (string, required)
422
- - `severity`: Filter code scanning alerts by severity (string, optional)
423
- - `state`: Filter code scanning alerts by state. Defaults to open (string, optional)
424
- - `tool_name`: The name of the tool used for code scanning. (string, optional)
425
-
426
- </details>
427
-
428
- <details>
429
-
430
- <summary>Context</summary>
431
-
432
- - **get_me** - Get my user profile
433
- - No parameters required
434
-
435
- - **get_team_members** - Get team members
436
- - `org`: Organization login (owner) that contains the team. (string, required)
437
- - `team_slug`: Team slug (string, required)
438
-
439
- - **get_teams** - Get teams
440
- - `user`: Username to get teams for. If not provided, uses the authenticated user. (string, optional)
441
-
442
- </details>
443
-
444
- <details>
445
-
446
- <summary>Dependabot</summary>
447
-
448
- - **get_dependabot_alert** - Get dependabot alert
449
- - `alertNumber`: The number of the alert. (number, required)
450
- - `owner`: The owner of the repository. (string, required)
451
- - `repo`: The name of the repository. (string, required)
452
-
453
- - **list_dependabot_alerts** - List dependabot alerts
454
- - `owner`: The owner of the repository. (string, required)
455
- - `repo`: The name of the repository. (string, required)
456
- - `severity`: Filter dependabot alerts by severity (string, optional)
457
- - `state`: Filter dependabot alerts by state. Defaults to open (string, optional)
458
-
459
- </details>
460
-
461
- <details>
462
-
463
- <summary>Discussions</summary>
464
-
465
- - **get_discussion** - Get discussion
466
- - `discussionNumber`: Discussion Number (number, required)
467
- - `owner`: Repository owner (string, required)
468
- - `repo`: Repository name (string, required)
469
-
470
- - **get_discussion_comments** - Get discussion comments
471
- - `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
472
- - `discussionNumber`: Discussion Number (number, required)
473
- - `owner`: Repository owner (string, required)
474
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
475
- - `repo`: Repository name (string, required)
476
-
477
- - **list_discussion_categories** - List discussion categories
478
- - `owner`: Repository owner (string, required)
479
- - `repo`: Repository name. If not provided, discussion categories will be queried at the organisation level. (string, optional)
480
-
481
- - **list_discussions** - List discussions
482
- - `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
483
- - `category`: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)
484
- - `direction`: Order direction. (string, optional)
485
- - `orderBy`: Order discussions by field. If provided, the 'direction' also needs to be provided. (string, optional)
486
- - `owner`: Repository owner (string, required)
487
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
488
- - `repo`: Repository name. If not provided, discussions will be queried at the organisation level. (string, optional)
489
-
490
- </details>
491
-
492
- <details>
493
-
494
- <summary>Gists</summary>
495
-
496
- - **create_gist** - Create Gist
497
- - `content`: Content for simple single-file gist creation (string, required)
498
- - `description`: Description of the gist (string, optional)
499
- - `filename`: Filename for simple single-file gist creation (string, required)
500
- - `public`: Whether the gist is public (boolean, optional)
501
-
502
- - **list_gists** - List Gists
503
- - `page`: Page number for pagination (min 1) (number, optional)
504
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
505
- - `since`: Only gists updated after this time (ISO 8601 timestamp) (string, optional)
506
- - `username`: GitHub username (omit for authenticated user's gists) (string, optional)
507
-
508
- - **update_gist** - Update Gist
509
- - `content`: Content for the file (string, required)
510
- - `description`: Updated description of the gist (string, optional)
511
- - `filename`: Filename to update or create (string, required)
512
- - `gist_id`: ID of the gist to update (string, required)
513
-
514
- </details>
515
-
516
- <details>
517
-
518
- <summary>Issues</summary>
519
-
520
- - **add_issue_comment** - Add comment to issue
521
- - `body`: Comment content (string, required)
522
- - `issue_number`: Issue number to comment on (number, required)
523
- - `owner`: Repository owner (string, required)
524
- - `repo`: Repository name (string, required)
525
-
526
- - **add_sub_issue** - Add sub-issue
527
- - `issue_number`: The number of the parent issue (number, required)
528
- - `owner`: Repository owner (string, required)
529
- - `replace_parent`: When true, replaces the sub-issue's current parent issue (boolean, optional)
530
- - `repo`: Repository name (string, required)
531
- - `sub_issue_id`: The ID of the sub-issue to add. ID is not the same as issue number (number, required)
532
-
533
- - **assign_copilot_to_issue** - Assign Copilot to issue
534
- - `issueNumber`: Issue number (number, required)
535
- - `owner`: Repository owner (string, required)
536
- - `repo`: Repository name (string, required)
537
-
538
- - **create_issue** - Open new issue
539
- - `assignees`: Usernames to assign to this issue (string[], optional)
540
- - `body`: Issue body content (string, optional)
541
- - `labels`: Labels to apply to this issue (string[], optional)
542
- - `milestone`: Milestone number (number, optional)
543
- - `owner`: Repository owner (string, required)
544
- - `repo`: Repository name (string, required)
545
- - `title`: Issue title (string, required)
546
- - `type`: Type of this issue (string, optional)
547
-
548
- - **get_issue** - Get issue details
549
- - `issue_number`: The number of the issue (number, required)
550
- - `owner`: The owner of the repository (string, required)
551
- - `repo`: The name of the repository (string, required)
552
-
553
- - **get_issue_comments** - Get issue comments
554
- - `issue_number`: Issue number (number, required)
555
- - `owner`: Repository owner (string, required)
556
- - `page`: Page number for pagination (min 1) (number, optional)
557
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
558
- - `repo`: Repository name (string, required)
559
-
560
- - **list_issue_types** - List available issue types
561
- - `owner`: The organization owner of the repository (string, required)
562
-
563
- - **list_issues** - List issues
564
- - `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
565
- - `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
566
- - `labels`: Filter by labels (string[], optional)
567
- - `orderBy`: Order issues by field. If provided, the 'direction' also needs to be provided. (string, optional)
568
- - `owner`: Repository owner (string, required)
569
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
570
- - `repo`: Repository name (string, required)
571
- - `since`: Filter by date (ISO 8601 timestamp) (string, optional)
572
- - `state`: Filter by state, by default both open and closed issues are returned when not provided (string, optional)
573
-
574
- - **list_sub_issues** - List sub-issues
575
- - `issue_number`: Issue number (number, required)
576
- - `owner`: Repository owner (string, required)
577
- - `page`: Page number for pagination (default: 1) (number, optional)
578
- - `per_page`: Number of results per page (max 100, default: 30) (number, optional)
579
- - `repo`: Repository name (string, required)
580
-
581
- - **remove_sub_issue** - Remove sub-issue
582
- - `issue_number`: The number of the parent issue (number, required)
583
- - `owner`: Repository owner (string, required)
584
- - `repo`: Repository name (string, required)
585
- - `sub_issue_id`: The ID of the sub-issue to remove. ID is not the same as issue number (number, required)
586
-
587
- - **reprioritize_sub_issue** - Reprioritize sub-issue
588
- - `after_id`: The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) (number, optional)
589
- - `before_id`: The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) (number, optional)
590
- - `issue_number`: The number of the parent issue (number, required)
591
- - `owner`: Repository owner (string, required)
592
- - `repo`: Repository name (string, required)
593
- - `sub_issue_id`: The ID of the sub-issue to reprioritize. ID is not the same as issue number (number, required)
594
-
595
- - **search_issues** - Search issues
596
- - `order`: Sort order (string, optional)
597
- - `owner`: Optional repository owner. If provided with repo, only issues for this repository are listed. (string, optional)
598
- - `page`: Page number for pagination (min 1) (number, optional)
599
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
600
- - `query`: Search query using GitHub issues search syntax (string, required)
601
- - `repo`: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
602
- - `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
603
-
604
- - **update_issue** - Edit issue
605
- - `assignees`: New assignees (string[], optional)
606
- - `body`: New description (string, optional)
607
- - `issue_number`: Issue number to update (number, required)
608
- - `labels`: New labels (string[], optional)
609
- - `milestone`: New milestone number (number, optional)
610
- - `owner`: Repository owner (string, required)
611
- - `repo`: Repository name (string, required)
612
- - `state`: New state (string, optional)
613
- - `title`: New title (string, optional)
614
- - `type`: New issue type (string, optional)
615
-
616
- </details>
617
-
618
- <details>
619
-
620
- <summary>Notifications</summary>
621
-
622
- - **dismiss_notification** - Dismiss notification
623
- - `state`: The new state of the notification (read/done) (string, optional)
624
- - `threadID`: The ID of the notification thread (string, required)
625
-
626
- - **get_notification_details** - Get notification details
627
- - `notificationID`: The ID of the notification (string, required)
628
-
629
- - **list_notifications** - List notifications
630
- - `before`: Only show notifications updated before the given time (ISO 8601 format) (string, optional)
631
- - `filter`: Filter notifications to, use default unless specified. Read notifications are ones that have already been acknowledged by the user. Participating notifications are those that the user is directly involved in, such as issues or pull requests they have commented on or created. (string, optional)
632
- - `owner`: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
633
- - `page`: Page number for pagination (min 1) (number, optional)
634
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
635
- - `repo`: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
636
- - `since`: Only show notifications updated after the given time (ISO 8601 format) (string, optional)
637
-
638
- - **manage_notification_subscription** - Manage notification subscription
639
- - `action`: Action to perform: ignore, watch, or delete the notification subscription. (string, required)
640
- - `notificationID`: The ID of the notification thread. (string, required)
641
-
642
- - **manage_repository_notification_subscription** - Manage repository notification subscription
643
- - `action`: Action to perform: ignore, watch, or delete the repository notification subscription. (string, required)
644
- - `owner`: The account owner of the repository. (string, required)
645
- - `repo`: The name of the repository. (string, required)
646
-
647
- - **mark_all_notifications_read** - Mark all notifications as read
648
- - `lastReadAt`: Describes the last point that notifications were checked (optional). Default: Now (string, optional)
649
- - `owner`: Optional repository owner. If provided with repo, only notifications for this repository are marked as read. (string, optional)
650
- - `repo`: Optional repository name. If provided with owner, only notifications for this repository are marked as read. (string, optional)
651
-
652
- </details>
653
-
654
- <details>
655
-
656
- <summary>Organizations</summary>
657
-
658
- - **search_orgs** - Search organizations
659
- - `order`: Sort order (string, optional)
660
- - `page`: Page number for pagination (min 1) (number, optional)
661
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
662
- - `query`: Organization search query. Examples: 'microsoft', 'location:california', 'created:>=2025-01-01'. Search is automatically scoped to type:org. (string, required)
663
- - `sort`: Sort field by category (string, optional)
664
-
665
- </details>
666
-
667
- <details>
668
-
669
- <summary>Pull Requests</summary>
670
-
671
- - **add_comment_to_pending_review** - Add review comment to the requester's latest pending pull request review
672
- - `body`: The text of the review comment (string, required)
673
- - `line`: The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range (number, optional)
674
- - `owner`: Repository owner (string, required)
675
- - `path`: The relative path to the file that necessitates a comment (string, required)
676
- - `pullNumber`: Pull request number (number, required)
677
- - `repo`: Repository name (string, required)
678
- - `side`: The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state (string, optional)
679
- - `startLine`: For multi-line comments, the first line of the range that the comment applies to (number, optional)
680
- - `startSide`: For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state (string, optional)
681
- - `subjectType`: The level at which the comment is targeted (string, required)
682
-
683
- - **create_and_submit_pull_request_review** - Create and submit a pull request review without comments
684
- - `body`: Review comment text (string, required)
685
- - `commitID`: SHA of commit to review (string, optional)
686
- - `event`: Review action to perform (string, required)
687
- - `owner`: Repository owner (string, required)
688
- - `pullNumber`: Pull request number (number, required)
689
- - `repo`: Repository name (string, required)
690
-
691
- - **create_pending_pull_request_review** - Create pending pull request review
692
- - `commitID`: SHA of commit to review (string, optional)
693
- - `owner`: Repository owner (string, required)
694
- - `pullNumber`: Pull request number (number, required)
695
- - `repo`: Repository name (string, required)
696
-
697
- - **create_pull_request** - Open new pull request
698
- - `base`: Branch to merge into (string, required)
699
- - `body`: PR description (string, optional)
700
- - `draft`: Create as draft PR (boolean, optional)
701
- - `head`: Branch containing changes (string, required)
702
- - `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
703
- - `owner`: Repository owner (string, required)
704
- - `repo`: Repository name (string, required)
705
- - `title`: PR title (string, required)
706
-
707
- - **delete_pending_pull_request_review** - Delete the requester's latest pending pull request review
708
- - `owner`: Repository owner (string, required)
709
- - `pullNumber`: Pull request number (number, required)
710
- - `repo`: Repository name (string, required)
711
-
712
- - **get_pull_request** - Get pull request details
713
- - `owner`: Repository owner (string, required)
714
- - `pullNumber`: Pull request number (number, required)
715
- - `repo`: Repository name (string, required)
716
-
717
- - **get_pull_request_comments** - Get pull request comments
718
- - `owner`: Repository owner (string, required)
719
- - `pullNumber`: Pull request number (number, required)
720
- - `repo`: Repository name (string, required)
721
-
722
- - **get_pull_request_diff** - Get pull request diff
723
- - `owner`: Repository owner (string, required)
724
- - `pullNumber`: Pull request number (number, required)
725
- - `repo`: Repository name (string, required)
726
-
727
- - **get_pull_request_files** - Get pull request files
728
- - `owner`: Repository owner (string, required)
729
- - `page`: Page number for pagination (min 1) (number, optional)
730
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
731
- - `pullNumber`: Pull request number (number, required)
732
- - `repo`: Repository name (string, required)
733
-
734
- - **get_pull_request_reviews** - Get pull request reviews
735
- - `owner`: Repository owner (string, required)
736
- - `pullNumber`: Pull request number (number, required)
737
- - `repo`: Repository name (string, required)
738
-
739
- - **get_pull_request_status** - Get pull request status checks
740
- - `owner`: Repository owner (string, required)
741
- - `pullNumber`: Pull request number (number, required)
742
- - `repo`: Repository name (string, required)
743
-
744
- - **list_pull_requests** - List pull requests
745
- - `base`: Filter by base branch (string, optional)
746
- - `direction`: Sort direction (string, optional)
747
- - `head`: Filter by head user/org and branch (string, optional)
748
- - `owner`: Repository owner (string, required)
749
- - `page`: Page number for pagination (min 1) (number, optional)
750
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
751
- - `repo`: Repository name (string, required)
752
- - `sort`: Sort by (string, optional)
753
- - `state`: Filter by state (string, optional)
754
-
755
- - **merge_pull_request** - Merge pull request
756
- - `commit_message`: Extra detail for merge commit (string, optional)
757
- - `commit_title`: Title for merge commit (string, optional)
758
- - `merge_method`: Merge method (string, optional)
759
- - `owner`: Repository owner (string, required)
760
- - `pullNumber`: Pull request number (number, required)
761
- - `repo`: Repository name (string, required)
762
-
763
- - **request_copilot_review** - Request Copilot review
764
- - `owner`: Repository owner (string, required)
765
- - `pullNumber`: Pull request number (number, required)
766
- - `repo`: Repository name (string, required)
767
-
768
- - **search_pull_requests** - Search pull requests
769
- - `order`: Sort order (string, optional)
770
- - `owner`: Optional repository owner. If provided with repo, only pull requests for this repository are listed. (string, optional)
771
- - `page`: Page number for pagination (min 1) (number, optional)
772
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
773
- - `query`: Search query using GitHub pull request search syntax (string, required)
774
- - `repo`: Optional repository name. If provided with owner, only pull requests for this repository are listed. (string, optional)
775
- - `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
776
-
777
- - **submit_pending_pull_request_review** - Submit the requester's latest pending pull request review
778
- - `body`: The text of the review comment (string, optional)
779
- - `event`: The event to perform (string, required)
780
- - `owner`: Repository owner (string, required)
781
- - `pullNumber`: Pull request number (number, required)
782
- - `repo`: Repository name (string, required)
783
-
784
- - **update_pull_request** - Edit pull request
785
- - `base`: New base branch name (string, optional)
786
- - `body`: New description (string, optional)
787
- - `draft`: Mark pull request as draft (true) or ready for review (false) (boolean, optional)
788
- - `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
789
- - `owner`: Repository owner (string, required)
790
- - `pullNumber`: Pull request number to update (number, required)
791
- - `repo`: Repository name (string, required)
792
- - `reviewers`: GitHub usernames to request reviews from (string[], optional)
793
- - `state`: New state (string, optional)
794
- - `title`: New title (string, optional)
795
-
796
- - **update_pull_request_branch** - Update pull request branch
797
- - `expectedHeadSha`: The expected SHA of the pull request's HEAD ref (string, optional)
798
- - `owner`: Repository owner (string, required)
799
- - `pullNumber`: Pull request number (number, required)
800
- - `repo`: Repository name (string, required)
801
-
802
- </details>
803
-
804
- <details>
805
-
806
- <summary>Repositories</summary>
807
-
808
- - **create_branch** - Create branch
809
- - `branch`: Name for new branch (string, required)
810
- - `from_branch`: Source branch (defaults to repo default) (string, optional)
811
- - `owner`: Repository owner (string, required)
812
- - `repo`: Repository name (string, required)
813
-
814
- - **create_or_update_file** - Create or update file
815
- - `branch`: Branch to create/update the file in (string, required)
816
- - `content`: Content of the file (string, required)
817
- - `message`: Commit message (string, required)
818
- - `owner`: Repository owner (username or organization) (string, required)
819
- - `path`: Path where to create/update the file (string, required)
820
- - `repo`: Repository name (string, required)
821
- - `sha`: Required if updating an existing file. The blob SHA of the file being replaced. (string, optional)
822
-
823
- - **create_repository** - Create repository
824
- - `autoInit`: Initialize with README (boolean, optional)
825
- - `description`: Repository description (string, optional)
826
- - `name`: Repository name (string, required)
827
- - `private`: Whether repo should be private (boolean, optional)
828
-
829
- - **delete_file** - Delete file
830
- - `branch`: Branch to delete the file from (string, required)
831
- - `message`: Commit message (string, required)
832
- - `owner`: Repository owner (username or organization) (string, required)
833
- - `path`: Path to the file to delete (string, required)
834
- - `repo`: Repository name (string, required)
835
-
836
- - **fork_repository** - Fork repository
837
- - `organization`: Organization to fork to (string, optional)
838
- - `owner`: Repository owner (string, required)
839
- - `repo`: Repository name (string, required)
840
-
841
- - **get_commit** - Get commit details
842
- - `owner`: Repository owner (string, required)
843
- - `page`: Page number for pagination (min 1) (number, optional)
844
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
845
- - `repo`: Repository name (string, required)
846
- - `sha`: Commit SHA, branch name, or tag name (string, required)
847
-
848
- - **get_file_contents** - Get file or directory contents
849
- - `owner`: Repository owner (username or organization) (string, required)
850
- - `path`: Path to file/directory (directories must end with a slash '/') (string, optional)
851
- - `ref`: Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` (string, optional)
852
- - `repo`: Repository name (string, required)
853
- - `sha`: Accepts optional commit SHA. If specified, it will be used instead of ref (string, optional)
854
-
855
- - **get_latest_release** - Get latest release
856
- - `owner`: Repository owner (string, required)
857
- - `repo`: Repository name (string, required)
858
-
859
- - **get_release_by_tag** - Get a release by tag name
860
- - `owner`: Repository owner (string, required)
861
- - `repo`: Repository name (string, required)
862
- - `tag`: Tag name (e.g., 'v1.0.0') (string, required)
863
-
864
- - **get_tag** - Get tag details
865
- - `owner`: Repository owner (string, required)
866
- - `repo`: Repository name (string, required)
867
- - `tag`: Tag name (string, required)
868
-
869
- - **list_branches** - List branches
870
- - `owner`: Repository owner (string, required)
871
- - `page`: Page number for pagination (min 1) (number, optional)
872
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
873
- - `repo`: Repository name (string, required)
874
-
875
- - **list_commits** - List commits
876
- - `author`: Author username or email address to filter commits by (string, optional)
877
- - `owner`: Repository owner (string, required)
878
- - `page`: Page number for pagination (min 1) (number, optional)
879
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
880
- - `repo`: Repository name (string, required)
881
- - `sha`: Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)
882
-
883
- - **list_releases** - List releases
884
- - `owner`: Repository owner (string, required)
885
- - `page`: Page number for pagination (min 1) (number, optional)
886
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
887
- - `repo`: Repository name (string, required)
888
-
889
- - **list_tags** - List tags
890
- - `owner`: Repository owner (string, required)
891
- - `page`: Page number for pagination (min 1) (number, optional)
892
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
893
- - `repo`: Repository name (string, required)
894
-
895
- - **push_files** - Push files to repository
896
- - `branch`: Branch to push to (string, required)
897
- - `files`: Array of file objects to push, each object with path (string) and content (string) (object[], required)
898
- - `message`: Commit message (string, required)
899
- - `owner`: Repository owner (string, required)
900
- - `repo`: Repository name (string, required)
901
-
902
- - **search_code** - Search code
903
- - `order`: Sort order for results (string, optional)
904
- - `page`: Page number for pagination (min 1) (number, optional)
905
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
906
- - `query`: Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more. (string, required)
907
- - `sort`: Sort field ('indexed' only) (string, optional)
908
-
909
- - **search_repositories** - Search repositories
910
- - `page`: Page number for pagination (min 1) (number, optional)
911
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
912
- - `query`: Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. (string, required)
913
-
914
- </details>
915
-
916
- <details>
917
-
918
- <summary>Secret Protection</summary>
919
-
920
- - **get_secret_scanning_alert** - Get secret scanning alert
921
- - `alertNumber`: The number of the alert. (number, required)
922
- - `owner`: The owner of the repository. (string, required)
923
- - `repo`: The name of the repository. (string, required)
924
-
925
- - **list_secret_scanning_alerts** - List secret scanning alerts
926
- - `owner`: The owner of the repository. (string, required)
927
- - `repo`: The name of the repository. (string, required)
928
- - `resolution`: Filter by resolution (string, optional)
929
- - `secret_type`: A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. (string, optional)
930
- - `state`: Filter by state (string, optional)
931
-
932
- </details>
933
-
934
- <details>
935
-
936
- <summary>Security Advisories</summary>
937
-
938
- - **get_global_security_advisory** - Get a global security advisory
939
- - `ghsaId`: GitHub Security Advisory ID (format: GHSA-xxxx-xxxx-xxxx). (string, required)
940
-
941
- - **list_global_security_advisories** - List global security advisories
942
- - `affects`: Filter advisories by affected package or version (e.g. "package1,package2@1.0.0"). (string, optional)
943
- - `cveId`: Filter by CVE ID. (string, optional)
944
- - `cwes`: Filter by Common Weakness Enumeration IDs (e.g. ["79", "284", "22"]). (string[], optional)
945
- - `ecosystem`: Filter by package ecosystem. (string, optional)
946
- - `ghsaId`: Filter by GitHub Security Advisory ID (format: GHSA-xxxx-xxxx-xxxx). (string, optional)
947
- - `isWithdrawn`: Whether to only return withdrawn advisories. (boolean, optional)
948
- - `modified`: Filter by publish or update date or date range (ISO 8601 date or range). (string, optional)
949
- - `published`: Filter by publish date or date range (ISO 8601 date or range). (string, optional)
950
- - `severity`: Filter by severity. (string, optional)
951
- - `type`: Advisory type. (string, optional)
952
- - `updated`: Filter by update date or date range (ISO 8601 date or range). (string, optional)
953
-
954
- - **list_org_repository_security_advisories** - List org repository security advisories
955
- - `direction`: Sort direction. (string, optional)
956
- - `org`: The organization login. (string, required)
957
- - `sort`: Sort field. (string, optional)
958
- - `state`: Filter by advisory state. (string, optional)
959
-
960
- - **list_repository_security_advisories** - List repository security advisories
961
- - `direction`: Sort direction. (string, optional)
962
- - `owner`: The owner of the repository. (string, required)
963
- - `repo`: The name of the repository. (string, required)
964
- - `sort`: Sort field. (string, optional)
965
- - `state`: Filter by advisory state. (string, optional)
966
-
967
- </details>
968
-
969
- <details>
970
-
971
- <summary>Users</summary>
972
-
973
- - **search_users** - Search users
974
- - `order`: Sort order (string, optional)
975
- - `page`: Page number for pagination (min 1) (number, optional)
976
- - `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
977
- - `query`: User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user. (string, required)
978
- - `sort`: Sort users by number of followers or repositories, or when the person joined GitHub. (string, optional)
979
-
980
- </details>
981
- <!-- END AUTOMATED TOOLS -->
982
-
983
- ### Additional Tools in Remote Github MCP Server
984
-
985
- <details>
986
-
987
- <summary>Copilot coding agent</summary>
988
-
989
- - **create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
990
- - `owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
991
- - `repo`: Repository name. You can guess the repository name, but confirm it with the user before proceeding. (string, required)
992
- - `problem_statement`: Detailed description of the task to be performed (e.g., 'Implement a feature that does X', 'Fix bug Y', etc.) (string, required)
993
- - `title`: Title for the pull request that will be created (string, required)
994
- - `base_ref`: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch (string, optional)
995
-
996
- </details>
997
-
998
- #### Specifying Toolsets
999
-
1000
- To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:
1001
-
1002
- 1. **Using Command Line Argument**:
1003
-
1004
- ```bash
1005
- github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security
1006
- ```
1007
-
1008
- 2. **Using Environment Variable**:
1009
- ```bash
1010
- GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server
1011
- ```
1012
-
1013
- The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.
1014
-
1015
- ### Using Toolsets With Docker
1016
-
1017
- When using Docker, you can pass the toolsets as environment variables:
1018
-
1019
- ```bash
1020
- docker run -i --rm \
1021
- -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1022
- -e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security,experiments" \
1023
- ghcr.io/github/github-mcp-server
1024
- ```
1025
-
1026
- ### The "all" Toolset
1027
-
1028
- The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:
1029
-
1030
- ```bash
1031
- ./github-mcp-server --toolsets all
1032
- ```
1033
-
1034
- Or using the environment variable:
1035
-
1036
- ```bash
1037
- GITHUB_TOOLSETS="all" ./github-mcp-server
1038
- ```
1039
-
1040
- ## Dynamic Tool Discovery
1041
-
1042
- **Note**: This feature is currently in beta and may not be available in all environments. Please test it out and let us know if you encounter any issues.
1043
-
1044
- Instead of starting with all tools enabled, you can turn on dynamic toolset discovery. Dynamic toolsets allow the MCP host to list and enable toolsets in response to a user prompt. This should help to avoid situations where the model gets confused by the sheer number of tools available.
1045
-
1046
- ### Using Dynamic Tool Discovery
1047
-
1048
- When using the binary, you can pass the `--dynamic-toolsets` flag.
1049
-
1050
- ```bash
1051
- ./github-mcp-server --dynamic-toolsets
1052
- ```
1053
-
1054
- When using Docker, you can pass the toolsets as environment variables:
1055
-
1056
- ```bash
1057
- docker run -i --rm \
1058
- -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1059
- -e GITHUB_DYNAMIC_TOOLSETS=1 \
1060
- ghcr.io/github/github-mcp-server
1061
- ```
1062
-
1063
- ## Read-Only Mode
1064
-
1065
- To run the server in read-only mode, you can use the `--read-only` flag. This will only offer read-only tools, preventing any modifications to repositories, issues, pull requests, etc.
1066
-
1067
- ```bash
1068
- ./github-mcp-server --read-only
1069
- ```
1070
-
1071
- When using Docker, you can pass the read-only mode as an environment variable:
1072
-
1073
- ```bash
1074
- docker run -i --rm \
1075
- -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1076
- -e GITHUB_READ_ONLY=1 \
1077
- ghcr.io/github/github-mcp-server
1078
- ```
1079
-
1080
- ## GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
1081
-
1082
- The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
1083
- the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
1084
-
1085
- - For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme, as it otherwise defaults to `http://`, which GitHub Enterprise Server does not support.
1086
- - For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
1087
- ``` json
1088
- "github": {
1089
- "command": "docker",
1090
- "args": [
1091
- "run",
1092
- "-i",
1093
- "--rm",
1094
- "-e",
1095
- "GITHUB_PERSONAL_ACCESS_TOKEN",
1096
- "-e",
1097
- "GITHUB_HOST",
1098
- "ghcr.io/github/github-mcp-server"
1099
- ],
1100
- "env": {
1101
- "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}",
1102
- "GITHUB_HOST": "https://<your GHES or ghe.com domain name>"
1103
- }
1104
- }
1105
- ```
1106
-
1107
- ## i18n / Overriding Descriptions
1108
-
1109
- The descriptions of the tools can be overridden by creating a
1110
- `github-mcp-server-config.json` file in the same directory as the binary.
1111
-
1112
- The file should contain a JSON object with the tool names as keys and the new
1113
- descriptions as values. For example:
1114
-
1115
- ```json
1116
- {
1117
- "TOOL_ADD_ISSUE_COMMENT_DESCRIPTION": "an alternative description",
1118
- "TOOL_CREATE_BRANCH_DESCRIPTION": "Create a new branch in a GitHub repository"
1119
- }
1120
- ```
1121
-
1122
- You can create an export of the current translations by running the binary with
1123
- the `--export-translations` flag.
1124
-
1125
- This flag will preserve any translations/overrides you have made, while adding
1126
- any new translations that have been added to the binary since the last time you
1127
- exported.
1128
-
1129
- ```sh
1130
- ./github-mcp-server --export-translations
1131
- cat github-mcp-server-config.json
1132
- ```
1133
-
1134
- You can also use ENV vars to override the descriptions. The environment
1135
- variable names are the same as the keys in the JSON file, prefixed with
1136
- `GITHUB_MCP_` and all uppercase.
1137
-
1138
- For example, to override the `TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` tool, you can
1139
- set the following environment variable:
1140
-
1141
- ```sh
1142
- export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
1143
- ```
1144
-
1145
- ## Library Usage
1146
-
1147
- The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.
1148
-
1149
- ## License
1150
 
1151
- This project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE) for the full terms.
1152
 
1153
- ```json
1154
 
1155
- ## Contributing
 
 
 
1156
 
1157
- See [CONTRIBUTING.md](CONTRIBUTING.md).
 
 
 
 
1158
 
1159
- ## Support
1160
 
1161
- See [SUPPORT.md](SUPPORT.md).
 
 
1162
 
1163
- ## Security
1164
 
1165
- See [SECURITY.md](SECURITY.md).
 
 
 
1166
 
1167
- ## Third-Party Licenses
 
 
 
 
1168
 
1169
- See [third-party-licenses.linux.md](third-party-licenses.linux.md), [third-party-licenses.darwin.md](third-party-licenses.darwin.md), and [third-party-licenses.windows.md](third-party-licenses.windows.md).
 
1
+ # GitHub MCP Server - Fixed Build Solution
 
 
 
 
 
 
 
2
 
3
+ This repository contains the fixed versions of the GitHub MCP Server that resolves the Docker build issue.
4
 
5
+ ## Problem
6
 
7
+ The original Dockerfile failed with the error:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ```
9
+ --> ERROR: process "/bin/sh -c go mod edit -replace=github.com/mark3labs/mcp-go=github.com/mark3labs/mcp-go/mcp" did not complete successfully: exit code: 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ```
11
 
12
+ The error occurred because the replacement path 'github.com/mark3labs/mcp-go/mcp' was not a local directory path as required by Go modules.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ ## Solution
15
 
16
+ Two key fixes have been implemented:
17
 
18
+ ### 1. Fixed main.go
19
+ - Updated import path from `github.com/mark3labs/mcp-go` to `github.com/mark3labs/mcp-go/mcp`
20
+ - Added all necessary imports (`bytes`, `io`)
21
+ - Maintained all existing functionality with enhanced logging
22
 
23
+ ### 2. Fixed Dockerfile
24
+ - Removed the problematic `go mod edit -replace` command
25
+ - Implemented proper multi-stage build process
26
+ - Ensures the github-mcp-server binary is correctly built and copied
27
+ - Uses proper dependency management with `go mod download`
28
 
29
+ ## How to Use
30
 
31
+ 1. Replace the original `main.go` in `cmd/github-mcp-server/` with the fixed version
32
+ 2. Replace the original `Dockerfile` with the fixed version
33
+ 3. Build the Docker image normally
34
 
35
+ ## Changes Made
36
 
37
+ ### main.go
38
+ - Changed import path to use the correct module structure
39
+ - Added missing imports for `bytes` and `io` packages
40
+ - Preserved all existing functionality
41
 
42
+ ### Dockerfile
43
+ - Removed problematic module replacement
44
+ - Used standard multi-stage build approach
45
+ - Properly copies the built binary to final image
46
+ - Ensures the binary is executable
47
 
48
+ This solution resolves the build issue while maintaining all the original functionality including the enhanced logging and error handling that was added to debug the subprocess response issues.