Skip to content

Commit 9fff914

Browse files
authored
Merge branch 'main' into babbage/link-registry-publish-to-docker-image
2 parents 0ba5a55 + f9343e6 commit 9fff914

29 files changed

+2478
-770
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ jobs:
127127
# This step uses the identity token to provision an ephemeral certificate
128128
# against the sigstore community Fulcio instance.
129129
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
130-
130+

.github/workflows/registry-releaser.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Publish to MCP Registry
22

33
on:
4-
push:
5-
tags: ["v*"] # Triggers on version tags like v1.0.0
4+
repository_dispatch:
5+
types: [docker-published] # Triggered after Docker image is published
66
workflow_dispatch: # Allow manual triggering
77

88
jobs:
@@ -23,7 +23,9 @@ jobs:
2323

2424
- name: Fetch tags
2525
run: |
26-
if [[ "${{ github.ref_type }}" != "tag" ]]; then
26+
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
27+
echo "Triggered by docker-published event for tag: ${{ github.event.client_payload.tag }}"
28+
elif [[ "${{ github.ref_type }}" != "tag" ]]; then
2729
git fetch --tags
2830
else
2931
echo "Skipping tag fetch - already on tag ${{ github.ref_name }}"
@@ -56,7 +58,10 @@ jobs:
5658
5759
- name: Update server.json version
5860
run: |
59-
if [[ "${{ github.ref_type }}" == "tag" ]]; then
61+
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
62+
TAG_VERSION=$(echo "${{ github.event.client_payload.tag }}" | sed 's/^v//')
63+
echo "Using tag from dispatch: ${{ github.event.client_payload.tag }}"
64+
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
6065
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
6166
else
6267
LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)

README.md

Lines changed: 138 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,17 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
8686
> **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.
8787
8888
### Configuration
89-
See [Remote Server Documentation](/docs/remote-server.md) on how to pass additional configuration settings to the remote GitHub MCP Server.
89+
90+
#### Default toolset configuration
91+
92+
The default configuration is:
93+
- context
94+
- repos
95+
- issues
96+
- pull_requests
97+
- users
98+
99+
See [Remote Server Documentation](docs/remote-server.md) for full details on remote server configuration, toolsets, headers, and advanced usage. This file provides comprehensive instructions and examples for connecting, customizing, and installing the remote GitHub MCP Server in VS Code and other MCP hosts.
90100

91101
---
92102

@@ -271,6 +281,50 @@ The GitHub MCP Server supports enabling or disabling specific groups of function
271281

272282
_Toolsets are not limited to Tools. Relevant MCP Resources and Prompts are also included where applicable._
273283

