Skip to content

Commit 42b7f64

Browse files
committed
Merge branch 'main' into http-stack-2
2 parents c696607 + 47412e5 commit 42b7f64

File tree

22 files changed

+477
-248
lines changed

22 files changed

+477
-248
lines changed

.github/workflows/go.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515

1616
steps:
17+
- name: Force git to use LF
18+
# This step is required on Windows to work around go mod tidy -diff issues caused by CRLF line endings.
19+
# TODO: replace with a checkout option when https://github.com/actions/checkout/issues/226 is implemented
20+
if: runner.os == 'Windows'
21+
run: |
22+
git config --global core.autocrlf false
23+
git config --global core.eol lf
24+
1725
- name: Check out code
1826
uses: actions/checkout@v6
1927

@@ -22,8 +30,8 @@ jobs:
2230
with:
2331
go-version-file: "go.mod"
2432

25-
- name: Download dependencies
26-
run: go mod download
33+
- name: Tidy dependencies
34+
run: go mod tidy -diff
2735

2836
- name: Run unit tests
2937
run: script/test

.github/workflows/mcp-diff.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fetch-depth: 0
2121

2222
- name: Run MCP Server Diff
23-
uses: SamMorrowDrums/mcp-server-diff@v2
23+
uses: SamMorrowDrums/mcp-server-diff@v2.3.5
2424
with:
2525
setup_go: "true"
2626
install_command: go mod download
@@ -35,8 +35,10 @@ jobs:
3535
{"name": "read-only+dynamic", "args": "--read-only --dynamic-toolsets"},
3636
{"name": "toolsets-repos", "args": "--toolsets=repos"},
3737
{"name": "toolsets-issues", "args": "--toolsets=issues"},
38+
{"name": "toolsets-context", "args": "--toolsets=context"},
3839
{"name": "toolsets-pull_requests", "args": "--toolsets=pull_requests"},
3940
{"name": "toolsets-repos,issues", "args": "--toolsets=repos,issues"},
41+
{"name": "toolsets-issues,context", "args": "--toolsets=issues,context"},
4042
{"name": "toolsets-all", "args": "--toolsets=all"},
4143
{"name": "tools-get_me", "args": "--tools=get_me"},
4244
{"name": "tools-get_me,list_issues", "args": "--tools=get_me,list_issues"},

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25.4-alpine AS build
1+
FROM golang:1.25.6-alpine AS build
22
ARG VERSION="dev"
33

44
# Set the working directory

README.md

Lines changed: 59 additions & 155 deletions
Large diffs are not rendered by default.

