Skip to content

Commit 172de76

Browse files
Merge branch 'main' into tonytrg/add-correct-insiders
2 parents b9ba32a + 60a8c21 commit 172de76

File tree

8 files changed

+125
-217
lines changed

8 files changed

+125
-217
lines changed

.github/workflows/go.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515

1616
steps:
17+
- name: Force git to use LF
18+
# This step is required on Windows to work around go mod tidy -diff issues caused by CRLF line endings.
19+
# TODO: replace with a checkout option when https://github.com/actions/checkout/issues/226 is implemented
20+
if: runner.os == 'Windows'
21+
run: |
22+
git config --global core.autocrlf false
23+
git config --global core.eol lf
24+
1725
- name: Check out code
1826
uses: actions/checkout@v6
1927

@@ -22,8 +30,8 @@ jobs:
2230
with:
2331
go-version-file: "go.mod"
2432

25-
- name: Download dependencies
26-
run: go mod download
33+
- name: Tidy dependencies
34+
run: go mod tidy -diff
2735

2836
- name: Run unit tests
2937
run: script/test

README.md

Lines changed: 56 additions & 152 deletions
Large diffs are not rendered by default.

cmd/mcpcurl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ be executed against the configured MCP server.
1616
## Installation
1717

1818
### Prerequisites
19-
- Go 1.21 or later
19+
- Go 1.24 or later
2020
- Access to the GitHub MCP Server from either Docker or local build
2121

2222
### Build from Source

docs/installation-guides/install-claude.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ echo -e ".env\n.mcp.json" >> .gitignore
2929
### Remote Server Setup (Streamable HTTP)
3030

