Skip to content

Commit a58ac0d

Browse files
authored
Merge branch 'main' into km/list-issue-types-repo-scope
2 parents 9fa8dce + 6830c4d commit a58ac0d

60 files changed

Lines changed: 6081 additions & 684 deletions

Some content is hidden

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

.github/actions/build-ui/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ runs:
1212
pkg/github/ui_dist/get-me.html
1313
pkg/github/ui_dist/issue-write.html
1414
pkg/github/ui_dist/pr-write.html
15-
key: ui-dist-v1-${{ hashFiles('ui/package-lock.json', 'ui/package.json', 'ui/index.html', 'ui/tsconfig*.json', 'ui/vite.config.ts', 'ui/src/**', 'ui/scripts/**') }}
15+
pkg/github/ui_dist/pr-edit.html
16+
key: ui-dist-v2-${{ hashFiles('ui/package-lock.json', 'ui/package.json', 'ui/index.html', 'ui/tsconfig*.json', 'ui/vite.config.ts', 'ui/src/**', 'ui/scripts/**') }}
1617
enableCrossOsArchive: true
1718

1819
- name: Set up Node.js

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:26-alpine@sha256:144769ec3f32e8ee36b3cfde91e82bee25d9367b20f31a151f3f7eea3a2a8541 AS ui-build
1+
FROM node:26-alpine@sha256:3ad34ca6292aec4a91d8ddeb9229e29d9c2f689efd0dd242860889ac71842eba AS ui-build
22
WORKDIR /app
33
COPY ui/package*.json ./ui/
44
RUN cd ui && npm ci
@@ -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.11-alpine@sha256:cd2fb3559df6e13bc93b7f0734a4eabe1d21e7b64eec211ed90784f00a17a56a AS build
10+
FROM golang:1.25.11-alpine@sha256:8d95af53d0d58e1759ddb4028285d9b1239067e4fbf4f544618cad0f60fbc354 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:58695f439f772a00009c8f6be4c183f824c1f556d74b313c30900f167e4772f8
33+
FROM gcr.io/distroless/base-debian12@sha256:e7e678c88c59e70e105a46549bb3fbfb3d732ee3b4afd3a19fdab2e15afaa6b3
3434

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

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ The following sets of tools are available:
555555
| --- | ----------------------- | ------------------------------------------------------------- |
556556
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/person-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/person-light.png"><img src="pkg/octicons/icons/person-light.png" width="20" height="20" alt="person"></picture> | `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |
557557
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/workflow-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/workflow-light.png"><img src="pkg/octicons/icons/workflow-light.png" width="20" height="20" alt="workflow"></picture> | `actions` | GitHub Actions workflows and CI/CD operations |
558+
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/code-square-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/code-square-light.png"><img src="pkg/octicons/icons/code-square-light.png" width="20" height="20" alt="code-square"></picture> | `code_quality` | GitHub Code Quality related tools |
558559
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/codescan-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/codescan-light.png"><img src="pkg/octicons/icons/codescan-light.png" width="20" height="20" alt="codescan"></picture> | `code_security` | Code security related tools, such as GitHub Code Scanning |
559560
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/copilot-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/copilot-light.png"><img src="pkg/octicons/icons/copilot-light.png" width="20" height="20" alt="copilot"></picture> | `copilot` | Copilot related tools |
560561
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/dependabot-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/dependabot-light.png"><img src="pkg/octicons/icons/dependabot-light.png" width="20" height="20" alt="dependabot"></picture> | `dependabot` | Dependabot tools |
@@ -640,6 +641,18 @@ The following sets of tools are available:
640641

641642
<details>
642643

644+
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/code-square-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/code-square-light.png"><img src="pkg/octicons/icons/code-square-light.png" width="20" height="20" alt="code-square"></picture> Code Quality</summary>
645+
646+
- **get_code_quality_finding** - Get code quality finding
647+
- **Required OAuth Scopes**: `repo`
648+
- `findingNumber`: The number of the finding. (number, required)
649+
- `owner`: The owner of the repository. (string, required)
650+
- `repo`: The name of the repository. (string, required)
651+
652+
</details>
653+
654+
<details>
655+
643656
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/codescan-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/codescan-light.png"><img src="pkg/octicons/icons/codescan-light.png" width="20" height="20" alt="codescan"></picture> Code Security</summary>
644657

645658
- **get_code_scanning_alert** - Get code scanning alert
@@ -1091,6 +1104,7 @@ The following sets of tools are available:
10911104
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
10921105
- `owner`: Repository owner (string, required)
10931106
- `repo`: Repository name (string, required)
1107+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], optional)
10941108
- `title`: PR title (string, required)
10951109

10961110
- **list_pull_requests** - List pull requests
@@ -1205,7 +1219,7 @@ The following sets of tools are available:
12051219
- `description`: Repository description (string, optional)
12061220
- `name`: Repository name (string, required)
12071221
- `organization`: Organization to create the repository in (omit to create in your personal account) (string, optional)
1208-
- `private`: Whether repo should be private (boolean, optional)
1222+
- `private`: Whether the repository should be private. Defaults to true (private) when omitted. (boolean, optional)
12091223

