Skip to content

Commit c96cfcb

Browse files
authored
Merge branch 'main' into stdio_debugger
2 parents 669be31 + 92303d4 commit c96cfcb

25 files changed

+986
-268
lines changed

README.md

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The GitHub MCP Server is a [Model Context Protocol (MCP)](https://modelcontextpr
44
server that provides seamless integration with GitHub APIs, enabling advanced
55
automation and interaction capabilities for developers and tools.
66

7+
[![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)
8+
79
## Use Cases
810

911
- Automating GitHub workflows and processes.
@@ -23,18 +25,46 @@ To run the server in a container, you will need to have [Docker](https://www.doc
2325

2426
### Usage with VS Code
2527

26-
Install the GitHub MCP server into VS Code by clicking here:
28+
For quick installation, use one of the one-click install buttons at the top of this README.
2729

28-
[<img alt="Install in VS Code" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=24bfa5">](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%25%7B%22name%22%3A%22github%22%2C%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%20%22-i%22%2C%20%22--rm%22%2C%20%22-e%22%2C%20%22GITHUB_PERSONAL_ACCESS_TOKEN%22%2C%20%22ghcr.io%2Fgithub%2Fgithub-mcp-server%3Amain%22%5D%2C%20%22env%22%3A%20%7B%22GITHUB_PERSONAL_ACCESS_TOKEN%22%3A%20%22%24%7Binput%3Agithub-pat%7D%22%7D%2C%20%22inputs%22%3A%20%5B%7B%20%22id%22%3A%20%22github-pat%22%2C%20%22type%22%3A%20%22promptString%22%2C%20%22description%22%3A%20%22Github%20Personal%20Access%20Token%22%2C%20%22password%22%3A%20true%7D%5D%7D)
30+
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`.
2931

30-
Or run this command in your terminal:
32+
Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others.
3133

32-
```bash
33-
code --add-mcp '{"name":"github","command":"docker","args":["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-pat}"}, "inputs": [{ "id": "github-pat", "type": "promptString", "description": "Github Personal Access Token", "password": true}]}'
34+
> Note that the `mcp` key is not needed in the `.vscode/mcp.json` file.
3435
36+
```json
37+
{
38+
"mcp": {
39+
"inputs": [
40+
{
41+
"type": "promptString",
42+
"id": "github_token",
43+
"description": "GitHub Personal Access Token",
44+
"password": true
45+
}
46+
],
47+
"servers": {
48+
"github": {
49+
"command": "docker",
50+
"args": [
51+
"run",
52+
"-i",
53+
"--rm",
54+
"-e",
55+
"GITHUB_PERSONAL_ACCESS_TOKEN",
56+
"ghcr.io/github/github-mcp-server"
57+
],
58+
"env": {
59+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
60+
}
61+
}
62+
}
63+
}
64+
}
3565
```
3666

37-
VS Code is now configured and will prompt for your token the first time you use agent mode.
67+
More about using MCP server tools in VS Code's [agent mode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
3868

3969
### Usage with Claude Desktop
4070

@@ -150,7 +180,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
150180
- `direction`: Sort direction ('asc', 'desc') (string, optional)
151181
- `since`: Filter by date (ISO 8601 timestamp) (string, optional)
152182
- `page`: Page number (number, optional)
153-
- `per_page`: Results per page (number, optional)
183+
- `perPage`: Results per page (number, optional)
154184

155185
- **update_issue** - Update an existing issue in a GitHub repository
156186

@@ -177,7 +207,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
177207

178208
- `owner`: Repository owner (string, required)
179209
- `repo`: Repository name (string, required)
180-
- `pull_number`: Pull request number (number, required)
210+
- `pullNumber`: Pull request number (number, required)
181211

182212
- **list_pull_requests** - List and filter repository pull requests
183213

@@ -186,14 +216,14 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
186216
- `state`: PR state (string, optional)
187217
- `sort`: Sort field (string, optional)
188218
- `direction`: Sort direction (string, optional)
189-
- `per_page`: Results per page (number, optional)
219+
- `perPage`: Results per page (number, optional)
190220
- `page`: Page number (number, optional)
191221

192222
- **merge_pull_request** - Merge a pull request
193223

194224
- `owner`: Repository owner (string, required)
195225
- `repo`: Repository name (string, required)
196-
- `pull_number`: Pull request number (number, required)
226+
- `pullNumber`: Pull request number (number, required)
197227
- `commit_title`: Title for the merge commit (string, optional)
198228
- `commit_message`: Message for the merge commit (string, optional)
199229
- `merge_method`: Merge method (string, optional)
@@ -202,41 +232,41 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
202232

203233
- `owner`: Repository owner (string, required)
204234
- `repo`: Repository name (string, required)
205-
- `pull_number`: Pull request number (number, required)
235+
- `pullNumber`: Pull request number (number, required)
206236

207237
- **get_pull_request_status** - Get the combined status of all status checks for a pull request
208238

209239
- `owner`: Repository owner (string, required)
210240
- `repo`: Repository name (string, required)
211-
- `pull_number`: Pull request number (number, required)
241+
- `pullNumber`: Pull request number (number, required)
212242

213243
- **update_pull_request_branch** - Update a pull request branch with the latest changes from the base branch
214244

215245
- `owner`: Repository owner (string, required)
216246
- `repo`: Repository name (string, required)
217-
- `pull_number`: Pull request number (number, required)
218-
- `expected_head_sha`: The expected SHA of the pull request's HEAD ref (string, optional)
247+
- `pullNumber`: Pull request number (number, required)
248+
- `expectedHeadSha`: The expected SHA of the pull request's HEAD ref (string, optional)
219249

220250
- **get_pull_request_comments** - Get the review comments on a pull request
221251

222252
- `owner`: Repository owner (string, required)
223253
- `repo`: Repository name (string, required)
224-
- `pull_number`: Pull request number (number, required)
254+
- `pullNumber`: Pull request number (number, required)
225255

226256
- **get_pull_request_reviews** - Get the reviews on a pull request
227257

228258
- `owner`: Repository owner (string, required)
229259
- `repo`: Repository name (string, required)
230-
- `pull_number`: Pull request number (number, required)
260+
- `pullNumber`: Pull request number (number, required)
231261

232262
- **create_pull_request_review** - Create a review on a pull request review
233263

234264
- `owner`: Repository owner (string, required)
235265
- `repo`: Repository name (string, required)
236-
- `pull_number`: Pull request number (number, required)
266+
- `pullNumber`: Pull request number (number, required)
237267
- `body`: Review comment text (string, optional)
238268
- `event`: Review action ('APPROVE', 'REQUEST_CHANGES', 'COMMENT') (string, required)
239-
- `commit_id`: SHA of commit to review (string, optional)
269+
- `commitId`: SHA of commit to review (string, optional)
240270
- `comments`: Line-specific comments array of objects, each object with path (string), position (number), and body (string) (array, optional)
241271

242272
- **create_pull_request** - Create a new pull request
@@ -276,15 +306,14 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
276306
- `sort`: Sort field (string, optional)
277307
- `order`: Sort order (string, optional)
278308
- `page`: Page number (number, optional)
279-
- `per_page`: Results per page (number, optional)
309+
- `perPage`: Results per page (number, optional)
280310

281311
- **create_repository** - Create a new GitHub repository
282312

283313
- `name`: Repository name (string, required)
284314
- `description`: Repository description (string, optional)
285315
- `private`: Whether the repository is private (boolean, optional)
286-
- `auto_init`: Auto-initialize with README (boolean, optional)
287-
- `gitignore_template`: Gitignore template name (string, optional)
316+
- `autoInit`: Auto-initialize with README (boolean, optional)
288317

289318
- **get_file_contents** - Get contents of a file or directory
290319

@@ -312,7 +341,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
312341
- `sha`: Branch name, tag, or commit SHA (string, optional)
313342
- `path`: Only commits containing this file path (string, optional)
314343
- `page`: Page number (number, optional)
315-
- `per_page`: Results per page (number, optional)
344+
- `perPage`: Results per page (number, optional)
316345

317346
### Search
318347

@@ -322,22 +351,22 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
322351
- `sort`: Sort field (string, optional)
323352
- `order`: Sort order (string, optional)
324353
- `page`: Page number (number, optional)
325-
- `per_page`: Results per page (number, optional)
354+
- `perPage`: Results per page (number, optional)
326355

327356
- **search_users** - Search for GitHub users
328357
- `query`: Search query (string, required)
329358
- `sort`: Sort field (string, optional)
330359
- `order`: Sort order (string, optional)
331360
- `page`: Page number (number, optional)
332-
- `per_page`: Results per page (number, optional)
361+
- `perPage`: Results per page (number, optional)
333362

334363
### Code Scanning
335364

336365
- **get_code_scanning_alert** - Get a code scanning alert
337366

338367
- `owner`: Repository owner (string, required)
339368
- `repo`: Repository name (string, required)
340-
- `alert_number`: Alert number (number, required)
369+
- `alertNumber`: Alert number (number, required)
341370

342371
- **list_code_scanning_alerts** - List code scanning alerts for a repository
343372
- `owner`: Repository owner (string, required)
@@ -392,11 +421,11 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
392421
- **Get Repository Content for a Specific Pull Request**
393422
Retrieves the content of a repository at a specific path for a given pull request.
394423

395-
- **Template**: `repo://{owner}/{repo}/refs/pull/{pr_number}/head/contents{/path*}`
424+
- **Template**: `repo://{owner}/{repo}/refs/pull/{prNumber}/head/contents{/path*}`
396425
- **Parameters**:
397426
- `owner`: Repository owner (string, required)
398427
- `repo`: Repository name (string, required)
399-
- `pr_number`: Pull request number (string, required)
428+
- `prNumber`: Pull request number (string, required)
400429
- `path`: File or directory path (string, optional)
401430

402431
## License

cmd/mcpcurl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Use "mcpcurl tools [command] --help" for more information about a command.
7272
Get help for a specific tool:
7373

7474
```bash
75-
% ./mcpcurl --stdio-server-cmd "docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN mcp/github" tools get_issue --help
75+
% ./mcpcurl --stdio-server-cmd "docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN mcp/github" tools get_issue --help
7676
Get details of a specific issue in a GitHub repository.
7777

7878
Usage:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy