Skip to content

Commit d81a2d7

Browse files
committed
wip: readme updates
1 parent d3c7e58 commit d81a2d7

File tree

1 file changed

+22
-57
lines changed

1 file changed

+22
-57
lines changed

README.md

Lines changed: 22 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,86 +8,51 @@ The GitHub MCP Server is a Model Context Protocol (MCP) server that provides sea
88
- Extracting and analyzing data from GitHub repositories.
99
- Building AI powered tools and applications that interact with GitHub's ecosystem.
1010

11-
## Installation
12-
13-
[Create a GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) with the appropriate permissions and set it as the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable.
11+
## Prerequisites
1412

15-
### Start VS Code Insiders
13+
[Create a GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) with the permissions you want to give the MCP server. You can also install [Docker](https://www.docker.com/) to run the server in a container or build the binary from the repo.
1614

17-
Start VS Code Insiders and make sure you pass the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable to the process.
15+
## Installation
1816

19-
One way to do this is to make sure that [you can run VS code from your terminal](https://code.visualstudio.com/docs/setup/mac#_launch-vs-code-from-the-command-line) and
20-
start it with the following command:
17+
### Usage with VS Code
2118

2219
```bash
23-
export GITHUB_PERSONAL_ACCESS_TOKEN=your-token-here
24-
code-insiders
25-
```
26-
27-
Another way is to set the environment variable in your shell configuration file (e.g., `.bashrc`, `.zshrc`, etc.).
20+
code --add-mcp '{"name":"github","command":"docker","args":["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server:main"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-pat}"} "inputs": [ { "id": "github-pat", "type": "promptString", "description": "Github Personal Access Token", "password": true, } ] }'
2821

29-
Create a new file `.vscode/mcp.json` and provide this configuration:
30-
31-
If you are using the docker image, use this configuration:
32-
33-
```json
34-
{
35-
"inputs": [
36-
{
37-
"id": "github-pat",
38-
"type": "promptString",
39-
"description": "Github Personal Access Token",
40-
"password": true,
41-
}
42-
],
43-
"servers": {
44-
"github-mcp-server": {
45-
"type": "stdio",
46-
"command": "docker",
47-
"args": [
48-
"run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server:main"
49-
],
50-
"env": {
51-
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-pat}"
52-
}
53-
}
54-
}
55-
}
5622
```
23+
When you start the server, VS Code will prompt for your token, as indicated by `${input:github-pat}`. On top of `servers`, you should see a `Start` link to start the server.
5724

58-
When you start the server, VS Code will prompt for your token, as indicated by `${input:github-pat}`.
59-
60-
If you built the binary from the repo use this configuration:
25+
### Usage with Claude Desktop
6126

6227
```json
6328
{
64-
"mcp": {
65-
"inputs": [ ],
66-
"servers": {
67-
"mcp-github-server": {
68-
"command": "path-to-your/github-mcp-server",
69-
"args": ["stdio"],
70-
"env": { }
29+
"mcpServers": {
30+
"github": {
31+
"command": "docker",
32+
"args": [
33+
"run",
34+
"-i",
35+
"--rm",
36+
"-e",
37+
"GITHUB_PERSONAL_ACCESS_TOKEN",
38+
"ghcr.io/github/github-mcp-server:main"
39+
],
40+
"env": {
41+
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
7142
}
7243
}
7344
}
7445
}
7546
```
7647

77-
Right on top of `servers`, you should see a `Start` link to start the server.
78-
48+
### Usage with Binary
7949

80-
Try something like the following prompt to verify that it works:
81-
82-
```
83-
I'd like to know more about my GitHub profile.
84-
```
50+
If you don't have Docker, you can build the binary from the repo and use the `github-mcp-server stdio` command with the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to your token.
8551

8652
## GitHub Enterprise Server
8753

8854
The flag `--gh-host` and the environment variable `GH_HOST` can be used to set the GitHub Enterprise Server hostname.
8955

90-
9156
## Tools
9257

9358
### Users

0 commit comments

Comments
 (0)