12101224
- **delete_file** - Delete file
12111225
- **Required OAuth Scopes**: `repo`

cmd/github-mcp-server/generate_docs.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ func writeToolDoc(buf *strings.Builder, tool inventory.ServerTool) {
265265
}
266266
sort.Strings(paramNames)
267267

268+
conditional := inventory.ConditionalSchemaPropertyDescriptions()
269+
268270
for i, propName := range paramNames {
269271
prop := schema.Properties[propName]
270272
required := slices.Contains(schema.Required, propName)
@@ -290,7 +292,11 @@ func writeToolDoc(buf *strings.Builder, tool inventory.ServerTool) {
290292
// Indent any continuation lines in the description to maintain markdown formatting
291293
description := indentMultilineDescription(prop.Description, " ")
292294

293-
fmt.Fprintf(buf, " - `%s`: %s (%s, %s)", propName, description, typeStr, requiredStr)
295+
if cond, isConditional := conditional[propName]; isConditional {
296+
fmt.Fprintf(buf, " - `%s`: %s (%s, %s, conditional — %s)", propName, description, typeStr, requiredStr, cond)
297+
} else {
298+
fmt.Fprintf(buf, " - `%s`: %s (%s, %s)", propName, description, typeStr, requiredStr)
299+
}
294300
if i < len(paramNames)-1 {
295301
buf.WriteString("\n")
296302
}

cmd/github-mcp-server/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ var (
138138
Version: version,
139139
Host: viper.GetString("host"),
140140
Port: viper.GetInt("port"),
141+
ListenHost: viper.GetString("listen-host"),
141142
BaseURL: viper.GetString("base-url"),
142143
ResourcePath: viper.GetString("base-path"),
143144
ExportTranslations: viper.GetBool("export-translations"),
@@ -184,6 +185,7 @@ func init() {
184185

185186
// HTTP-specific flags
186187
httpCmd.Flags().Int("port", 8082, "HTTP server port")
188+
httpCmd.Flags().String("listen-host", "", "Host the HTTP server binds to (e.g. 127.0.0.1). Empty binds to all interfaces.")
187189
httpCmd.Flags().String("base-url", "", "Base URL where this server is publicly accessible (for OAuth resource metadata)")
188190
httpCmd.Flags().String("base-path", "", "Externally visible base path for the HTTP server (for OAuth resource metadata)")
189191
httpCmd.Flags().Bool("scope-challenge", false, "Enable OAuth scope challenge responses")
@@ -204,6 +206,7 @@ func init() {
204206
_ = viper.BindPFlag("insiders", rootCmd.PersistentFlags().Lookup("insiders"))
205207
_ = viper.BindPFlag("repo-access-cache-ttl", rootCmd.PersistentFlags().Lookup("repo-access-cache-ttl"))
206208
_ = viper.BindPFlag("port", httpCmd.Flags().Lookup("port"))
209+
_ = viper.BindPFlag("listen-host", httpCmd.Flags().Lookup("listen-host"))
207210
_ = viper.BindPFlag("base-url", httpCmd.Flags().Lookup("base-url"))
208211
_ = viper.BindPFlag("base-path", httpCmd.Flags().Lookup("base-path"))
209212
_ = viper.BindPFlag("scope-challenge", httpCmd.Flags().Lookup("scope-challenge"))

docs/feature-flags.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ runtime behavior (such as output formatting) won't appear here.
4444
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
4545
- `owner`: Repository owner (string, required)
4646
- `repo`: Repository name (string, required)
47+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], optional)
48+
- `show_ui`: Whether to render the MCP App form instead of executing the request immediately. Defaults to true. Set to false to skip the form and execute directly — useful when you have all required values (especially ones the form does not collect, like reviewers) and the user has already confirmed the action. (boolean, optional, conditional — visible when remote_mcp_ui_apps is enabled unless the client explicitly indicates it does not support io.modelcontextprotocol/ui)
4749
- `title`: PR title (string, required)
4850

4951
- **get_me** - Get my user profile
@@ -66,11 +68,33 @@ runtime behavior (such as output formatting) won't appear here.
6668
- `milestone`: Milestone number (number, optional)
6769
- `owner`: Repository owner (string, required)
6870
- `repo`: Repository name (string, required)
71+
- `show_ui`: Whether to render the MCP App form instead of executing the request immediately. Defaults to true. Set to false to skip the form and execute directly — useful when you have all required values (especially ones the form does not collect, like labels, assignees, milestone, type, or state changes) and the user has already confirmed the action. (boolean, optional, conditional — visible when remote_mcp_ui_apps is enabled unless the client explicitly indicates it does not support io.modelcontextprotocol/ui)
6972
- `state`: New state (string, optional)
7073
- `state_reason`: Reason for the state change. Ignored unless state is changed. (string, optional)
7174
- `title`: Issue title (string, optional)
7275
- `type`: Type of this issue. Only use if issue types are enabled for this repository. Use list_issue_types tool to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string, optional)
7376

77+
- **ui_get** - Get UI data
78+
- **Required OAuth Scopes**: `repo`, `read:org`
79+
- **Accepted OAuth Scopes**: `admin:org`, `read:org`, `repo`, `write:org`
80+
- `method`: The type of data to fetch (string, required)
81+
- `owner`: Repository owner (required for all methods) (string, required)
82+
- `repo`: Repository name (required for labels, assignees, milestones, branches, issue fields, reviewers) (string, optional)
83+
84+
- **update_pull_request** - Edit pull request
85+
- **Required OAuth Scopes**: `repo`
86+
- **MCP App UI**: `ui://github-mcp-server/pr-edit`
87+
- `base`: New base branch name (string, optional)
88+
- `body`: New description (string, optional)
89+
- `draft`: Mark pull request as draft (true) or ready for review (false) (boolean, optional)
90+
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
91+
- `owner`: Repository owner (string, required)
92+
- `pullNumber`: Pull request number to update (number, required)
93+
- `repo`: Repository name (string, required)
94+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], optional)
95+
- `state`: New state (string, optional)
96+
- `title`: New title (string, optional)
97+
7498
### `remote_mcp_issue_fields`
7599

