Skip to content

Commit a7c37a7

Browse files
Merge branch 'main' into search-commit
2 parents 546fdbf + 7fd6a92 commit a7c37a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4538
-856
lines changed

.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
@@ -54,13 +54,13 @@ jobs:
5454
# multi-platform images and export cache
5555
# https://github.com/docker/setup-buildx-action
5656
- name: Set up Docker Buildx
57-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
57+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
5858

5959
# Login against a Docker registry except on PR
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 }}

Dockerfile

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

10-
FROM golang:1.25.8-alpine@sha256:8e02eb337d9e0ea459e041f1ee5eece41cbb61f1d83e7d883a3e2fb4862063fa AS build
10+
FROM golang:1.25.9-alpine@sha256:04d017a27c481185c169884328a5761d052910fdced8c3b8edd686474efdf59b AS build
1111
ARG VERSION="dev"
1212

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

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

3535
# Add required MCP server annotation
3636
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 & 11 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,28 +25,24 @@ 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
33-
github.com/josharian/intern v1.0.0 // indirect
34-
github.com/mailru/easyjson v0.7.7 // indirect
3531
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
3632
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
3733
github.com/sagikazarmark/locafero v0.11.0 // indirect
3834
github.com/segmentio/asm v1.1.3 // indirect
39-
github.com/segmentio/encoding v0.5.3 // indirect
35+
github.com/segmentio/encoding v0.5.4 // indirect
4036
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
4137
github.com/spf13/afero v1.15.0 // indirect
4238
github.com/spf13/cast v1.10.0 // indirect
4339
github.com/stretchr/objx v0.5.2 // indirect
4440
github.com/subosito/gotenv v1.6.0 // indirect
4541
go.yaml.in/yaml/v3 v3.0.4 // indirect
46-
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
4742
golang.org/x/net v0.38.0 // indirect
48-
golang.org/x/oauth2 v0.34.0 // indirect
49-
golang.org/x/sys v0.40.0 // indirect
43+
golang.org/x/oauth2 v0.35.0 // indirect
44+
golang.org/x/sys v0.41.0 // indirect
5045
golang.org/x/text v0.28.0 // indirect
46+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
5147
gopkg.in/yaml.v3 v3.0.1 // indirect
5248
)

0 commit comments

Comments
 (0)