You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-57Lines changed: 22 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,86 +8,51 @@ The GitHub MCP Server is a Model Context Protocol (MCP) server that provides sea
8
8
- Extracting and analyzing data from GitHub repositories.
9
9
- Building AI powered tools and applications that interact with GitHub's ecosystem.
10
10
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
14
12
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.
16
14
17
-
Start VS Code Insiders and make sure you pass the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable to the process.
15
+
## Installation
18
16
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
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.
57
24
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
61
26
62
27
```json
63
28
{
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>"
71
42
}
72
43
}
73
44
}
74
45
}
75
46
```
76
47
77
-
Right on top of `servers`, you should see a `Start` link to start the server.
78
-
48
+
### Usage with Binary
79
49
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.
85
51
86
52
## GitHub Enterprise Server
87
53
88
54
The flag `--gh-host` and the environment variable `GH_HOST` can be used to set the GitHub Enterprise Server hostname.
0 commit comments