Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,19 @@ jobs:
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

- name: Trigger registry publication
if: ${{ github.event_name != 'pull_request' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') }}
uses: actions/github-script@v7
with:
script: |
await github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: context.repo.repo,
event_type: 'docker-published',
client_payload: {
tag: context.ref.replace('refs/tags/', ''),
sha: context.sha,
image_digest: '${{ steps.build-and-push.outputs.digest }}'
}
});
34 changes: 30 additions & 4 deletions .github/workflows/registry-releaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish to MCP Registry

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

jobs:
Expand All @@ -23,12 +23,35 @@ jobs:

- name: Fetch tags
run: |
if [[ "${{ github.ref_type }}" != "tag" ]]; then
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
echo "Triggered by docker-published event for tag: ${{ github.event.client_payload.tag }}"
elif [[ "${{ github.ref_type }}" != "tag" ]]; then
git fetch --tags
else
echo "Skipping tag fetch - already on tag ${{ github.ref_name }}"
fi

- name: Wait for Docker image
run: |
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
TAG="${{ github.event.client_payload.tag }}"
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
TAG="${{ github.ref_name }}"
else
TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
fi
IMAGE="ghcr.io/github/github-mcp-server:$TAG"

for i in {1..6}; do
if docker manifest inspect "$IMAGE" &>/dev/null; then
echo "✅ Docker image ready: $TAG"
break
fi
[ $i -eq 6 ] && { echo "❌ Timeout waiting for $TAG after 3 minutes"; exit 1; }
echo "⏳ Waiting for Docker image ($i/6)..."
sleep 30
done

- name: Install MCP Publisher
run: |
git clone --quiet https://github.com/modelcontextprotocol/registry publisher-repo
Expand All @@ -37,7 +60,10 @@ jobs:

- name: Update server.json version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
TAG_VERSION=$(echo "${{ github.event.client_payload.tag }}" | sed 's/^v//')
echo "Using tag from dispatch: ${{ github.event.client_payload.tag }}"
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
else
LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
Expand Down
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ The following sets of tools are available (all are on by default):
| `experiments` | Experimental features that are not considered stable yet |
| `gists` | GitHub Gist related tools |
| `issues` | GitHub Issues related tools |
| `labels` | GitHub Labels related tools |
| `notifications` | GitHub Notifications related tools |
| `orgs` | GitHub Organization related tools |
| `projects` | GitHub Projects related tools |
Expand Down Expand Up @@ -599,6 +600,11 @@ The following sets of tools are available (all are on by default):
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

- **get_label** - Get a specific label from a repository.
- `name`: Label name. (string, required)
- `owner`: Repository owner (username or organization name) (string, required)
- `repo`: Repository name (string, required)

- **list_issue_types** - List available issue types
- `owner`: The organization owner of the repository (string, required)

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

- **list_label** - List labels from a repository or an issue
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
- `repo`: Repository name - required for all operations (string, required)

- **list_sub_issues** - List sub-issues
- `issue_number`: Issue number (number, required)
- `owner`: Repository owner (string, required)
Expand Down Expand Up @@ -657,6 +668,40 @@ The following sets of tools are available (all are on by default):
- `title`: New title (string, optional)
- `type`: New issue type (string, optional)

- **write_label** - Write operations on repository labels.
- `color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
- `description`: Label description text. Optional for 'create' and 'update'. (string, optional)
- `method`: Operation to perform: 'create', 'update', or 'delete' (string, required)
- `name`: Label name - required for all operations (string, required)
- `new_name`: New name for the label (used only with 'update' method to rename) (string, optional)
- `owner`: Repository owner (username or organization name) (string, required)
- `repo`: Repository name (string, required)

</details>

<details>

<summary>Labels</summary>

- **get_label** - Get a specific label from a repository.
- `name`: Label name. (string, required)
- `owner`: Repository owner (username or organization name) (string, required)
- `repo`: Repository name (string, required)

- **list_label** - List labels from a repository or an issue
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
- `repo`: Repository name - required for all operations (string, required)

- **write_label** - Write operations on repository labels.
- `color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
- `description`: Label description text. Optional for 'create' and 'update'. (string, optional)
- `method`: Operation to perform: 'create', 'update', or 'delete' (string, required)
- `name`: Label name - required for all operations (string, required)
- `new_name`: New name for the label (used only with 'update' method to rename) (string, optional)
- `owner`: Repository owner (username or organization name) (string, required)
- `repo`: Repository name (string, required)

</details>

<details>
Expand Down Expand Up @@ -993,9 +1038,11 @@ Possible options:

