Skip to content

Commit 4a488cc

Browse files
authored
Merge branch 'main' into rosstarrant/add-discussion-comment-write-ops
2 parents 0a37d35 + 46d220f commit 4a488cc

35 files changed

Lines changed: 2182 additions & 155 deletions

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ The following sets of tools are available:
11181118
3. get_status - Get combined commit status of a head commit in a pull request.
11191119
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
11201120
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.
1121-
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
1121+
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method. Use with pagination parameters to control the number of results returned.
11221122
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.
11231123
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.
11241124
(string, required)
@@ -1274,6 +1274,14 @@ The following sets of tools are available:
12741274
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
12751275
- `repo`: Repository name (string, required)
12761276

1277+
- **list_repository_collaborators** - List repository collaborators
1278+
- **Required OAuth Scopes**: `repo`
1279+
- `affiliation`: Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all' (string, optional)
1280+
- `owner`: Repository owner (string, required)
1281+
- `page`: Page number for pagination (default 1, min 1) (number, optional)
1282+
- `perPage`: Results per page for pagination (default 30, min 1, max 100) (number, optional)
1283+
- `repo`: Repository name (string, required)
1284+
12771285
- **list_tags** - List tags
12781286
- **Required OAuth Scopes**: `repo`
12791287
- `owner`: Repository owner (string, required)
@@ -1431,6 +1439,11 @@ The following sets of tools are available:
14311439

14321440
<summary>Copilot Spaces</summary>
14331441

1442+
- **Authentication note**
1443+
- Fine-grained PATs are not hidden by classic PAT scope filtering, so these tools may still appear even when the token cannot use them.
1444+
- For org-owned spaces, fine-grained PATs must be installed on the owning organization and include `organization_copilot_spaces: read`.
1445+
- If an org-owned space contains repository-backed resources, the token must also have access to every referenced repository or the space may be treated as not found.
1446+
14341447
- **get_copilot_space** - Get Copilot Space
14351448
- `owner`: The owner of the space. (string, required)
14361449
- `name`: The name of the space. (string, required)

docs/installation-guides/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This directory contains detailed installation instructions for the GitHub MCP Se
1313
- **[OpenAI Codex](install-codex.md)** - Installation guide for OpenAI Codex
1414
- **[Roo Code](install-roo-code.md)** - Installation guide for Roo Code
1515
- **[Windsurf](install-windsurf.md)** - Installation guide for Windsurf IDE
16+
- **[Xcode (Codex & Claude Agent)](install-xcode.md)** - Installation guide for Codex and Claude Agent within Xcode
1617

1718
## Support by Host Application
1819

@@ -32,6 +33,8 @@ This directory contains detailed installation instructions for the GitHub MCP Se
3233
| Windsurf || ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy |
3334
| Copilot in Xcode || ✅ Full (OAuth + PAT) | Local: Docker or Go build, GitHub PAT<br>Remote: Copilot for Xcode 0.41.0+ | Easy |
3435
| Copilot in Eclipse || ✅ Full (OAuth + PAT) | Local: Docker or Go build, GitHub PAT<br>Remote: Eclipse Plug-in for Copilot 0.10.0+ | Easy |
36+
| Xcode (Codex) || ✅ PAT + ❌ No OAuth | Local: Docker (full path required), GitHub PAT<br>Remote: GitHub PAT via `GITHUB_PAT_TOKEN` env var (`bearer_token_env_var`) | Easy |
37+
| Xcode (Claude Agent) || ✅ PAT + ❌ No OAuth | Local: Docker (full path required), GitHub PAT<br>Remote: GitHub PAT | Easy |
3538

3639
**Legend:**
3740
- ✅ = Fully supported

docs/installation-guides/install-claude.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,75 @@ Add this codeblock to your `claude_desktop_config.json`:
164164

165165
---
166166

