Skip to content

Commit 1899035

Browse files
authored
Merge branch 'main' into circleci-project-setup
2 parents d8eace4 + 4bded57 commit 1899035

77 files changed

Lines changed: 5191 additions & 1059 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Insiders Feedback
3+
about: Give feedback related to a GitHub MCP Server Insiders feature
4+
title: "Insiders Feedback: "
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Version: Insiders
11+
12+
Feature:
13+
14+
Feedback:

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ go test ./pkg/github -run TestGetMe
9494

9595
- **go.mod / go.sum:** Go module dependencies (Go 1.24.0+)
9696
- **.golangci.yml:** Linter configuration (v2 format, ~15 linters enabled)
97-
- **Dockerfile:** Multi-stage build (golang:1.25.3-alpine → distroless)
97+
- **Dockerfile:** Multi-stage build (golang:1.25.8-alpine → distroless)
9898
- **server.json:** MCP server metadata for registry
9999
- **.goreleaser.yaml:** Release automation config
100100
- **.gitignore:** Excludes bin/, dist/, vendor/, *.DS_Store, github-mcp-server binary

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
# https://github.com/docker/login-action
6161
- name: Log into registry ${{ env.REGISTRY }}
6262
if: github.event_name != 'pull_request'
63-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
63+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
6464
with:
6565
registry: ${{ env.REGISTRY }}
6666
username: ${{ github.actor }}
@@ -107,7 +107,7 @@ jobs:
107107
# https://github.com/docker/build-push-action
108108
- name: Build and push Docker image
109109
id: build-and-push
110-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
110+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
111111
with:
112112
context: .
113113
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/license-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- name: Check if already commented
7878
if: steps.changes.outcome == 'failure' && steps.push.outcome == 'failure'
7979
id: check_comment
80-
uses: actions/github-script@v8
80+
uses: actions/github-script@v9
8181
with:
8282
script: |
8383
const { data: comments } = await github.rest.issues.listComments({
@@ -95,7 +95,7 @@ jobs:
9595
9696
- name: Comment with instructions if cannot push
9797
if: steps.changes.outcome == 'failure' && steps.push.outcome == 'failure' && steps.check_comment.outputs.already_commented == 'false'
98-
uses: actions/github-script@v8
98+
uses: actions/github-script@v9
9999
with:
100100
script: |
101101
await github.rest.issues.createComment({

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COPY ui/ ./ui/
88
RUN mkdir -p ./pkg/github/ui_dist && \
99
cd ui && npm run build
1010

11-
FROM golang:1.25.8-alpine@sha256:8e02eb337d9e0ea459e041f1ee5eece41cbb61f1d83e7d883a3e2fb4862063fa AS build
11+
FROM golang:1.25.9-alpine@sha256:5caaf1cca9dc351e13deafbc3879fd4754801acba8653fa9540cea125d01a71f AS build
1212
ARG VERSION="dev"
1313

1414
# Set the working directory
@@ -31,7 +31,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
3131
-o /bin/github-mcp-server ./cmd/github-mcp-server
3232

3333
# Make a stage to run the app
34-
FROM gcr.io/distroless/base-debian12@sha256:937c7eaaf6f3f2d38a1f8c4aeff326f0c56e4593ea152e9e8f74d976dde52f56
34+
FROM gcr.io/distroless/base-debian12@sha256:9dce90e688a57e59ce473ff7bc4c80bc8fe52d2303b4d99b44f297310bbd2210
3535

3636
# Add required MCP server annotation
3737
LABEL io.modelcontextprotocol.server.name="io.github.github/github-mcp-server"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ You can also configure specific tools using the `--tools` flag. Tools can be use
459459
- Tools, toolsets, and dynamic toolsets can all be used together
460460
- Read-only mode takes priority: write tools are skipped if `--read-only` is set, even if explicitly requested via `--tools`
461461
- Tool names must match exactly (e.g., `get_file_contents`, not `getFileContents`). Invalid tool names will cause the server to fail at startup with an error message
462-
- When tools are renamed, old names are preserved as aliases for backward compatibility. See [Deprecated Tool Aliases](docs/deprecated-tool-aliases.md) for details.
462+
- When tools are renamed, old names are preserved as aliases for backward compatibility. See [Tool Renaming](docs/tool-renaming.md) for details.
463463

464464
### Using Toolsets With Docker
465465

cmd/github-mcp-server/main.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,28 @@ var (
105105
Short: "Start HTTP server",
106106
Long: `Start an HTTP server that listens for MCP requests over HTTP.`,
107107
RunE: func(_ *cobra.Command, _ []string) error {
108+
// Parse toolsets (same approach as stdio — see comment there)
109+
var enabledToolsets []string
110+
if viper.IsSet("toolsets") {
111+
if err := viper.UnmarshalKey("toolsets", &enabledToolsets); err != nil {
112+
return fmt.Errorf("failed to unmarshal toolsets: %w", err)
113+
}
114+
}
115+
116+
var enabledTools []string
117+
if viper.IsSet("tools") {
118+
if err := viper.UnmarshalKey("tools", &enabledTools); err != nil {
119+
return fmt.Errorf("failed to unmarshal tools: %w", err)
120+
}
121+
}
122+
123+
var excludeTools []string
124+
if viper.IsSet("exclude_tools") {
125+
if err := viper.UnmarshalKey("exclude_tools", &excludeTools); err != nil {
126+
return fmt.Errorf("failed to unmarshal exclude-tools: %w", err)
127+
}
128+
}
129+
108130
ttl := viper.GetDuration("repo-access-cache-ttl")
109131
httpConfig := ghhttp.ServerConfig{
110132
Version: version,
@@ -119,6 +141,12 @@ var (
119141
LockdownMode: viper.GetBool("lockdown-mode"),
120142
RepoAccessCacheTTL: &ttl,
121143
ScopeChallenge: viper.GetBool("scope-challenge"),
144+
ReadOnly: viper.GetBool("read-only"),
145+
EnabledToolsets: enabledToolsets,
146+
EnabledTools: enabledTools,
147+
DynamicToolsets: viper.GetBool("dynamic_toolsets"),
148+
ExcludeTools: excludeTools,
149+
InsidersMode: viper.GetBool("insiders"),
122150
}
123151

124152
return ghhttp.RunHTTPServer(httpConfig)

docs/server-configuration.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ We currently support the following ways in which the GitHub MCP Server can be co
1414
| Dynamic Mode | Not available | `--dynamic-toolsets` flag or `GITHUB_DYNAMIC_TOOLSETS` env var |
1515
| Lockdown Mode | `X-MCP-Lockdown` header | `--lockdown-mode` flag or `GITHUB_LOCKDOWN_MODE` env var |
1616
| Insiders Mode | `X-MCP-Insiders` header or `/insiders` URL | `--insiders` flag or `GITHUB_INSIDERS` env var |
17+
| Feature Flags | `X-MCP-Features` header | `--features` flag |
1718
| Scope Filtering | Always enabled | Always enabled |
1819
| Server Name/Title | Not available | `GITHUB_MCP_SERVER_NAME` / `GITHUB_MCP_SERVER_TITLE` env vars or `github-mcp-server-config.json` |
1920

@@ -390,7 +391,7 @@ Lockdown mode ensures the server only surfaces content in public repositories fr
390391

391392
**Best for:** Users who want early access to experimental features and new tools before they reach general availability.
392393

393-
Insiders Mode unlocks experimental features, such as [MCP Apps](./insiders-features.md#mcp-apps) support. We created this mode to have a way to roll out experimental features and collect feedback. So if you are using Insiders, please don't hesitate to share your feedback with us! Features in Insiders Mode may change, evolve, or be removed based on user feedback.
394+
Insiders Mode unlocks experimental features, such as [MCP Apps](#mcp-apps) support. We created this mode to have a way to roll out experimental features and collect feedback. So if you are using Insiders, please don't hesitate to share your feedback with us! Features in Insiders Mode may change, evolve, or be removed based on user feedback.
394395

395396
<table>
396397
<tr><th>Remote Server</th><th>Local Server</th></tr>
@@ -443,6 +444,62 @@ See [Insiders Features](./insiders-features.md) for a full list of what's availa
443444

444445
---
445446

447+
### MCP Apps
448+
449+
[MCP Apps](https://modelcontextprotocol.io/docs/extensions/apps) is an extension to the Model Context Protocol that enables servers to deliver interactive user interfaces to end users. Instead of returning plain text that the LLM must interpret and relay, tools can render forms, profiles, and dashboards right in the chat.
450+
451+
MCP Apps is enabled by [Insiders Mode](#insiders-mode), or independently via the `remote_mcp_ui_apps` feature flag.
452+
453+
**Supported tools:**
454+
455+
| Tool | Description |
456+
|------|-------------|
457+
| `get_me` | Displays your GitHub user profile with avatar, bio, and stats in a rich card |
458+
| `issue_write` | Opens an interactive form to create or update issues |
459+
| `create_pull_request` | Provides a full PR creation form to create a pull request (or a draft pull request) |
460+
461+
**Client requirements:** MCP Apps requires a host that supports the [MCP Apps extension](https://modelcontextprotocol.io/docs/extensions/apps). Currently tested with VS Code (`chat.mcp.apps.enabled` setting).
462+
463+
<table>
464+
<tr><th>Remote Server</th><th>Local Server</th></tr>
465+
<tr valign="top">
466+
<td>
467+
468+
```json
469+
{
470+
"type": "http",
471+
"url": "https://api.githubcopilot.com/mcp/",
472+
"headers": {
473+
"X-MCP-Features": "remote_mcp_ui_apps"
474+
}
475+
}
476+
```
477+
478+
</td>
479+
<td>
480+
481+
```json
482+
{
483+
"type": "stdio",
484+
"command": "go",
485+
"args": [
486+
"run",
487+
"./cmd/github-mcp-server",
488+
"stdio",
489+
"--features=remote_mcp_ui_apps"
490+
],
491+
"env": {
492+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
493+
}
494+
}
495+
```
496+
497+
</td>
498+
</tr>
499+
</table>
500+
501+
---
502+
446503
### Scope Filtering
447504

448505
**Automatic feature:** The server handles OAuth scopes differently depending on authentication type:

go.mod

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/github/github-mcp-server
22

3-
go 1.24.0
3+
go 1.25.0
44

55
require (
66
github.com/go-chi/chi/v5 v5.2.5
77
github.com/go-viper/mapstructure/v2 v2.5.0
88
github.com/google/go-github/v82 v82.0.0
99
github.com/google/jsonschema-go v0.4.2
10-
github.com/josephburnett/jd/v2 v2.4.0
10+
github.com/josephburnett/jd/v2 v2.5.0
1111
github.com/lithammer/fuzzysearch v1.1.8
1212
github.com/microcosm-cc/bluemonday v1.0.27
13-
github.com/modelcontextprotocol/go-sdk v1.3.1-0.20260220105450-b17143f71798
13+
github.com/modelcontextprotocol/go-sdk v1.5.1-0.20260403154220-27f29c1cef3b
1414
github.com/muesli/cache2go v0.0.0-20221011235721-518229cd8021
1515
github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7
1616
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466
@@ -25,8 +25,6 @@ require (
2525
github.com/aymerick/douceur v0.2.0 // indirect
2626
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2727
github.com/fsnotify/fsnotify v1.9.0 // indirect
28-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
29-
github.com/go-openapi/swag v0.23.0 // indirect
3028
github.com/google/go-querystring v1.2.0 // indirect
3129
github.com/gorilla/css v1.0.1 // indirect
3230
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -37,17 +35,17 @@ require (
3735
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
3836
github.com/sagikazarmark/locafero v0.11.0 // indirect
3937
github.com/segmentio/asm v1.1.3 // indirect
40-
github.com/segmentio/encoding v0.5.3 // indirect
38+
github.com/segmentio/encoding v0.5.4 // indirect
4139
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
4240
github.com/spf13/afero v1.15.0 // indirect
4341
github.com/spf13/cast v1.10.0 // indirect
4442
github.com/stretchr/objx v0.5.2 // indirect
4543
github.com/subosito/gotenv v1.6.0 // indirect
4644
go.yaml.in/yaml/v3 v3.0.4 // indirect
47-
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
4845
golang.org/x/net v0.38.0 // indirect
49-
golang.org/x/oauth2 v0.34.0 // indirect
50-
golang.org/x/sys v0.40.0 // indirect
46+
golang.org/x/oauth2 v0.35.0 // indirect
47+
golang.org/x/sys v0.41.0 // indirect
5148
golang.org/x/text v0.28.0 // indirect
49+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
5250
gopkg.in/yaml.v3 v3.0.1 // indirect
5351
)

0 commit comments

Comments
 (0)