Skip to content

Commit 36cd64f

Browse files
Merge branch 'main' into notifications-tooling
2 parents bc897a1 + a7d741c commit 36cd64f

22 files changed

+568
-605
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
cmd/github-mcp-server/github-mcp-server
33

44
# VSCode
5-
.vscode/mcp.json
5+
.vscode/*
6+
!.vscode/launch.json
67

78
# Added by goreleaser init:
89
dist/
910
__debug_bin*
1011

11-
# Go
12+
# Go
1213
vendor

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG VERSION="dev"
22

3-
FROM golang:1.23.7 AS build
3+
FROM golang:1.24.2 AS build
44
# allow this step access to build arg
55
ARG VERSION
66
# Set the working directory

README.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ automation and interaction capabilities for developers and tools.
1515
## Prerequisites
1616

1717
1. To run the server in a container, you will need to have [Docker](https://www.docker.com/) installed.
18-
2. Once Docker is installed, you will also need to ensure Docker is running.
18+
2. Once Docker is installed, you will also need to ensure Docker is running. The image is public; if you get errors on pull, you may have an expired token and need to `docker logout ghcr.io`.
1919
3. Lastly you will need to [Create a GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new).
2020
The MCP server can use many of the GitHub APIs, so enable the permissions that you feel comfortable granting your AI tools (to learn more about access tokens, please check out the [documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)).
2121

@@ -27,10 +27,6 @@ For quick installation, use one of the one-click install buttons at the top of t
2727

2828
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)`.
2929

30-
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.
31-
32-
> Note that the `mcp` key is not needed in the `.vscode/mcp.json` file.
33-
3430
```json
3531
{
3632
"mcp": {
@@ -62,6 +58,39 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
6258
}
6359
```
6460

61+
Optionally, you can add a similar example (i.e. without the mcp key) to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others.
62+
63+
64+
```json
65+
{
66+
"inputs": [
67+
{
68+
"type": "promptString",
69+
"id": "github_token",
70+
"description": "GitHub Personal Access Token",
71+
"password": true
72+
}
73+
],
74+
"servers": {
75+
"github": {
76+
"command": "docker",
77+
"args": [
78+
"run",
79+
"-i",
80+
"--rm",
81+
"-e",
82+
"GITHUB_PERSONAL_ACCESS_TOKEN",
83+
"ghcr.io/github/github-mcp-server"
84+
],
85+
"env": {
86+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
87+
}
88+
}
89+
}
90+
}
91+
92+
```
93+
6594
More about using MCP server tools in VS Code's [agent mode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
6695

6796
### Usage with Claude Desktop
@@ -477,7 +506,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
477506
- `page`: Page number, for files in the commit (number, optional)
478507
- `perPage`: Results per page, for files in the commit (number, optional)
479508

480-
- **search_code** - Search for code across GitHub repositories
509+
- **search_code** - Search for code across GitHub repositories
481510
- `query`: Search query (string, required)
482511
- `sort`: Sort field (string, optional)
483512
- `order`: Sort order (string, optional)
@@ -487,7 +516,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
487516
### Users
488517

489518
- **search_users** - Search for GitHub users
490-
- `query`: Search query (string, required)
519+
- `q`: Search query (string, required)
491520
- `sort`: Sort field (string, optional)
492521
- `order`: Sort order (string, optional)
493522
- `page`: Page number (number, optional)

cmd/github-mcp-server/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,15 @@ var (
4545
stdlog.Fatal("Failed to initialize logger:", err)
4646
}
4747

48-
enabledToolsets := viper.GetStringSlice("toolsets")
48+
// If you're wondering why we're not using viper.GetStringSlice("toolsets"),
49+
// it's because viper doesn't handle comma-separated values correctly for env
50+
// vars when using GetStringSlice.
51+
// https://github.com/spf13/viper/issues/380
52+
var enabledToolsets []string
53+
err = viper.UnmarshalKey("toolsets", &enabledToolsets)
54+
if err != nil {
55+
stdlog.Fatal("Failed to unmarshal toolsets:", err)
56+
}
4957

5058
logCommands := viper.GetBool("enable-command-logging")
5159
cfg := runConfig{

0 commit comments

Comments
 (0)