167-
## Troubleshooting
167+
## Xcode (Claude Agent)
168+
169+
Xcode's Claude Agent uses the same `.claude.json` configuration format as the Claude Code CLI, but reads it from an Xcode-specific directory rather than the global config location.
170+
171+
### Configuration File Location
172+
173+
```
174+
~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/.claude.json
175+
```
176+
177+
> Configurations placed here only affect Claude Agent when launched from Xcode. See [Apple's documentation](https://developer.apple.com/documentation/xcode/setting-up-coding-intelligence#Customize-the-Claude-Agent-and-Codex-environments) for more details.
178+
179+
### Remote Server Setup (Recommended)
180+
181+
Run the following command in Terminal to add the remote GitHub MCP server:
182+
183+
```bash
184+
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp/","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}' --config ~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/.claude.json
185+
```
186+
187+
Or open the file in a text editor and add the `mcpServers` block manually:
188+
189+
```json
190+
{
191+
"mcpServers": {
192+
"github": {
193+
"type": "http",
194+
"url": "https://api.githubcopilot.com/mcp/",
195+
"headers": {
196+
"Authorization": "Bearer YOUR_GITHUB_PAT"
197+
}
198+
}
199+
}
200+
}
201+
```
202+
203+
### Local Server Setup (Docker)
204+
205+
> **macOS note**: Xcode runs with a minimal `PATH` that typically excludes `/usr/local/bin` (Intel) and `/opt/homebrew/bin` (Apple Silicon). Use the full path to `docker` to ensure it can be found. Run `which docker` in Terminal to find the correct path on your system.
206+
207+
```json
208+
{
209+
"mcpServers": {
210+
"github": {
211+
"command": "/usr/local/bin/docker",
212+
"args": [
213+
"run",
214+
"-i",
215+
"--rm",
216+
"-e",
217+
"GITHUB_PERSONAL_ACCESS_TOKEN",
218+
"ghcr.io/github/github-mcp-server"
219+
],
220+
"env": {
221+
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
222+
}
223+
}
224+
}
225+
}
226+
```
227+
228+
### Setup Steps
229+
1. Create or open `~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/.claude.json`
230+
2. Add the configuration block above
231+
3. Replace `YOUR_GITHUB_PAT` with your actual token
232+
4. Restart Xcode
233+
234+
---
235+
168236

169237
**Authentication Failed:**
170238
- Verify PAT has `repo` scope
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Install GitHub MCP Server in Xcode
2+
3+
Xcode currently supports two built-in coding agents: **Codex** (powered by OpenAI) and **Claude Agent** (powered by Anthropic). Follow the standard installation guide for each agent, with one important difference: Xcode uses its own isolated configuration directories for each agent, separate from your global config.
4+
5+
> Configurations placed in these directories only affect agents when launched from Xcode. See [Apple's documentation](https://developer.apple.com/documentation/xcode/setting-up-coding-intelligence#Customize-the-Claude-Agent-and-Codex-environments) for more details.
6+
7+
## Configuration Directories
8+
9+
| Agent | Configuration Directory |
10+
|-------|------------------------|
11+
| Codex | `~/Library/Developer/Xcode/CodingAssistant/codex/` |
12+
| Claude Agent | `~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/` |
13+
14+
Place your MCP server configuration in the relevant directory above rather than the default location used by the standalone CLI.
15+
16+
## Setup Guides
17+
18+
- **[Codex](install-codex.md)** — configure `config.toml` inside `~/Library/Developer/Xcode/CodingAssistant/codex/`
19+
- **[Claude Agent](install-claude.md#xcode-claude-agent)** — configure `.claude.json` inside `~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/`
20+
21+
## macOS Path Note
22+
23+
Xcode runs with a minimal `PATH` that typically excludes common binary locations. If you are using a local STDIO server (e.g. Docker or a pre-built binary), use the **full path** to the command in your config. Run `which docker` (or `which github-mcp-server`) in Terminal to find the correct path on your system. Common locations:
24+
25+
| Installation | Typical path |
26+
|---|---|
27+
| Docker (Intel Mac) | `/usr/local/bin/docker` |
28+
| Docker (Apple Silicon) | `/usr/local/bin/docker` |
29+
| Homebrew (Intel Mac) | `/usr/local/bin/` |
30+
| Homebrew (Apple Silicon) | `/opt/homebrew/bin/` |
31+
32+
## Troubleshooting
33+
34+
| Issue | Possible Cause | Fix |
35+
|-------|----------------|-----|
36+
| Tools not loading | Config placed in wrong directory | Ensure config is in the Xcode-specific path above, not `~/.codex/` or `~/.claude.json` |
37+
| Command not found (STDIO) | Xcode's PATH excludes binary location | Use the full path (e.g. `/usr/local/bin/docker` or `/opt/homebrew/bin/docker`); run `which docker` in Terminal to confirm |
38+
| Docker not found | Docker not running | Start Docker Desktop and restart Xcode |
39+
| Authentication failed | Invalid or expired PAT | Regenerate PAT and update config |
40+
41+
## References
42+
43+
- [Apple Developer Documentation — Setting up coding intelligence](https://developer.apple.com/documentation/xcode/setting-up-coding-intelligence#Customize-the-Claude-Agent-and-Codex-environments)
44+
- [Codex MCP documentation](https://developers.openai.com/codex/mcp)
45+
- Main project README: [Advanced configuration options](../../README.md)

pkg/github/__toolsnaps__/actions_run_trigger.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"properties": {
99
"inputs": {
1010
"description": "Inputs the workflow accepts. Only used for 'run_workflow' method.",
11+
"properties": {},
1112
"type": "object"
1213
},
1314
"method": {
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "List repository collaborators"
5+
},
6+
"description": "List collaborators of a GitHub repository. Results are paginated; the response includes `nextPage`, `prevPage`, `firstPage`, and `lastPage` fields. To get the next page, use the `nextPage` value as the `page` parameter.",
7+
"inputSchema": {
8+
"properties": {
9+
"affiliation": {
10+
"description": "Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all'",
11+
"enum": [
12+
"outside",
13+
"direct",
14+
"all"
15+
],
16+
"type": "string"
17+
},
18+
"owner": {
19+
"description": "Repository owner",
20+
"type": "string"
21+
},
22+
"page": {
23+
"description": "Page number for pagination (default 1, min 1)",
24+
"minimum": 1,
25+
"type": "number"
26+
},
27+
"perPage": {
28+
"description": "Results per page for pagination (default 30, min 1, max 100)",
29+
"maximum": 100,
30+
"minimum": 1,
31+
"type": "number"
32+
},
33+
"repo": {
34+
"description": "Repository name",
35+
"type": "string"
36+
}
37+
},
38+
"required": [
39+
"owner",
40+
"repo"
41+
],
42+
"type": "object"
43+
},
44+
"name": "list_repository_collaborators"
45+
}

pkg/github/__toolsnaps__/pull_request_read.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"inputSchema": {
88
"properties": {
99
"method": {
10-
"description": "Action to specify what pull request data needs to be retrieved from GitHub. \nPossible options: \n 1. get - Get details of a specific pull request.\n 2. get_diff - Get the diff of a pull request.\n 3. get_status - Get combined commit status of a head commit in a pull request.\n 4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.\n 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.\n 6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.\n 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.\n 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.\n",
10+
"description": "Action to specify what pull request data needs to be retrieved from GitHub. \nPossible options: \n 1. get - Get details of a specific pull request.\n 2. get_diff - Get the diff of a pull request.\n 3. get_status - Get combined commit status of a head commit in a pull request.\n 4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.\n 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.\n 6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method. Use with pagination parameters to control the number of results returned.\n 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.\n 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.\n",
1111
"enum": [
1212
"get",
1313
"get_diff",

pkg/github/__toolsnaps__/update_issue_type.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"description": "Repository owner (username or organization)",
2121
"type": "string"
2222
},
23+
"rationale": {
24+
"description": "One concise sentence explaining what specifically about the issue led you to choose this type. State the concrete signal (e.g. 'Reports a crash when saving' → bug, 'Asks for dark mode support' → feature).",
25+
"maxLength": 280,
26+
"type": "string"
27+
},
2328
"repo": {
2429
"description": "Repository name",
2530
"type": "string"

pkg/github/actions.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ func ActionsRunTrigger(t translations.TranslationHelperFunc) inventory.ServerToo
544544
"inputs": {
545545
Type: "object",
546546
Description: "Inputs the workflow accepts. Only used for 'run_workflow' method.",
547+
Properties: map[string]*jsonschema.Schema{},
547548
},
548549
"run_id": {
549550
Type: "number",
@@ -574,11 +575,9 @@ func ActionsRunTrigger(t translations.TranslationHelperFunc) inventory.ServerToo
574575
runID, _ := OptionalIntParam(args, "run_id")
575576

576577
// Get optional inputs parameter
577-
var inputs map[string]any
578-
if requestInputs, ok := args["inputs"]; ok {
579-
if inputsMap, ok := requestInputs.(map[string]any); ok {
580-
inputs = inputsMap
581-
}
578+
inputs, err := OptionalParam[map[string]any](args, "inputs")
579+
if err != nil {
580+
return utils.NewToolResultError(err.Error()), nil, nil
582581
}
583582

584583
// Validate required parameters based on action type

pkg/github/actions_test.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,37 @@ func Test_ActionsRunTrigger_RunWorkflow(t *testing.T) {
377377
expectError: true,
378378
expectedErrMsg: "ref is required for run_workflow action",
379379
},
380+
{
381+
name: "successful workflow run with inputs",
382+
mockedClient: MockHTTPClientWithHandlers(map[string]http.HandlerFunc{
383+
PostReposActionsWorkflowsDispatchesByOwnerByRepoByWorkflowID: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
384+
w.WriteHeader(http.StatusNoContent)
385+
}),
386+
}),
387+
requestArgs: map[string]any{
388+
"method": "run_workflow",
389+
"owner": "owner",
390+
"repo": "repo",
391+
"workflow_id": "12345",
392+
"ref": "main",
393+
"inputs": map[string]any{"FIELD1": "value1", "FIELD2": "value2"},
394+
},
395+
expectError: false,
396+
},
397+
{
398+
name: "invalid inputs type returns error",
399+
mockedClient: MockHTTPClientWithHandlers(map[string]http.HandlerFunc{}),
400+
requestArgs: map[string]any{
401+
"method": "run_workflow",
402+
"owner": "owner",
403+
"repo": "repo",
404+
"workflow_id": "12345",
405+
"ref": "main",
406+
"inputs": "not a map",
407+
},
408+
expectError: true,
409+
expectedErrMsg: "parameter inputs is not of type map[string]interface {}, is string",
410+
},
380411
}
381412

382413
for _, tc := range tests {

0 commit comments

Comments
 (0)