Skip to content

Commit d09c58c

Browse files
committed
Merge branch 'main' of https://github.com/github/github-mcp-server into almaleksia/consolidate-pull-requests
2 parents d381a59 + 23fa0dd commit d09c58c

28 files changed

+2582
-64
lines changed

.github/workflows/code-scanning.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
with:
6464
language: ${{ matrix.language }}
6565
- name: Setup Go
66-
uses: actions/setup-go@v5
66+
uses: actions/setup-go@v6
6767
if: matrix.language == 'go' && fromJSON(steps.resolve-environment.outputs.environment).configuration.go.version
6868
with:
6969
go-version: ${{ fromJSON(steps.resolve-environment.outputs.environment).configuration.go.version }}

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# https://github.com/sigstore/cosign-installer
4747
- name: Install cosign
4848
if: github.event_name != 'pull_request'
49-
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
49+
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 #v3.10.0
5050
with:
5151
cosign-release: "v2.2.4"
5252

@@ -60,7 +60,7 @@ jobs:
6060
# https://github.com/docker/login-action
6161
- name: Log into registry ${{ env.REGISTRY }}
6262
if: github.event_name != 'pull_request'
63-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
63+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
6464
with:
6565
registry: ${{ env.REGISTRY }}
6666
username: ${{ github.actor }}
@@ -101,7 +101,7 @@ jobs:
101101
# https://github.com/docker/build-push-action
102102
- name: Build and push Docker image
103103
id: build-and-push
104-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
104+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
105105
with:
106106
context: .
107107
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/docs-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Set up Go
20-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@v6
2121
with:
2222
go-version-file: 'go.mod'
2323

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v5
1919

2020
- name: Set up Go
21-
uses: actions/setup-go@v5
21+
uses: actions/setup-go@v6
2222
with:
2323
go-version-file: "go.mod"
2424

.github/workflows/goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Set up Go
20-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@v6
2121
with:
2222
go-version-file: "go.mod"
2323

2424
- name: Download dependencies
2525
run: go mod download
2626

2727
- name: Run GoReleaser
28-
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552
28+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a
2929
with:
3030
distribution: goreleaser
3131
# GoReleaser version

.github/workflows/license-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/checkout@v5
1515

1616
- name: Set up Go
17-
uses: actions/setup-go@v5
17+
uses: actions/setup-go@v6
1818
with:
1919
go-version-file: "go.mod"
2020
- name: check licenses

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v5
17-
- uses: actions/setup-go@v5
17+
- uses: actions/setup-go@v6
1818
with:
1919
go-version: stable
2020
- name: golangci-lint
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Publish to MCP Registry
2+
3+
on:
4+
push:
5+
tags: ["v*"] # Triggers on version tags like v1.0.0
6+
workflow_dispatch: # Allow manual triggering
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Required for OIDC authentication
13+
contents: read
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v5
18+
19+
- name: Setup Go
20+
uses: actions/setup-go@v6
21+
with:
22+
go-version: "stable"
23+
24+
- name: Fetch tags
25+
run: |
26+
if [[ "${{ github.ref_type }}" != "tag" ]]; then
27+
git fetch --tags
28+
else
29+
echo "Skipping tag fetch - already on tag ${{ github.ref_name }}"
30+
fi
31+
32+
- name: Install MCP Publisher
33+
run: |
34+
git clone --quiet https://github.com/modelcontextprotocol/registry publisher-repo
35+
cd publisher-repo && make publisher > /dev/null && cd ..
36+
cp publisher-repo/bin/mcp-publisher . && chmod +x mcp-publisher
37+
38+
- name: Update server.json version
39+
run: |
40+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
41+
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
42+
else
43+
LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
44+
[ -z "$LATEST_TAG" ] && { echo "No release tag found"; exit 1; }
45+
TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
46+
echo "Using latest tag: $LATEST_TAG"
47+
fi
48+
sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json
49+
echo "Version: $TAG_VERSION"
50+
51+
- name: Validate configuration
52+
run: |
53+
python3 -m json.tool server.json > /dev/null && echo "Configuration valid" || exit 1
54+
55+
- name: Display final server.json
56+
run: |
57+
echo "Final server.json contents:"
58+
cat server.json
59+
60+
- name: Login to MCP Registry (OIDC)
61+
run: ./mcp-publisher login github-oidc
62+
63+
- name: Publish to MCP Registry
64+
run: ./mcp-publisher publish

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ RUN --mount=type=cache,target=/go/pkg/mod \
1818

