Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,37 @@ code-insiders

Another way is to set the environment variable in your shell configuration file (e.g., `.bashrc`, `.zshrc`, etc.).

Run **Preferences: Open User Settings (JSON)**, and create or append to the `mcp` setting:
Create a new file `.vscode/mcp.json` and provide this configuration:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should remove the lines above that mention setting the token as env variable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no strong opinion on that. I didn't want to take away another option that might be in use. It does seem like this input approach should be elevated to a recommended approach at least?


If you are using the docker image, use this configuration:

```json
{
"mcp": {
"inputs": [],
"inputs": [
{
"id": "github-pat",
"type": "promptString",
"description": "Github Personal Access Token",
"password": true,
}
],
"servers": {
"github-mcp-server": {
"github-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server:main"
],
"env": {}
}
"args": [
"run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server:main"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-pat}"
}
}
}
}
}
```

When you start the server, VS Code will prompt for your token, as indicated by `${input:github-pat}`.

If you built the binary from the repo use this configuration:

```json
Expand Down