Skip to content

Commit 14fe0fb

Browse files
Merge branch 'main' into dependabot/go_modules/github.com/josephburnett/jd/v2-2.5.0
2 parents 4aa4dfe + 68e7371 commit 14fe0fb

File tree

97 files changed

+6766
-576
lines changed

Some content is hidden

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

97 files changed

+6766
-576
lines changed
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/code-scanning.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
category: /language:go
3636
build-mode: autobuild
3737
runner: '["ubuntu-22.04"]'
38+
- language: javascript
39+
category: /language:javascript
40+
build-mode: none
41+
runner: '["ubuntu-22.04"]'
3842
steps:
3943
- name: Checkout repository
4044
uses: actions/checkout@v6
@@ -75,7 +79,7 @@ jobs:
7579
cache: false
7680

7781
- name: Set up Node.js
78-
if: matrix.language == 'go'
82+
if: matrix.language == 'go' || matrix.language == 'javascript'
7983
uses: actions/setup-node@v4
8084
with:
8185
node-version: "20"

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,21 @@ jobs:
4646
# https://github.com/sigstore/cosign-installer
4747
- name: Install cosign
4848
if: github.event_name != 'pull_request'
49-
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad #v4.0.0
49+
uses: sigstore/cosign-installer@ba7bc0a3fef59531c69a25acd34668d6d3fe6f22 #v4.1.0
5050
with:
5151
cosign-release: "v2.2.4"
5252

5353
# Set up BuildKit Docker container builder to be able to build
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 }}
@@ -70,7 +70,7 @@ jobs:
7070
# https://github.com/docker/metadata-action
7171
- name: Extract Docker metadata
7272
id: meta
73-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
73+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
7474
with:
7575
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7676
tags: |
@@ -93,7 +93,7 @@ jobs:
9393
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
9494

