Skip to content

Commit b893367

Browse files
digitaraldSamMorrowDrums
authored andcommitted
VS Code install steps
1 parent 6e132eb commit b893367

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

README.md

+36-6
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%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%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

0 commit comments

Comments
 (0)