284+
The Local GitHub MCP Server follows the same [default toolset configuration](#default-toolset-configuration) as the remote version.
285+
286+
#### Specifying Toolsets
287+
288+
To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:
289+
290+
1. **Using Command Line Argument**:
291+
292+
```bash
293+
github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security
294+
```
295+
296+
2. **Using Environment Variable**:
297+
```bash
298+
GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server
299+
```
300+
301+
The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.
302+
303+
### Using Toolsets With Docker
304+
305+
When using Docker, you can pass the toolsets as environment variables:
306+
307+
```bash
308+
docker run -i --rm \
309+
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
310+
-e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security,experiments" \
311+
ghcr.io/github/github-mcp-server
312+
```
313+
314+
### The "all" Toolset
315+
316+
The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:
317+
318+
```bash
319+
./github-mcp-server --toolsets all
320+
```
321+
322+
Or using the environment variable:
323+
324+
```bash
325+
GITHUB_TOOLSETS="all" ./github-mcp-server
326+
```
327+
274328
### Available Toolsets
275329

276330
The following sets of tools are available (all are on by default):
@@ -286,19 +340,20 @@ The following sets of tools are available (all are on by default):
286340
| `experiments` | Experimental features that are not considered stable yet |
287341
| `gists` | GitHub Gist related tools |
288342
| `issues` | GitHub Issues related tools |
343+
| `labels` | GitHub Labels related tools |
289344
| `notifications` | GitHub Notifications related tools |
290345
| `orgs` | GitHub Organization related tools |
291346
| `projects` | GitHub Projects related tools |
292347
| `pull_requests` | GitHub Pull Request related tools |
293348
| `repos` | GitHub Repository related tools |
294349
| `secret_protection` | Secret protection related tools, such as GitHub Secret Scanning |
295350
| `security_advisories` | Security advisories related tools |
351+
| `stargazers` | GitHub Stargazers related tools |
296352
| `users` | GitHub User related tools |
297353
<!-- END AUTOMATED TOOLSETS -->
298354

299355
## Tools
300356

301-
302357
<!-- START AUTOMATED TOOLS -->
303358
<details>
304359

@@ -545,6 +600,11 @@ The following sets of tools are available (all are on by default):
545600
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
546601
- `repo`: Repository name (string, required)
547602

603+
- **get_label** - Get a specific label from a repository.
604+
- `name`: Label name. (string, required)
605+
- `owner`: Repository owner (username or organization name) (string, required)
606+
- `repo`: Repository name (string, required)
607+
548608
- **list_issue_types** - List available issue types
549609
- `owner`: The organization owner of the repository (string, required)
550610

@@ -559,6 +619,11 @@ The following sets of tools are available (all are on by default):
559619
- `since`: Filter by date (ISO 8601 timestamp) (string, optional)
560620
- `state`: Filter by state, by default both open and closed issues are returned when not provided (string, optional)
561621

622+
- **list_label** - List labels from a repository or an issue
623+
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
624+
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
625+
- `repo`: Repository name - required for all operations (string, required)
626+
562627
- **list_sub_issues** - List sub-issues
563628
- `issue_number`: Issue number (number, required)
564629
- `owner`: Repository owner (string, required)
@@ -607,6 +672,31 @@ The following sets of tools are available (all are on by default):
607672

608673
<details>
609674

675+
<summary>Labels</summary>
676+
677+
- **get_label** - Get a specific label from a repository.
678+
- `name`: Label name. (string, required)
679+
- `owner`: Repository owner (username or organization name) (string, required)
680+
- `repo`: Repository name (string, required)
681+
682+
- **label_write** - Write operations on repository labels.
683+
- `color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
684+
- `description`: Label description text. Optional for 'create' and 'update'. (string, optional)
685+
- `method`: Operation to perform: 'create', 'update', or 'delete' (string, required)
686+
- `name`: Label name - required for all operations (string, required)
687+
- `new_name`: New name for the label (used only with 'update' method to rename) (string, optional)
688+
- `owner`: Repository owner (username or organization name) (string, required)
689+
- `repo`: Repository name (string, required)
690+
691+
- **list_label** - List labels from a repository or an issue
692+
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
693+
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
694+
- `repo`: Repository name - required for all operations (string, required)
695+
696+
</details>
697+
698+
<details>
699+
610700
<summary>Notifications</summary>
611701

612702
- **dismiss_notification** - Dismiss notification
@@ -707,6 +797,13 @@ The following sets of tools are available (all are on by default):
707797
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
708798
- `query`: Filter projects by a search query (matches title and description) (string, optional)
709799

800+
- **update_project_item** - Update project item
801+
- `item_id`: The unique identifier of the project item. This is not the issue or pull request ID. (number, required)
802+
- `owner`: If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive. (string, required)
803+
- `owner_type`: Owner type (string, required)
804+
- `project_number`: The project's number. (number, required)
805+
- `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"} (object, required)
806+
710807
</details>
711808

712809
<details>
@@ -754,38 +851,6 @@ The following sets of tools are available (all are on by default):
754851
- `pullNumber`: Pull request number (number, required)
755852
- `repo`: Repository name (string, required)
756853

757-
- **get_pull_request** - Get pull request details
758-
- `owner`: Repository owner (string, required)
759-
- `pullNumber`: Pull request number (number, required)
760-
- `repo`: Repository name (string, required)
761-
762-
- **get_pull_request_diff** - Get pull request diff
763-
- `owner`: Repository owner (string, required)
764-
- `pullNumber`: Pull request number (number, required)
765-
- `repo`: Repository name (string, required)
766-
767-
- **get_pull_request_files** - Get pull request files
768-
- `owner`: Repository owner (string, required)
769-
- `page`: Page number for pagination (min 1) (number, optional)
770-
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
771-
- `pullNumber`: Pull request number (number, required)
772-
- `repo`: Repository name (string, required)
773-
774-
- **get_pull_request_review_comments** - Get pull request review comments
775-
- `owner`: Repository owner (string, required)
776-
- `pullNumber`: Pull request number (number, required)
777-
- `repo`: Repository name (string, required)
778-
779-
- **get_pull_request_reviews** - Get pull request reviews
780-
- `owner`: Repository owner (string, required)
781-
- `pullNumber`: Pull request number (number, required)
782-
- `repo`: Repository name (string, required)
783-
784-
- **get_pull_request_status** - Get pull request status checks
785-
- `owner`: Repository owner (string, required)
786-
- `pullNumber`: Pull request number (number, required)
787-
- `repo`: Repository name (string, required)
788-
789854
- **list_pull_requests** - List pull requests
790855
- `base`: Filter by base branch (string, optional)
791856
- `direction`: Sort direction (string, optional)
@@ -805,6 +870,22 @@ The following sets of tools are available (all are on by default):
805870
- `pullNumber`: Pull request number (number, required)
806871
- `repo`: Repository name (string, required)
807872

873+
- **pull_request_read** - Get details for a single pull request
874+
- `method`: Action to specify what pull request data needs to be retrieved from GitHub.
875+
Possible options:
876+
1. get - Get details of a specific pull request.
877+
2. get_diff - Get the diff of a pull request.
878+
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
879+
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
880+
5. get_review_comments - Get the review comments on a pull request. Use with pagination parameters to control the number of results returned.
881+
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
882+
(string, required)
883+
- `owner`: Repository owner (string, required)
884+
- `page`: Page number for pagination (min 1) (number, optional)
885+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
886+
- `pullNumber`: Pull request number (number, required)
887+
- `repo`: Repository name (string, required)
888+
808889
- **request_copilot_review** - Request Copilot review
809890
- `owner`: Repository owner (string, required)
810891
- `pullNumber`: Pull request number (number, required)
@@ -933,13 +1014,6 @@ The following sets of tools are available (all are on by default):
9331014
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
9341015
- `repo`: Repository name (string, required)
9351016

936-
- **list_starred_repositories** - List starred repositories
937-
- `direction`: The direction to sort the results by. (string, optional)
938-
- `page`: Page number for pagination (min 1) (number, optional)
939-
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
940-
- `sort`: How to sort the results. Can be either 'created' (when the repository was starred) or 'updated' (when the repository was last pushed to). (string, optional)
941-
- `username`: Username to list starred repositories for. Defaults to the authenticated user. (string, optional)
942-
9431017
- **list_tags** - List tags
9441018
- `owner`: Repository owner (string, required)
9451019
- `page`: Page number for pagination (min 1) (number, optional)
@@ -962,17 +1036,11 @@ The following sets of tools are available (all are on by default):
9621036

9631037
- **search_repositories** - Search repositories
9641038
- `minimal_output`: Return minimal repository information (default: true). When false, returns full GitHub API repository objects. (boolean, optional)
1039+
- `order`: Sort order (string, optional)
9651040
- `page`: Page number for pagination (min 1) (number, optional)
9661041
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
9671042
- `query`: Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. (string, required)
968-
969-
- **star_repository** - Star repository
970-
- `owner`: Repository owner (string, required)
971-
- `repo`: Repository name (string, required)
972-
973-
- **unstar_repository** - Unstar repository
974-
- `owner`: Repository owner (string, required)
975-
- `repo`: Repository name (string, required)
1043+
- `sort`: Sort repositories by field, defaults to best match (string, optional)
9761044

9771045
</details>
9781046

@@ -1031,6 +1099,27 @@ The following sets of tools are available (all are on by default):
10311099

10321100
<details>
10331101

1102+
<summary>Stargazers</summary>
1103+
1104+
- **list_starred_repositories** - List starred repositories
1105+
- `direction`: The direction to sort the results by. (string, optional)
1106+
- `page`: Page number for pagination (min 1) (number, optional)
1107+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1108+
- `sort`: How to sort the results. Can be either 'created' (when the repository was starred) or 'updated' (when the repository was last pushed to). (string, optional)
1109+
- `username`: Username to list starred repositories for. Defaults to the authenticated user. (string, optional)
1110+
1111+
- **star_repository** - Star repository
1112+
- `owner`: Repository owner (string, required)
1113+
- `repo`: Repository name (string, required)
1114+
1115+
- **unstar_repository** - Unstar repository
1116+
- `owner`: Repository owner (string, required)
1117+
- `repo`: Repository name (string, required)
1118+
1119+
</details>
1120+
1121+
<details>
1122+
10341123
<summary>Users</summary>
10351124

10361125
- **search_users** - Search users
@@ -1069,48 +1158,6 @@ The following sets of tools are available (all are on by default):
10691158
- **list_copilot_spaces** - List Copilot Spaces
10701159
</details>
10711160

1072-
#### Specifying Toolsets
1073-
1074-
To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:
1075-
1076-
1. **Using Command Line Argument**:
1077-
1078-
```bash
1079-
github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security
1080-
```
1081-
1082-
2. **Using Environment Variable**:
1083-
```bash
1084-
GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server
1085-
```
1086-
1087-
The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.
1088-
1089-
### Using Toolsets With Docker
1090-
1091-
When using Docker, you can pass the toolsets as environment variables:
1092-
1093-
```bash
1094-
docker run -i --rm \
1095-
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1096-
-e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security,experiments" \
1097-
ghcr.io/github/github-mcp-server
1098-
```
1099-
1100-
### The "all" Toolset
1101-
1102-
The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:
1103-
1104-
```bash
1105-
./github-mcp-server --toolsets all
1106-
```
1107-
1108-
Or using the environment variable:
1109-
1110-
```bash
1111-
GITHUB_TOOLSETS="all" ./github-mcp-server
1112-
```
1113-
11141161
## Dynamic Tool Discovery
11151162

11161163
**Note**: This feature is currently in beta and may not be available in all environments. Please test it out and let us know if you encounter any issues.

cmd/github-mcp-server/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ var (
4545
return fmt.Errorf("failed to unmarshal toolsets: %w", err)
4646
}
4747

48+
if len(enabledToolsets) == 0 {
49+
enabledToolsets = github.GetDefaultToolsetIDs()
50+
}
51+
4852
stdioServerConfig := ghmcp.StdioServerConfig{
4953
Version: version,
5054
Host: viper.GetString("host"),
@@ -69,7 +73,7 @@ func init() {
6973
rootCmd.SetVersionTemplate("{{.Short}}\n{{.Version}}\n")
7074

7175
// Add global flags that will be shared by all commands
72-
rootCmd.PersistentFlags().StringSlice("toolsets", github.DefaultTools, "An optional comma separated list of groups of tools to allow, defaults to enabling all")
76+
rootCmd.PersistentFlags().StringSlice("toolsets", nil, github.GenerateToolsetsHelp())
7377
rootCmd.PersistentFlags().Bool("dynamic-toolsets", false, "Enable dynamic toolsets")
7478
rootCmd.PersistentFlags().Bool("read-only", false, "Restrict the server to read-only operations")
7579
rootCmd.PersistentFlags().String("log-file", "", "Path to log file")

0 commit comments

Comments
 (0)