9595
- name: Inject go-build-cache
96-
uses: reproducible-containers/buildkit-cache-dance@6f699a72a59e4252f05a7435430009b77e25fe06 # v3.3.1
96+
uses: reproducible-containers/buildkit-cache-dance@1b8ab18fbda5ad3646e3fcc9ed9dd41ce2f297b4 # v3.3.2
9797
with:
9898
cache-map: |
9999
{
@@ -106,7 +106,7 @@ jobs:
106106
# https://github.com/docker/build-push-action
107107
- name: Build and push Docker image
108108
id: build-and-push
109-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
109+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
110110
with:
111111
context: .
112112
push: ${{ github.event_name != 'pull_request' }}

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.7-alpine@sha256:f6751d823c26342f9506c03797d2527668d095b0a15f1862cddb4d927a7a4ced AS build
10+
FROM golang:1.25.8-alpine@sha256:8e02eb337d9e0ea459e041f1ee5eece41cbb61f1d83e7d883a3e2fb4862063fa 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: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ When no toolsets are specified, [default toolsets](#default-toolset) are used.
140140
</tr>
141141
</table>
142142

143-
See [Remote Server Documentation](docs/remote-server.md#insiders-mode) for more details and examples.
143+
See [Remote Server Documentation](docs/remote-server.md#insiders-mode) for more details and examples, and [Insiders Features](docs/insiders-features.md) for a full list of what's available.
144144

145145
#### GitHub Enterprise
146146

@@ -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

@@ -1097,11 +1097,12 @@ The following sets of tools are available:
10971097
Possible options:
10981098
1. get - Get details of a specific pull request.
10991099
2. get_diff - Get the diff of a pull request.
1100-
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
1100+
3. get_status - Get combined commit status of a head commit in a pull request.
11011101
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
11021102
5. get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns threads with metadata (isResolved, isOutdated, isCollapsed) and their associated comments. Use cursor-based pagination (perPage, after) to control results.
11031103
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
11041104
7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.
1105+
8. get_check_runs - Get check runs for the head commit of a pull request. Check runs are the individual CI/CD jobs and checks that run on the PR.
11051106
(string, required)
11061107
- `owner`: Repository owner (string, required)
11071108
- `page`: Page number for pagination (min 1) (number, optional)
@@ -1118,6 +1119,7 @@ The following sets of tools are available:
11181119
- `owner`: Repository owner (string, required)
11191120
- `pullNumber`: Pull request number (number, required)
11201121
- `repo`: Repository name (string, required)
1122+
- `threadId`: The node ID of the review thread (e.g., PRRT_kwDOxxx). Required for resolve_thread and unresolve_thread methods. Get thread IDs from pull_request_read with method get_review_comments. (string, optional)
11211123

11221124
- **search_pull_requests** - Search pull requests
11231125
- **Required OAuth Scopes**: `repo`
@@ -1170,7 +1172,7 @@ The following sets of tools are available:
11701172
- `owner`: Repository owner (username or organization) (string, required)
11711173
- `path`: Path where to create/update the file (string, required)
11721174
- `repo`: Repository name (string, required)
1173-
- `sha`: The blob SHA of the file being replaced. (string, optional)
1175+
- `sha`: The blob SHA of the file being replaced. Required if the file already exists. (string, optional)
11741176

11751177
- **create_repository** - Create repository
11761178
- **Required OAuth Scopes**: `repo`
@@ -1240,9 +1242,12 @@ The following sets of tools are available:
12401242
- `author`: Author username or email address to filter commits by (string, optional)
12411243
- `owner`: Repository owner (string, required)
12421244
- `page`: Page number for pagination (min 1) (number, optional)
1245+
- `path`: Only commits containing this file path will be returned (string, optional)
12431246
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
12441247
- `repo`: Repository name (string, required)
12451248
- `sha`: Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)
1249+
- `since`: Only commits after this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) (string, optional)
1250+
- `until`: Only commits before this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) (string, optional)
12461251

12471252
- **list_releases** - List releases
12481253
- **Required OAuth Scopes**: `repo`
@@ -1535,6 +1540,34 @@ set the following environment variable:
15351540
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
15361541
```
15371542

1543+
### Overriding Server Name and Title
1544+
1545+
The same override mechanism can be used to customize the MCP server's `name` and
1546+
`title` fields in the initialization response. This is useful when running
1547+
multiple GitHub MCP Server instances (e.g., one for github.com and one for
1548+
GitHub Enterprise Server) so that agents can distinguish between them.
1549+
1550+
| Key | Environment Variable | Default |
1551+
|-----|---------------------|---------|
1552+
| `SERVER_NAME` | `GITHUB_MCP_SERVER_NAME` | `github-mcp-server` |
1553+
| `SERVER_TITLE` | `GITHUB_MCP_SERVER_TITLE` | `GitHub MCP Server` |
1554+
1555+
For example, to configure a server instance for GitHub Enterprise Server:
1556+
1557+
```json
1558+
{
1559+
"SERVER_NAME": "ghes-mcp-server",
1560+
"SERVER_TITLE": "GHES MCP Server"
1561+
}
1562+
```
1563+
1564+
Or using environment variables:
1565+
1566+
```sh
1567+
export GITHUB_MCP_SERVER_NAME="ghes-mcp-server"
1568+
export GITHUB_MCP_SERVER_TITLE="GHES MCP Server"
1569+
```
1570+
15381571
## Library Usage
15391572

15401573
The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.

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/insiders-features.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Insiders Features
2+
3+
Insiders Mode gives you access to experimental features in the GitHub MCP Server. These features may change, evolve, or be removed based on community feedback.
4+
5+
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!
6+
7+
> [!NOTE]
8+
> Features in Insiders Mode are experimental.
9+
10+
## Enabling Insiders Mode
11+
12+
| Method | Remote Server | Local Server |
13+
|--------|---------------|--------------|
14+
| URL path | Append `/insiders` to the URL | N/A |
15+
| Header | `X-MCP-Insiders: true` | N/A |
16+
| CLI flag | N/A | `--insiders` |
17+
| Environment variable | N/A | `GITHUB_INSIDERS=true` |
18+
19+
For configuration examples, see the [Server Configuration Guide](./server-configuration.md#insiders-mode).
20+
21+
---
22+
23+
## MCP Apps
24+
25+
[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 using MCP Apps.
26+
27+
This means you can interact with GitHub visually: fill out forms to create issues, see user profiles with avatars, open pull requests — all without leaving your agent chat.
28+
29+
### Supported tools
30+
31+
The following tools have MCP Apps UIs:
32+
33+
| Tool | Description |
34+
|------|-------------|
35+
| `get_me` | Displays your GitHub user profile with avatar, bio, and stats in a rich card |
36+
| `issue_write` | Opens an interactive form to create or update issues |
37+
| `create_pull_request` | Provides a full PR creation form to create a pull request (or a draft pull request) |
38+
39+
### Client requirements
40+
41+
MCP Apps requires a host that supports the [MCP Apps extension](https://modelcontextprotocol.io/docs/extensions/apps). Currently tested and working with:
42+
43+
- **VS Code Insiders** — enable via the `chat.mcp.apps.enabled` setting
44+
- **Visual Studio Code** — enable via the `chat.mcp.apps.enabled` setting

docs/installation-guides/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ This directory contains detailed installation instructions for the GitHub MCP Se
77
- **[GitHub Copilot in other IDEs](install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
88
- **[Antigravity](install-antigravity.md)** - Installation for Google Antigravity IDE
99
- **[Claude Applications](install-claude.md)** - Installation guide for Claude Web, Claude Desktop and Claude Code CLI
10+
- **[Cline](install-cline.md)** - Installation guide for Cline
1011
- **[Cursor](install-cursor.md)** - Installation guide for Cursor IDE
1112
- **[Google Gemini CLI](install-gemini-cli.md)** - Installation guide for Google Gemini CLI
1213
- **[OpenAI Codex](install-codex.md)** - Installation guide for OpenAI Codex
14+
- **[Roo Code](install-roo-code.md)** - Installation guide for Roo Code
1315
- **[Windsurf](install-windsurf.md)** - Installation guide for Windsurf IDE
1416

1517
## Support by Host Application
@@ -23,8 +25,10 @@ This directory contains detailed installation instructions for the GitHub MCP Se
2325
| Copilot in JetBrains || ✅ Full (OAuth + PAT) | Local: Docker or Go build, GitHub PAT<br>Remote: JetBrains Copilot Extension v1.5.53+ | Easy |
2426
| Claude Code || ✅ PAT + ❌ No OAuth| GitHub MCP Server binary or remote URL, GitHub PAT | Easy |
2527
| Claude Desktop || ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Moderate |
28+
| Cline || ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy |
2629
| Cursor || ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy |
2730
| Google Gemini CLI || ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy |
31+
| Roo Code || ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy |
2832
| Windsurf || ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy |
2933
| Copilot in Xcode || ✅ Full (OAuth + PAT) | Local: Docker or Go build, GitHub PAT<br>Remote: Copilot for Xcode 0.41.0+ | Easy |
3034
| Copilot in Eclipse || ✅ Full (OAuth + PAT) | Local: Docker or Go build, GitHub PAT<br>Remote: Eclipse Plug-in for Copilot 0.10.0+ | Easy |
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Install GitHub MCP Server in Cline
2+
3+
[Cline](https://github.com/cline/cline) is an AI coding assistant that runs in VS Code-compatible editors (VS Code, Cursor, Windsurf, etc.). For general setup information (prerequisites, Docker installation, security best practices), see the [Installation Guides README](./README.md).
4+
5+
## Remote Server
6+
7+
Cline stores MCP settings in `cline_mcp_settings.json`. To edit it, click the Cline icon in your editor's sidebar, open the menu in the top right corner of the Cline panel, and select **"MCP Servers"**. You can add a remote server through the **"Remote Servers"** tab, or click **"Configure MCP Servers"** to edit the JSON directly.
8+
9+
```json
10+
{
11+
"mcpServers": {
12+
"github": {
13+
"url": "https://api.githubcopilot.com/mcp/",
14+
"type": "streamableHttp",
15+
"disabled": false,
16+
"headers": {
17+
"Authorization": "Bearer <YOUR_GITHUB_PAT>"
18+
},
19+
"autoApprove": []
20+
}
21+
}
22+
}
23+
```
24+
25+
Replace `YOUR_GITHUB_PAT` with your [GitHub Personal Access Token](https://github.com/settings/tokens). To customize toolsets, add server-side headers like `X-MCP-Toolsets` or `X-MCP-Readonly` to the `headers` object — see [Server Configuration Guide](../server-configuration.md).
26+
27+
> **Important:** The transport type must be `"streamableHttp"` (camelCase, no hyphen). Using `"streamable-http"` or omitting the type will cause Cline to fall back to SSE, resulting in a `405` error.
28+
29+
## Local Server (Docker)
30+
31+
1. Click the Cline icon in your editor's sidebar (or open the command palette and search for "Cline"), then click the **MCP Servers** icon (server stack icon at the top of the Cline panel), and click **"Configure MCP Servers"** to open `cline_mcp_settings.json`.
32+
2. Add the configuration below, replacing `YOUR_GITHUB_PAT` with your [GitHub Personal Access Token](https://github.com/settings/tokens).
33+
34+
```json
35+
{
36+
"mcpServers": {
37+
"github": {
38+
"command": "docker",
39+
"args": [
40+
"run", "-i", "--rm",
41+
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
42+
"ghcr.io/github/github-mcp-server"
43+
],
44+
"env": {
45+
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
46+
}
47+
}
48+
}
49+
}
50+
```
51+
52+
## Troubleshooting
53+
54+
- **SSE error 405 with remote server**: Ensure `"type"` is set to `"streamableHttp"` (camelCase, no hyphen) in `cline_mcp_settings.json`. Using `"streamable-http"` or omitting `"type"` causes Cline to fall back to SSE, which this server does not support.
55+
- **Authentication failures**: Verify your PAT has the required scopes
56+
- **Docker issues**: Ensure Docker Desktop is installed and running

0 commit comments

Comments
 (0)