76100
- **issue_write** - Create or update issue/pull request
@@ -198,7 +222,7 @@ runtime behavior (such as output formatting) won't appear here.
198222

199223
- **update_issue_type** - Update Issue Type
200224
- **Required OAuth Scopes**: `repo`
201-
- `confidence`: How confident you are in this choice. Use 'high' for clear signal or explicit user request, 'medium' for reasonable inference with some ambiguity, 'low' for best guess with limited signal. (string, optional)
225+
- `confidence`: How confident you are in this choice. Use 'HIGH' for clear signal or explicit user request, 'MEDIUM' for reasonable inference with some ambiguity, 'LOW' for best guess with limited signal. (string, optional)
202226
- `is_suggestion`: If true, this issue type change is sent to the API as a suggestion (suggest:true) rather than an applied value. Whether the type is applied or recorded as a proposal is determined by the API. (boolean, optional)
203227
- `issue_number`: The issue number to update (number, required)
204228
- `issue_type`: The issue type to set (string, required)

docs/insiders-features.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ The list below is generated from the Go source. It covers tool **inventory and s
3838
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
3939
- `owner`: Repository owner (string, required)
4040
- `repo`: Repository name (string, required)
41+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], optional)
42+
- `show_ui`: Whether to render the MCP App form instead of executing the request immediately. Defaults to true. Set to false to skip the form and execute directly — useful when you have all required values (especially ones the form does not collect, like reviewers) and the user has already confirmed the action. (boolean, optional, conditional — visible when remote_mcp_ui_apps is enabled unless the client explicitly indicates it does not support io.modelcontextprotocol/ui)
4143
- `title`: PR title (string, required)
4244

4345
- **get_me** - Get my user profile
@@ -60,11 +62,33 @@ The list below is generated from the Go source. It covers tool **inventory and s
6062
- `milestone`: Milestone number (number, optional)
6163
- `owner`: Repository owner (string, required)
6264
- `repo`: Repository name (string, required)
65+
- `show_ui`: Whether to render the MCP App form instead of executing the request immediately. Defaults to true. Set to false to skip the form and execute directly — useful when you have all required values (especially ones the form does not collect, like labels, assignees, milestone, type, or state changes) and the user has already confirmed the action. (boolean, optional, conditional — visible when remote_mcp_ui_apps is enabled unless the client explicitly indicates it does not support io.modelcontextprotocol/ui)
6366
- `state`: New state (string, optional)
6467
- `state_reason`: Reason for the state change. Ignored unless state is changed. (string, optional)
6568
- `title`: Issue title (string, optional)
6669
- `type`: Type of this issue. Only use if issue types are enabled for this repository. Use list_issue_types tool to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string, optional)
6770

71+
- **ui_get** - Get UI data
72+
- **Required OAuth Scopes**: `repo`, `read:org`
73+
- **Accepted OAuth Scopes**: `admin:org`, `read:org`, `repo`, `write:org`
74+
- `method`: The type of data to fetch (string, required)
75+
- `owner`: Repository owner (required for all methods) (string, required)
76+
- `repo`: Repository name (required for labels, assignees, milestones, branches, issue fields, reviewers) (string, optional)
77+
78+
- **update_pull_request** - Edit pull request
79+
- **Required OAuth Scopes**: `repo`
80+
- **MCP App UI**: `ui://github-mcp-server/pr-edit`
81+
- `base`: New base branch name (string, optional)
82+
- `body`: New description (string, optional)
83+
- `draft`: Mark pull request as draft (true) or ready for review (false) (boolean, optional)
84+
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
85+
- `owner`: Repository owner (string, required)
86+
- `pullNumber`: Pull request number to update (number, required)
87+
- `repo`: Repository name (string, required)
88+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], optional)
89+
- `state`: New state (string, optional)
90+
- `title`: New title (string, optional)
91+
6892
### `remote_mcp_issue_fields`
6993

7094
- **issue_write** - Create or update issue/pull request

0 commit comments

Comments
 (0)