3131
> **Note**: For Claude Code versions **2.1.1 and newer**, use the `add-json` command format below. For older versions, see the [legacy command format](#for-older-versions-of-claude-code).
32+
>
33+
> **Windows / CLI note**: `claude mcp add-json` may return `Invalid input` when adding an HTTP server. If that happens, use the legacy `claude mcp add --transport http ...` command format below.
3234
3335
1. Run the following command in the terminal (not in Claude Code CLI):
3436
```bash
@@ -95,6 +97,15 @@ With an environment variable:
9597
claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $(grep GITHUB_PAT .env | cut -d '=' -f2)"
9698
```
9799

100+
#### Windows (PowerShell)
101+
102+
If you see `missing required argument 'name'`, put the server name immediately after `claude mcp add`:
103+
104+
```powershell
105+
$pat = "YOUR_GITHUB_PAT"
106+
claude mcp add github --transport http https://api.githubcopilot.com/mcp/ -H "Authorization: Bearer $pat"
107+
```
108+
98109
---
99110

100111
## Claude Desktop

go.mod

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module github.com/github/github-mcp-server
33
go 1.24.0
44

55
require (
6-
github.com/fatih/color v1.18.0
76
github.com/google/go-github/v79 v79.0.0
87
github.com/google/jsonschema-go v0.4.2
98
github.com/josephburnett/jd v1.9.2
@@ -16,28 +15,17 @@ require (
1615

1716
require (
1817
github.com/aymerick/douceur v0.2.0 // indirect
19-
github.com/go-openapi/jsonpointer v0.19.5 // indirect
20-
github.com/go-openapi/swag v0.21.1 // indirect
21-
github.com/gorilla/css v1.0.1 // indirect
22-
github.com/josharian/intern v1.0.0 // indirect
23-
github.com/mailru/easyjson v0.7.7 // indirect
24-
github.com/mattn/go-colorable v0.1.13 // indirect
25-
github.com/mattn/go-isatty v0.0.20 // indirect
26-
github.com/stretchr/objx v0.5.2 // indirect
27-
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
28-
go.yaml.in/yaml/v3 v3.0.4 // indirect
29-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
30-
golang.org/x/net v0.38.0 // indirect
31-
gopkg.in/yaml.v2 v2.4.0 // indirect
32-
)
33-
34-
require (
3518
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3619
github.com/fsnotify/fsnotify v1.9.0 // indirect
20+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
21+
github.com/go-openapi/swag v0.21.1 // indirect
3722
github.com/go-viper/mapstructure/v2 v2.5.0
3823
github.com/google/go-querystring v1.1.0 // indirect
24+
github.com/gorilla/css v1.0.1 // indirect
3925
github.com/inconshreveable/mousetrap v1.1.0 // indirect
26+
github.com/josharian/intern v1.0.0 // indirect
4027
github.com/lithammer/fuzzysearch v1.1.8
28+
github.com/mailru/easyjson v0.7.7 // indirect
4129
github.com/modelcontextprotocol/go-sdk v1.2.0
4230
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
4331
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
@@ -49,11 +37,17 @@ require (
4937
github.com/spf13/afero v1.15.0 // indirect
5038
github.com/spf13/cast v1.10.0 // indirect
5139
github.com/spf13/pflag v1.0.10
40+
github.com/stretchr/objx v0.5.2 // indirect
5241
github.com/subosito/gotenv v1.6.0 // indirect
5342
github.com/yosida95/uritemplate/v3 v3.0.2
43+
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
44+
go.yaml.in/yaml/v3 v3.0.4 // indirect
45+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
46+
golang.org/x/net v0.38.0 // indirect
5447
golang.org/x/oauth2 v0.30.0 // indirect
5548
golang.org/x/sys v0.31.0 // indirect
5649
golang.org/x/text v0.28.0 // indirect
5750
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
51+
gopkg.in/yaml.v2 v2.4.0 // indirect
5852
gopkg.in/yaml.v3 v3.0.1 // indirect
5953
)

go.sum

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
66
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
77
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
88
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9-
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
10-
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
119
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
1210
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
1311
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
@@ -53,11 +51,6 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
5351
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
5452
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
5553
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
56-
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
57-
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
58-
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
59-
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
60-
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
6154
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
6255
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
6356
github.com/modelcontextprotocol/go-sdk v1.2.0 h1:Y23co09300CEk8iZ/tMxIX1dVmKZkzoSBZOpJwUnc/s=
@@ -130,9 +123,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
130123
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
131124
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
132125
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
133-
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
134126
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
135-
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
136127
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
137128
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
138129
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=

pkg/github/actions.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const (
2626
DescriptionRepositoryName = "Repository name"
2727
)
2828

29-
// FeatureFlagConsolidatedActions is the feature flag that disables individual actions tools
30-
// in favor of the consolidated actions tools.
31-
const FeatureFlagConsolidatedActions = "remote_mcp_consolidated_actions"
29+
// FeatureFlagHoldbackConsolidatedActions is the feature flag that, when enabled, reverts to
30+
// individual actions tools instead of the consolidated actions tools.
31+
const FeatureFlagHoldbackConsolidatedActions = "mcp_holdback_consolidated_actions"
3232

3333
// Method constants for consolidated actions tools
3434
const (
@@ -117,7 +117,7 @@ func ListWorkflows(t translations.TranslationHelperFunc) inventory.ServerTool {
117117
return utils.NewToolResultText(string(r)), nil, nil
118118
},
119119
)
120-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
120+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
121121
return tool
122122
}
123123

@@ -272,7 +272,7 @@ func ListWorkflowRuns(t translations.TranslationHelperFunc) inventory.ServerTool
272272
return utils.NewToolResultText(string(r)), nil, nil
273273
},
274274
)
275-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
275+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
276276
return tool
277277
}
278278

@@ -385,7 +385,7 @@ func RunWorkflow(t translations.TranslationHelperFunc) inventory.ServerTool {
385385
return utils.NewToolResultText(string(r)), nil, nil
386386
},
387387
)
388-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
388+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
389389
return tool
390390
}
391391

@@ -454,7 +454,7 @@ func GetWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerTool {
454454
return utils.NewToolResultText(string(r)), nil, nil
455455
},
456456
)
457-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
457+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
458458
return tool
459459
}
460460

@@ -533,7 +533,7 @@ func GetWorkflowRunLogs(t translations.TranslationHelperFunc) inventory.ServerTo
533533
return utils.NewToolResultText(string(r)), nil, nil
534534
},
535535
)
536-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
536+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
537537
return tool
538538
}
539539

@@ -634,7 +634,7 @@ func ListWorkflowJobs(t translations.TranslationHelperFunc) inventory.ServerTool
634634
return utils.NewToolResultText(string(r)), nil, nil
635635
},
636636
)
637-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
637+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
638638
return tool
639639
}
640640