cmd/github-mcp-server/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var (
8484
LogFilePath: viper.GetString("log-file"),
8585
ContentWindowSize: viper.GetInt("content-window-size"),
8686
LockdownMode: viper.GetBool("lockdown-mode"),
87-
InsiderMode: viper.GetBool("insider-mode"),
87+
InsidersMode: viper.GetBool("insiders"),
8888
RepoAccessCacheTTL: &ttl,
8989
}
9090
return ghmcp.RunStdioServer(stdioServerConfig)
@@ -132,7 +132,7 @@ func init() {
132132
rootCmd.PersistentFlags().String("gh-host", "", "Specify the GitHub hostname (for GitHub Enterprise etc.)")
133133
rootCmd.PersistentFlags().Int("content-window-size", 5000, "Specify the content window size")
134134
rootCmd.PersistentFlags().Bool("lockdown-mode", false, "Enable lockdown mode")
135-
rootCmd.PersistentFlags().Bool("insider-mode", false, "Enable insider features")
135+
rootCmd.PersistentFlags().Bool("insiders", false, "Enable insiders features")
136136
rootCmd.PersistentFlags().Duration("repo-access-cache-ttl", 5*time.Minute, "Override the repo access cache TTL (e.g. 1m, 0s to disable)")
137137
rootCmd.PersistentFlags().Int("port", 8082, "HTTP server port")
138138

@@ -148,7 +148,7 @@ func init() {
148148
_ = viper.BindPFlag("host", rootCmd.PersistentFlags().Lookup("gh-host"))
149149
_ = viper.BindPFlag("content-window-size", rootCmd.PersistentFlags().Lookup("content-window-size"))
150150
_ = viper.BindPFlag("lockdown-mode", rootCmd.PersistentFlags().Lookup("lockdown-mode"))
151-
_ = viper.BindPFlag("insider-mode", rootCmd.PersistentFlags().Lookup("insider-mode"))
151+
_ = viper.BindPFlag("insiders", rootCmd.PersistentFlags().Lookup("insiders"))
152152
_ = viper.BindPFlag("repo-access-cache-ttl", rootCmd.PersistentFlags().Lookup("repo-access-cache-ttl"))
153153
_ = viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port"))
154154

cmd/mcpcurl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ be executed against the configured MCP server.
1616
## Installation
1717

1818
### Prerequisites
19-
- Go 1.21 or later
19+
- Go 1.24 or later
2020
- Access to the GitHub MCP Server from either Docker or local build
2121

2222
### Build from Source

docs/installation-guides/install-claude.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ echo -e ".env\n.mcp.json" >> .gitignore
2929
### Remote Server Setup (Streamable HTTP)
3030

3131
> **Note**: For Claude Code versions **2.1.1 and newer**, use the `add-json` command format below. For older versions, see the [legacy command format](#for-older-versions-of-claude-code).
32+
>
33+
> **Windows / CLI note**: `claude mcp add-json` may return `Invalid input` when adding an HTTP server. If that happens, use the legacy `claude mcp add --transport http ...` command format below.
3234
3335
1. Run the following command in the terminal (not in Claude Code CLI):
3436
```bash
@@ -95,6 +97,15 @@ With an environment variable:
9597
claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $(grep GITHUB_PAT .env | cut -d '=' -f2)"
9698
```
9799

100+
#### Windows (PowerShell)
101+
102+
If you see `missing required argument 'name'`, put the server name immediately after `claude mcp add`:
103+
104+
```powershell
105+
$pat = "YOUR_GITHUB_PAT"
106+
claude mcp add github --transport http https://api.githubcopilot.com/mcp/ -H "Authorization: Bearer $pat"
107+
```
108+
98109
---
99110

100111
## Claude Desktop

docs/remote-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The Remote GitHub MCP server has optional headers equivalent to the Local server
6868
- Equivalent to `GITHUB_LOCKDOWN_MODE` env var for Local server.
6969
- If this header is empty, "false", "f", "no", "n", "0", or "off" (ignoring whitespace and case), it will be interpreted as false. All other values are interpreted as true.
7070
- `X-MCP-Insiders`: Enables insiders mode for early access to new features.
71-
- Equivalent to `GITHUB_INSIDER_MODE` env var or `--insider-mode` flag for Local server.
71+
- Equivalent to `GITHUB_INSIDERS` env var or `--insiders` flag for Local server.
7272
- If this header is empty, "false", "f", "no", "n", "0", or "off" (ignoring whitespace and case), it will be interpreted as false. All other values are interpreted as true.
7373

7474
> **Looking for examples?** See the [Server Configuration Guide](./server-configuration.md) for common recipes like minimal setups, read-only mode, and combining tools with toolsets.

go.mod

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module github.com/github/github-mcp-server
33
go 1.24.0
44

55
require (
6-
github.com/fatih/color v1.18.0
76
github.com/google/go-github/v79 v79.0.0
87
github.com/google/jsonschema-go v0.4.2
98
github.com/josephburnett/jd v1.9.2
@@ -16,29 +15,18 @@ require (
1615

1716
require (
1817
github.com/aymerick/douceur v0.2.0 // indirect
19-
github.com/go-openapi/jsonpointer v0.19.5 // indirect
20-
github.com/go-openapi/swag v0.21.1 // indirect
21-
github.com/gorilla/css v1.0.1 // indirect
22-
github.com/josharian/intern v1.0.0 // indirect
23-
github.com/mailru/easyjson v0.7.7 // indirect
24-
github.com/mattn/go-colorable v0.1.13 // indirect
25-
github.com/mattn/go-isatty v0.0.20 // indirect
26-
github.com/stretchr/objx v0.5.2 // indirect
27-
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
28-
go.yaml.in/yaml/v3 v3.0.4 // indirect
29-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
30-
golang.org/x/net v0.38.0 // indirect
31-
gopkg.in/yaml.v2 v2.4.0 // indirect
32-
)
33-
34-
require (
3518
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3619
github.com/fsnotify/fsnotify v1.9.0 // indirect
3720
github.com/go-chi/chi/v5 v5.2.3
21+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
22+
github.com/go-openapi/swag v0.21.1 // indirect
3823
github.com/go-viper/mapstructure/v2 v2.5.0
3924
github.com/google/go-querystring v1.1.0 // indirect
25+
github.com/gorilla/css v1.0.1 // indirect
4026
github.com/inconshreveable/mousetrap v1.1.0 // indirect
27+
github.com/josharian/intern v1.0.0 // indirect
4128
github.com/lithammer/fuzzysearch v1.1.8
29+
github.com/mailru/easyjson v0.7.7 // indirect
4230
github.com/modelcontextprotocol/go-sdk v1.2.0
4331
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
4432
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
@@ -50,11 +38,17 @@ require (
5038
github.com/spf13/afero v1.15.0 // indirect
5139
github.com/spf13/cast v1.10.0 // indirect
5240
github.com/spf13/pflag v1.0.10
41+
github.com/stretchr/objx v0.5.2 // indirect
5342
github.com/subosito/gotenv v1.6.0 // indirect
5443
github.com/yosida95/uritemplate/v3 v3.0.2
44+
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
45+
go.yaml.in/yaml/v3 v3.0.4 // indirect
46+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
47+
golang.org/x/net v0.38.0 // indirect
5548
golang.org/x/oauth2 v0.30.0 // indirect
5649
golang.org/x/sys v0.31.0 // indirect
5750
golang.org/x/text v0.28.0 // indirect
5851
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
52+
gopkg.in/yaml.v2 v2.4.0 // indirect
5953
gopkg.in/yaml.v3 v3.0.1 // indirect
6054
)

go.sum

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
66
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
77
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
88
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9-
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
10-
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
119
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
1210
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
1311
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
@@ -55,11 +53,6 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
5553
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
5654
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
5755
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
58-
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
59-
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
60-
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
61-
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
62-
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
6356
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
6457
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
6558
github.com/modelcontextprotocol/go-sdk v1.2.0 h1:Y23co09300CEk8iZ/tMxIX1dVmKZkzoSBZOpJwUnc/s=
@@ -132,9 +125,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
132125
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
133126
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
134127
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
135-
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
136128
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
137-
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
138129
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
139130
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
140131
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=

0 commit comments

Comments
 (0)