@@ -63,33 +63,37 @@ code-insiders
63
63
64
64
Another way is to set the environment variable in your shell configuration file (e.g.,` .bashrc ` ,` .zshrc ` , etc.).
65
65
66
- Run ** Preferences: Open User Settings (JSON) ** , andcreate or append to the ` mcp ` setting :
66
+ Create a new file ` .vscode/mcp.json ` andprovide this configuration :
67
67
68
68
If you are using the docker image, use this configuration:
69
69
70
70
``` json
71
71
{
72
- "mcp" : {
73
- "inputs" : [],
72
+ "inputs" : [
73
+ {
74
+ "id" :" github-pat" ,
75
+ "type" :" promptString" ,
76
+ "description" :" Github Personal Access Token" ,
77
+ "password" :true ,
78
+ }
79
+ ],
74
80
"servers" : {
75
- "github-mcp-server" : {
81
+ "github-mcp-server" : {
76
82
"type" :" stdio" ,
77
83
"command" :" docker" ,
78
- "args" : [
79
- " run" ,
80
- " -i" ,
81
- " --rm" ,
82
- " -e" ,
83
- " GITHUB_PERSONAL_ACCESS_TOKEN" ,
84
- " ghcr.io/github/github-mcp-server:main"
85
- ],
86
- "env" : {}
87
- }
84
+ "args" : [
85
+ " run" ," -i" ," --rm" ," -e" ," GITHUB_PERSONAL_ACCESS_TOKEN" ," ghcr.io/github/github-mcp-server:main"
86
+ ],
87
+ "env" : {
88
+ "GITHUB_PERSONAL_ACCESS_TOKEN" :" ${input:github-pat}"
89
+ }
90
+ }
88
91
}
89
- }
90
92
}
91
93
```
92
94
95
+ When you start the server, VS Code will prompt for your token, as indicated by` ${input:github-pat} ` .
96
+
93
97
If you built the binary from the repo use this configuration:
94
98
95
99
``` json