1919
# Make a stage to run the app
2020
FROM gcr.io/distroless/base-debian12
21+
22+
# Add required MCP server annotation
23+
LABEL io.modelcontextprotocol.server.name="io.github.github/github-mcp-server"
24+
2125
# Set the working directory
2226
WORKDIR /server
2327
# Copy the binary from the build stage

README.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,10 +658,51 @@ The following sets of tools are available (all are on by default):
658658

659659
<summary>Projects</summary>
660660

661+
- **add_project_item** - Add project item
662+
- `item_id`: The numeric ID of the issue or pull request to add to the project. (number, required)
663+
- `item_type`: The item's type, either issue or pull_request. (string, required)
664+
- `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)
665+
- `owner_type`: Owner type (string, required)
666+
- `project_number`: The project's number. (number, required)
667+
668+
- **delete_project_item** - Delete project item
669+
- `item_id`: The internal project item ID to delete from the project (not the issue or pull request ID). (number, required)
670+
- `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)
671+
- `owner_type`: Owner type (string, required)
672+
- `project_number`: The project's number. (number, required)
673+
674+
- **get_project** - Get project
675+
- `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)
676+
- `owner_type`: Owner type (string, required)
677+
- `project_number`: The project's number (number, required)
678+
679+
- **get_project_field** - Get project field
680+
- `field_id`: The field's id. (number, required)
681+
- `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)
682+
- `owner_type`: Owner type (string, required)
683+
- `project_number`: The project's number. (number, required)
684+
685+
- **get_project_item** - Get project item
686+
- `item_id`: The item's ID. (number, required)
687+
- `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)
688+
- `owner_type`: Owner type (string, required)
689+
- `project_number`: The project's number. (number, required)
690+
691+
- **list_project_fields** - List project fields
692+
- `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)
693+
- `owner_type`: Owner type (string, required)
694+
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
695+
- `project_number`: The project's number. (number, required)
696+
697+
- **list_project_items** - List project items
698+
- `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)
699+
- `owner_type`: Owner type (string, required)
700+
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
701+
- `project_number`: The project's number. (number, required)
702+
- `query`: Search query to filter items (string, optional)
703+
661704
- **list_projects** - List projects
662-
- `after`: Cursor for items after (forward pagination) (string, optional)
663-
- `before`: Cursor for items before (backwards pagination) (string, optional)
664-
- `owner`: If owner_type == user it is the handle for the GitHub user account. If owner_type == organization it is the name of the organization. The name is not case sensitive. (string, required)
705+
- `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)
665706
- `owner_type`: Owner type (string, required)
666707
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
667708
- `query`: Filter projects by a search query (matches title and description) (string, optional)
@@ -1001,6 +1042,17 @@ Possible options:
10011042

10021043
</details>
10031044

1045+
<details>
1046+
1047+
<summary>Copilot Spaces</summary>
1048+
1049+
- **get_copilot_space** - Get Copilot Space
1050+
- `owner`: The owner of the space. (string, required)
1051+
- `name`: The name of the space. (string, required)
1052+
1053+
- **list_copilot_spaces** - List Copilot Spaces
1054+
</details>
1055+
10041056
#### Specifying Toolsets
10051057

10061058
To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:

0 commit comments

Comments
 (0)