- **search_repositories** - Search repositories
- `minimal_output`: Return minimal repository information (default: true). When false, returns full GitHub API repository objects. (boolean, optional)
- `order`: Sort order (string, optional)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `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)
- `sort`: Sort repositories by field, defaults to best match (string, optional)

</details>

Expand Down
1 change: 1 addition & 0 deletions docs/remote-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Below is a table of available toolsets for the remote GitHub MCP Server. Each to
| Experiments | Experimental features that are not considered stable yet | https://api.githubcopilot.com/mcp/x/experiments | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/experiments/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%2Freadonly%22%7D) |
| Gists | GitHub Gist related tools | https://api.githubcopilot.com/mcp/x/gists | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-gists&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgists%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/gists/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-gists&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgists%2Freadonly%22%7D) |
| Issues | GitHub Issues related tools | https://api.githubcopilot.com/mcp/x/issues | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-issues&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fissues%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/issues/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-issues&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fissues%2Freadonly%22%7D) |
| Labels | GitHub Labels related tools | https://api.githubcopilot.com/mcp/x/labels | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-labels&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Flabels%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/labels/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-labels&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Flabels%2Freadonly%22%7D) |
| Notifications | GitHub Notifications related tools | https://api.githubcopilot.com/mcp/x/notifications | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-notifications&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fnotifications%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/notifications/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-notifications&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fnotifications%2Freadonly%22%7D) |
| Organizations | GitHub Organization related tools | https://api.githubcopilot.com/mcp/x/orgs | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-orgs&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Forgs%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/orgs/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-orgs&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Forgs%2Freadonly%22%7D) |
| Projects | GitHub Projects related tools | https://api.githubcopilot.com/mcp/x/projects | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-projects&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fprojects%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/projects/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-projects&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fprojects%2Freadonly%22%7D) |
Expand Down
30 changes: 30 additions & 0 deletions pkg/github/__toolsnaps__/get_label.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"annotations": {
"title": "Get a specific label from a repository.",
"readOnlyHint": true
},
"description": "Get a specific label from a repository.",
"inputSchema": {
"properties": {
"name": {
"description": "Label name.",
"type": "string"
},
"owner": {
"description": "Repository owner (username or organization name)",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"name"
],
"type": "object"
},
"name": "get_label"
}
29 changes: 29 additions & 0 deletions pkg/github/__toolsnaps__/list_label.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"annotations": {
"title": "List labels from a repository.",
"readOnlyHint": true
},
"description": "List labels from a repository or an issue",
"inputSchema": {
"properties": {
"issue_number": {
"description": "Issue number - if provided, lists labels on the specific issue",
"type": "number"
},
"owner": {
"description": "Repository owner (username or organization name) - required for all operations",
"type": "string"
},
"repo": {
"description": "Repository name - required for all operations",
"type": "string"
}
},
"required": [
"owner",
"repo"
],
"type": "object"
},
"name": "list_label"
}
18 changes: 18 additions & 0 deletions pkg/github/__toolsnaps__/search_repositories.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"description": "Return minimal repository information (default: true). When false, returns full GitHub API repository objects.",
"type": "boolean"
},
"order": {
"description": "Sort order",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
Expand All @@ -25,6 +33,16 @@
"query": {
"description": "Repository search query. Examples: 'machine learning in:name stars:\u003e1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.",
"type": "string"
},
"sort": {
"description": "Sort repositories by field, defaults to best match",
"enum": [
"stars",
"forks",
"help-wanted-issues",
"updated"
],
"type": "string"
}
},
"required": [
Expand Down
52 changes: 52 additions & 0 deletions pkg/github/__toolsnaps__/write_label.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"annotations": {
"title": "Write operations on repository labels.",
"readOnlyHint": false
},
"description": "Perform write operations on repository labels. To set labels on issues, use the 'update_issue' tool.",
"inputSchema": {
"properties": {
"color": {
"description": "Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'.",
"type": "string"
},
"description": {
"description": "Label description text. Optional for 'create' and 'update'.",
"type": "string"
},
"method": {
"description": "Operation to perform: 'create', 'update', or 'delete'",
"enum": [
"create",
"update",
"delete"
],
"type": "string"
},
"name": {
"description": "Label name - required for all operations",
"type": "string"
},
"new_name": {
"description": "New name for the label (used only with 'update' method to rename)",
"type": "string"
},
"owner": {
"description": "Repository owner (username or organization name)",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo",
"name"
],
"type": "object"
},
"name": "write_label"
}
5 changes: 4 additions & 1 deletion pkg/github/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ Tool selection guidance:

Context management:
1. Use pagination whenever possible with batches of 5-10 items.
2. Use minimal_output parameter set to true if the full information is not needed to accomplish a task.`
2. Use minimal_output parameter set to true if the full information is not needed to accomplish a task.

Tool usage guidance:
1. For 'search_*' tools: Use separate 'sort' and 'order' parameters if available for sorting results - do not include 'sort:' syntax in query strings. Query strings should contain only search criteria (e.g., 'org:google language:python'), not sorting instructions.`

allInstructions := []string{baseInstruction}
allInstructions = append(allInstructions, instructions...)
Expand Down
Loading
Loading