@@ -746,7 +746,7 @@ func GetJobLogs(t translations.TranslationHelperFunc) inventory.ServerTool {
746746
return utils.NewToolResultError("Either job_id must be provided for single job logs, or run_id with failed_only=true for failed job logs"), nil, nil
747747
},
748748
)
749-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
749+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
750750
return tool
751751
}
752752

@@ -976,7 +976,7 @@ func RerunWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerTool
976976
return utils.NewToolResultText(string(r)), nil, nil
977977
},
978978
)
979-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
979+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
980980
return tool
981981
}
982982

@@ -1052,7 +1052,7 @@ func RerunFailedJobs(t translations.TranslationHelperFunc) inventory.ServerTool
10521052
return utils.NewToolResultText(string(r)), nil, nil
10531053
},
10541054
)
1055-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
1055+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
10561056
return tool
10571057
}
10581058

@@ -1130,7 +1130,7 @@ func CancelWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerToo
11301130
return utils.NewToolResultText(string(r)), nil, nil
11311131
},
11321132
)
1133-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
1133+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
11341134
return tool
11351135
}
11361136

@@ -1211,7 +1211,7 @@ func ListWorkflowRunArtifacts(t translations.TranslationHelperFunc) inventory.Se
12111211
return utils.NewToolResultText(string(r)), nil, nil
12121212
},
12131213
)
1214-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
1214+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
12151215
return tool
12161216
}
12171217

@@ -1289,7 +1289,7 @@ func DownloadWorkflowRunArtifact(t translations.TranslationHelperFunc) inventory
12891289
return utils.NewToolResultText(string(r)), nil, nil
12901290
},
12911291
)
1292-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
1292+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
12931293
return tool
12941294
}
12951295

@@ -1366,7 +1366,7 @@ func DeleteWorkflowRunLogs(t translations.TranslationHelperFunc) inventory.Serve
13661366
return utils.NewToolResultText(string(r)), nil, nil
13671367
},
13681368
)
1369-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
1369+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
13701370
return tool
13711371
}
13721372

@@ -1435,7 +1435,7 @@ func GetWorkflowRunUsage(t translations.TranslationHelperFunc) inventory.ServerT
14351435
return utils.NewToolResultText(string(r)), nil, nil
14361436
},
14371437
)
1438-
tool.FeatureFlagDisable = FeatureFlagConsolidatedActions
1438+
tool.FeatureFlagEnable = FeatureFlagHoldbackConsolidatedActions
14391439
return tool
14401440
}
14411441

@@ -1631,7 +1631,7 @@ Use this tool to list workflows in a repository, or list workflow runs, jobs, an
16311631
}
16321632
},
16331633
)
1634-
tool.FeatureFlagEnable = FeatureFlagConsolidatedActions
1634+
tool.FeatureFlagDisable = FeatureFlagHoldbackConsolidatedActions
16351635
return tool
16361636
}
16371637

@@ -1740,7 +1740,7 @@ Use this tool to get details about individual workflows, workflow runs, jobs, an
17401740
}
17411741
},
17421742
)
1743-
tool.FeatureFlagEnable = FeatureFlagConsolidatedActions
1743+
tool.FeatureFlagDisable = FeatureFlagHoldbackConsolidatedActions
17441744
return tool
17451745
}
17461746

@@ -1859,7 +1859,7 @@ func ActionsRunTrigger(t translations.TranslationHelperFunc) inventory.ServerToo
18591859
}
18601860
},
18611861
)
1862-
tool.FeatureFlagEnable = FeatureFlagConsolidatedActions
1862+
tool.FeatureFlagDisable = FeatureFlagHoldbackConsolidatedActions
18631863
return tool
18641864
}
18651865

@@ -1977,7 +1977,7 @@ For single job logs, provide job_id. For all failed jobs in a run, provide run_i
19771977
return utils.NewToolResultError("Either job_id must be provided for single job logs, or run_id with failed_only=true for failed job logs"), nil, nil
19781978
},
19791979
)
1980-
tool.FeatureFlagEnable = FeatureFlagConsolidatedActions
1980+
tool.FeatureFlagDisable = FeatureFlagHoldbackConsolidatedActions
19811981
return tool
19821982
}
19831983

0 commit comments

Comments
 (0)