Skip to content

Commit 33b8ce3

Browse files
authored
Merge branch 'main' into fix-get-me-empty-arguments
2 parents f8eac9d + 4e8eb81 commit 33b8ce3

37 files changed

Lines changed: 5024 additions & 449 deletions

.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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ The following sets of tools are available:
10901090
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
10911091
- `owner`: Repository owner (string, required)
10921092
- `repo`: Repository name (string, required)
1093+
- `reviewers`: GitHub usernames or ORG/team-slug team reviewers to request reviews from (string[], optional)
10931094
- `title`: PR title (string, required)
10941095

10951096
- **list_pull_requests** - List pull requests
@@ -1204,7 +1205,7 @@ The following sets of tools are available:
12041205
- `description`: Repository description (string, optional)
12051206
- `name`: Repository name (string, required)
12061207
- `organization`: Organization to create the repository in (omit to create in your personal account) (string, optional)
1207-
- `private`: Whether repo should be private (boolean, optional)
1208+
- `private`: Whether the repository should be private. Defaults to true (private) when omitted. (boolean, optional)
12081209

12091210
- **delete_file** - Delete file
12101211
- **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
@@ -257,6 +257,8 @@ func writeToolDoc(buf *strings.Builder, tool inventory.ServerTool) {
257257
}
258258
sort.Strings(paramNames)
259259

260+
conditional := inventory.ConditionalSchemaPropertyDescriptions()
261+
260262
for i, propName := range paramNames {
261263
prop := schema.Properties[propName]
262264
required := slices.Contains(schema.Required, propName)
@@ -282,7 +284,11 @@ func writeToolDoc(buf *strings.Builder, tool inventory.ServerTool) {
282284
// Indent any continuation lines in the description to maintain markdown formatting
283285
description := indentMultilineDescription(prop.Description, " ")
284286

285-
fmt.Fprintf(buf, " - `%s`: %s (%s, %s)", propName, description, typeStr, requiredStr)
287+
if cond, isConditional := conditional[propName]; isConditional {
288+
fmt.Fprintf(buf, " - `%s`: %s (%s, %s, conditional — %s)", propName, description, typeStr, requiredStr, cond)
289+
} else {
290+
fmt.Fprintf(buf, " - `%s`: %s (%s, %s)", propName, description, typeStr, requiredStr)
291+
}
286292
if i < len(paramNames)-1 {
287293
buf.WriteString("\n")
288294
}

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: 24 additions & 0 deletions
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 the repository has issue types configured. Use list_issue_types tool to get valid type values for the 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

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 the repository has issue types configured. Use list_issue_types tool to get valid type values for the 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

pkg/github/__toolsnaps__/create_pull_request.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@
4242
"description": "Repository name",
4343
"type": "string"
4444
},
45+
"reviewers": {
46+
"description": "GitHub usernames or ORG/team-slug team reviewers to request reviews from",
47+
"items": {
48+
"type": "string"
49+
},
50+
"type": "array"
51+
},
52+
"show_ui": {
53+
"description": "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.",
54+
"type": "boolean"
55+
},
4556
"title": {
4657
"description": "PR title",
4758
"type": "string"

pkg/github/__toolsnaps__/create_repository.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"type": "string"
2323
},
2424
"private": {
25-
"description": "Whether repo should be private",
25+
"default": true,
26+
"description": "Whether the repository should be private. Defaults to true (private) when omitted.",
2627
"type": "boolean"
2728
}
2829
},

pkg/github/__toolsnaps__/issue_write.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
"description": "Repository name",
6161
"type": "string"
6262
},
63+
"show_ui": {
64+
"description": "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.",
65+
"type": "boolean"
66+
},
6367
"state": {
6468
"description": "New state",
6569
"enum": [

0 commit comments

Comments
 (0)