Skip to content

Commit 7009502

Browse files
committed
Merge remote-tracking branch 'upstream/main' into timrogers/issue-pr-tool-mapping
# Conflicts: # README.md # pkg/github/__toolsnaps__/issue_write.snap # pkg/github/issues.go
2 parents f456a5f + b2db21c commit 7009502

97 files changed

Lines changed: 10506 additions & 986 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.

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 4 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@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
57+
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.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@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
63+
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.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@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
73+
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
7474
with:
7575
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
7676
tags: |
@@ -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@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
109+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
110110
with:
111111
context: .
112112
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/mcp-diff.yml

Lines changed: 91 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,48 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121

22+
- name: Set up Go
23+
uses: actions/setup-go@v6
24+
with:
25+
go-version-file: go.mod
26+
2227
- name: Build UI
2328
uses: ./.github/actions/build-ui
2429

30+
- name: Stash UI artifacts for baseline checkout
31+
# mcp-server-diff checks the baseline ref out into a separate working
32+
# directory and runs install_command there. Without these prebuilt
33+
# artifacts, pkg/github/ui_dist/ would be empty on the baseline side
34+
# and UIAssetsAvailable() would return false, producing a false-positive
35+
# diff that "adds" _meta.ui to MCP Apps tools on every PR.
36+
run: |
37+
mkdir -p "${RUNNER_TEMP}/ui_dist"
38+
cp pkg/github/ui_dist/*.html "${RUNNER_TEMP}/ui_dist/"
39+
40+
- name: Generate diff configurations
41+
id: configs
42+
# The generator imports pkg/github so any new entry in
43+
# AllowedFeatureFlags is automatically diffed without touching this
44+
# workflow. See script/print-mcp-diff-configs/main.go.
45+
run: |
46+
{
47+
echo 'configurations<<MCP_DIFF_EOF'
48+
go run ./script/print-mcp-diff-configs
49+
echo 'MCP_DIFF_EOF'
50+
} >> "$GITHUB_OUTPUT"
51+
2552
- name: Run MCP Server Diff
2653
uses: SamMorrowDrums/mcp-server-diff@v2.3.5
2754
with:
28-
setup_go: "true"
29-
install_command: go mod download
55+
setup_go: "false"
56+
install_command: |
57+
go mod download
58+
mkdir -p pkg/github/ui_dist
59+
cp "${RUNNER_TEMP}"/ui_dist/*.html pkg/github/ui_dist/
3060
start_command: go run ./cmd/github-mcp-server stdio
3161
env_vars: |
3262
GITHUB_PERSONAL_ACCESS_TOKEN=test-token
33-
configurations: |
34-
[
35-
{"name": "default", "args": ""},
36-
{"name": "read-only", "args": "--read-only"},
37-
{"name": "toolsets-repos", "args": "--toolsets=repos"},
38-
{"name": "toolsets-issues", "args": "--toolsets=issues"},
39-
{"name": "toolsets-context", "args": "--toolsets=context"},
40-
{"name": "toolsets-pull_requests", "args": "--toolsets=pull_requests"},
41-
{"name": "toolsets-repos,issues", "args": "--toolsets=repos,issues"},
42-
{"name": "toolsets-issues,context", "args": "--toolsets=issues,context"},
43-
{"name": "toolsets-all", "args": "--toolsets=all"},
44-
{"name": "tools-get_me", "args": "--tools=get_me"},
45-
{"name": "tools-get_me,list_issues", "args": "--tools=get_me,list_issues"},
46-
{"name": "toolsets-repos+read-only", "args": "--toolsets=repos --read-only"}
47-
]
63+
configurations: ${{ steps.configs.outputs.configurations }}
4864

4965
- name: Add interpretation note
5066
if: always()
@@ -58,3 +74,61 @@ jobs:
5874
echo "- New tools/toolsets added" >> $GITHUB_STEP_SUMMARY
5975
echo "- Tool descriptions updated" >> $GITHUB_STEP_SUMMARY
6076
echo "- Capability changes (intentional improvements)" >> $GITHUB_STEP_SUMMARY
77+
78+
mcp-diff-http:
79+
runs-on: ubuntu-latest
80+
81+
steps:
82+
- name: Check out code
83+
uses: actions/checkout@v6
84+
with:
85+
fetch-depth: 0
86+
87+
- name: Set up Go
88+
uses: actions/setup-go@v6
89+
with:
90+
go-version-file: go.mod
91+
92+
- name: Build UI
93+
uses: ./.github/actions/build-ui
94+
95+
- name: Stash UI artifacts for baseline checkout
96+
# See the stdio job above for rationale: the action's baseline checkout
97+
# has no UI artifacts unless we hand them over via RUNNER_TEMP.
98+
run: |
99+
mkdir -p "${RUNNER_TEMP}/ui_dist"
100+
cp pkg/github/ui_dist/*.html "${RUNNER_TEMP}/ui_dist/"
101+
102+
- name: Generate diff configurations
103+
id: configs
104+
# See script/print-mcp-diff-configs/main.go. The http-headers variant
105+
# points every config at a shared HTTP server started by the action
106+
# and carries per-config settings via X-MCP-* headers, mirroring how
107+
# the remote server is invoked in production (server-side defaults +
108+
# per-user header overrides).
109+
run: |
110+
{
111+
echo 'configurations<<MCP_DIFF_EOF'
112+
go run ./script/print-mcp-diff-configs -transport http-headers
113+
echo 'MCP_DIFF_EOF'
114+
} >> "$GITHUB_OUTPUT"
115+
116+
- name: Run MCP Server Diff (streamable-http)
117+
uses: SamMorrowDrums/mcp-server-diff@v2.3.5
118+
with:
119+
setup_go: "false"
120+
install_command: |
121+
go mod download
122+
mkdir -p pkg/github/ui_dist
123+
cp "${RUNNER_TEMP}"/ui_dist/*.html pkg/github/ui_dist/
124+
http_start_command: go run ./cmd/github-mcp-server http --port 8082
125+
http_startup_wait_ms: "5000"
126+
configurations: ${{ steps.configs.outputs.configurations }}
127+
128+
- name: Add interpretation note
129+
if: always()
130+
run: |
131+
echo "" >> $GITHUB_STEP_SUMMARY
132+
echo "---" >> $GITHUB_STEP_SUMMARY
133+
echo "" >> $GITHUB_STEP_SUMMARY
134+
echo "ℹ️ **Note:** This job exercises the streamable-http transport against a shared server, with per-config settings supplied via X-MCP-* request headers." >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ bin/
1717
.DS_Store
1818

1919
# binary
20-
github-mcp-server
21-
mcpcurl
22-
e2e.test
20+
/github-mcp-server
21+
/mcpcurl
22+
/e2e.test
2323

2424
.history
2525
conformance-report/

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:26-alpine@sha256:e71ac5e964b9201072425d59d2e876359efa25dc96bb1768cb73295728d6e4ea AS ui-build
1+
FROM node:26-alpine@sha256:7c6af15abe4e3de859690e7db171d0d711bf37d27528eddfe625b2fe89e097f8 AS ui-build
22
WORKDIR /app
33
COPY ui/package*.json ./ui/
44
RUN cd ui && npm ci

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
8686
- **[Claude Applications](/docs/installation-guides/install-claude.md)** - Installation guide for Claude Desktop and Claude Code CLI
8787
- **[Codex](/docs/installation-guides/install-codex.md)** - Installation guide for OpenAI Codex
8888
- **[Cursor](/docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
89+
- **[OpenCode](/docs/installation-guides/install-opencode.md)** - Installation guide for the OpenCode terminal agent
8990
- **[Windsurf](/docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE
91+
- **[Zed](/docs/installation-guides/install-zed.md)** - Installation guide for Zed editor
9092
- **[Rovo Dev CLI](/docs/installation-guides/install-rovo-dev-cli.md)** - Installation guide for Rovo Dev CLI
9193

9294
> **Note:** Each MCP host application needs to configure a GitHub App or OAuth App to support remote access via OAuth. Any host application that supports remote MCP servers should support the remote GitHub server with PAT authentication. Configuration details and support levels vary by host. Make sure to refer to the host application's documentation for more info.
@@ -212,7 +214,7 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
212214

213215
```bash
214216
# CLI usage
215-
claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT
217+
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
216218

217219
# In config files (where supported)
218220
"env": {
@@ -356,7 +358,9 @@ For other MCP host applications, please refer to our installation guides:
356358
- **[Claude Code & Claude Desktop](docs/installation-guides/install-claude.md)** - Installation guide for Claude Code and Claude Desktop
357359
- **[Cursor](docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
358360
- **[Google Gemini CLI](docs/installation-guides/install-gemini-cli.md)** - Installation guide for Google Gemini CLI
361+
- **[OpenCode](docs/installation-guides/install-opencode.md)** - Installation guide for the OpenCode terminal agent
359362
- **[Windsurf](docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE
363+
- **[Zed](docs/installation-guides/install-zed.md)** - Installation guide for Zed editor
360364

361365
For a complete overview of all installation options, see our **[Installation Guides Index](docs/installation-guides)**.
362366

@@ -822,14 +826,14 @@ The following sets of tools are available:
822826

823827
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/issue-opened-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/issue-opened-light.png"><img src="pkg/octicons/icons/issue-opened-light.png" width="20" height="20" alt="issue-opened"></picture> Issues</summary>
824828

825-
- **add_issue_comment** - Add comment to issue or pull request
829+
- **add_issue_comment** - Add comment to issue
826830
- **Required OAuth Scopes**: `repo`
827831
- `body`: Comment content (string, required)
828832
- `issue_number`: Issue number to comment on (number, required)
829833
- `owner`: Repository owner (string, required)
830834
- `repo`: Repository name (string, required)
831835

832-
- **get_label** - Get a specific label from a repository.
836+
- **get_label** - Get a specific label from a repository
833837
- **Required OAuth Scopes**: `repo`
834838
- `name`: Label name. (string, required)
835839
- `owner`: Repository owner (username or organization name) (string, required)
@@ -919,13 +923,13 @@ The following sets of tools are available:
919923

920924
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/tag-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/tag-light.png"><img src="pkg/octicons/icons/tag-light.png" width="20" height="20" alt="tag"></picture> Labels</summary>
921925

922-
- **get_label** - Get a specific label from a repository.
926+
- **get_label** - Get a specific label from a repository
923927
- **Required OAuth Scopes**: `repo`
924928
- `name`: Label name. (string, required)
925929
- `owner`: Repository owner (username or organization name) (string, required)
926930
- `repo`: Repository name (string, required)
927931

928-
- **label_write** - Write operations on repository labels.
932+
- **label_write** - Write operations on repository labels
929933
- **Required OAuth Scopes**: `repo`
930934
- `color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
931935
- `description`: Label description text. Optional for 'create' and 'update'. (string, optional)
@@ -1028,22 +1032,26 @@ The following sets of tools are available:
10281032
- `project_number`: The project's number. Required for 'list_project_fields', 'list_project_items', and 'list_project_status_updates' methods. (number, optional)
10291033
- `query`: Filter/query string. For list_projects: filter by title text and state (e.g. "roadmap is:open"). For list_project_items: advanced filtering using GitHub's project filtering syntax. (string, optional)
10301034

1031-
- **projects_write** - Modify GitHub Project items
1035+
- **projects_write** - Manage GitHub Projects
10321036
- **Required OAuth Scopes**: `project`
10331037
- `body`: The body of the status update (markdown). Used for 'create_project_status_update' method. (string, optional)
1038+
- `field_name`: The name of the iteration field (e.g. 'Sprint'). Required for 'create_iteration_field' method. (string, optional)
10341039
- `issue_number`: The issue number (use when item_type is 'issue' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)
10351040
- `item_id`: The project item ID. Required for 'update_project_item' and 'delete_project_item' methods. (number, optional)
10361041
- `item_owner`: The owner (user or organization) of the repository containing the issue or pull request. Required for 'add_project_item' method. (string, optional)
10371042
- `item_repo`: The name of the repository containing the issue or pull request. Required for 'add_project_item' method. (string, optional)
10381043
- `item_type`: The item's type, either issue or pull_request. Required for 'add_project_item' method. (string, optional)
1044+
- `iteration_duration`: Duration in days for iterations of the field (e.g. 7 for weekly, 14 for bi-weekly). Required for 'create_iteration_field' method. (number, optional)
1045+
- `iterations`: Custom iterations for 'create_iteration_field' method. Only set this when you need iterations with varying durations, breaks between them, or specific titles. Otherwise omit it: GitHub auto-creates three iterations of 'iteration_duration' days starting on 'start_date', which is the right choice for most cases. (object[], optional)
10391046
- `method`: The method to execute (string, required)
10401047
- `owner`: The project owner (user or organization login). The name is not case sensitive. (string, required)
1041-
- `owner_type`: Owner type (user or org). If not provided, will be automatically detected. (string, optional)
1042-
- `project_number`: The project's number. (number, required)
1048+
- `owner_type`: Owner type (user or org). Required for 'create_project' method. If not provided for other methods, will be automatically detected. (string, optional)
1049+
- `project_number`: The project's number. Required for all methods except 'create_project'. (number, optional)
10431050
- `pull_request_number`: The pull request number (use when item_type is 'pull_request' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)
1044-
- `start_date`: The start date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)
1051+
- `start_date`: Start date in YYYY-MM-DD format. Used for 'create_project_status_update' and 'create_iteration_field' methods. (string, optional)
10451052
- `status`: The status of the project. Used for 'create_project_status_update' method. (string, optional)
10461053
- `target_date`: The target date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)
1054+
- `title`: The project title. Required for 'create_project' method. (string, optional)
10471055
- `updated_field`: Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set value to null. Example: {"id": 123456, "value": "New Value"}. Required for 'update_project_item' method. (object, optional)
10481056

10491057
</details>
@@ -1125,7 +1133,7 @@ The following sets of tools are available:
11251133
- `pullNumber`: Pull request number (number, required)
11261134
- `repo`: Repository name (string, required)
11271135

1128-
- **pull_request_review_write** - Write operations (create, submit, delete) on pull request reviews.
1136+
- **pull_request_review_write** - Write operations (create, submit, delete) on pull request reviews
11291137
- **Required OAuth Scopes**: `repo`
11301138
- `body`: Review comment text (string, optional)
11311139
- `commitID`: SHA of commit to review (string, optional)
@@ -1155,7 +1163,7 @@ The following sets of tools are available:
11551163
- `owner`: Repository owner (string, required)
11561164
- `pullNumber`: Pull request number to update (number, required)
11571165
- `repo`: Repository name (string, required)
1158-
- `reviewers`: GitHub usernames to request reviews from (string[], optional)
1166+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], optional)
11591167
- `state`: New state (string, optional)
11601168
- `title`: New title (string, optional)
11611169

@@ -1213,7 +1221,7 @@ The following sets of tools are available:
12131221

12141222
- **get_commit** - Get commit details
12151223
- **Required OAuth Scopes**: `repo`
1216-
- `include_diff`: Whether to include file diffs and stats in the response. Default is true. (boolean, optional)
1224+
- `detail`: Level of detail to include for changed files. "none" omits stats and files entirely. "stats" (default) includes per-file metadata: filename, status, and lines-of-code counts (additions, deletions, changes), with no patch content. "full_patch" additionally includes the unified diff content for each file and can be very large. (string, optional)
12171225
- `owner`: Repository owner (string, required)
12181226
- `page`: Page number for pagination (min 1) (number, optional)
12191227
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)

0 commit comments

Comments
 (0)