Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 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
52 changes: 52 additions & 0 deletions .github/workflows/registry-releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish to MCP Registry

on:
push:
tags: ["v*"] # Triggers on version tags like v1.0.0
workflow_dispatch: # Allow manual triggering

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC authentication
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Fetch tags
run: git fetch --tags

- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq

- name: Install MCP Publisher
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher

- name: Update server.json version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
# Use the tag that triggered the workflow
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
echo "Using triggered tag: ${{ github.ref_name }}"
else
# Fallback to latest tag (for manual triggers)
LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
if [ -z "$LATEST_TAG" ]; then
echo "❌ No release tag found. Cannot determine version."
exit 1
fi
TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
echo "Using latest tag: $LATEST_TAG"
fi
jq ".version = \"$TAG_VERSION\" | .packages[].version = \"$TAG_VERSION\"" server.json > server.json.tmp && mv server.json.tmp server.json
echo "Updated server.json version to $TAG_VERSION"

- name: Login to MCP Registry
run: ./mcp-publisher login github-oidc

- name: Publish to MCP Registry
run: ./mcp-publisher publish
72 changes: 72 additions & 0 deletions server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json",
"name": "io.github.github/github-mcp-server",
"description": "Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.",
"status": "active",
"repository": {
"url": "https://github.com/github/github-mcp-server",
"source": "github"
},
"version": "0.0.0",
"packages": [
{
"registryType": "oci",
"registryBaseUrl": "https://ghcr.io",
"identifier": "ghcr.io/github/github-mcp-server",
"version": "0.0.0",
Comment on lines 10 to 16
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded version '0.0.0' should be dynamically updated. Consider using a placeholder or template variable that gets replaced during the build process to avoid manual version updates.

Suggested change
"version": "0.0.0",
"packages": [
{
"registryType": "oci",
"registryBaseUrl": "https://ghcr.io",
"identifier": "ghcr.io/github/github-mcp-server",
"version": "0.0.0",
"version": "${VERSION}",
"packages": [
{
"registryType": "oci",
"registryBaseUrl": "https://ghcr.io",
"identifier": "ghcr.io/github/github-mcp-server",
"version": "${VERSION}",

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hardcoded version should match the root version field and be dynamically managed. Having multiple hardcoded version fields creates maintenance overhead and potential inconsistencies.

Suggested change
"version": "0.0.0",

Copilot uses AI. Check for mistakes.
"runtimeHint": "docker",
"transport": {
"type": "stdio"
},
"runtimeArguments": [
{
"type": "positional",
"value": "run",
"description": "The runtime command to execute"
},
{
"type": "named",
"name": "-i",
"description": "Run container in interactive mode"
},
{
"type": "named",
"name": "--rm",
"description": "Automatically remove the container when it exits"
},
{
"type": "named",
"name": "-e",
"description": "Set an environment variable in the runtime"
},
{
"type": "positional",
"valueHint": "env_var_name",
"value": "GITHUB_PERSONAL_ACCESS_TOKEN",
"description": "Environment variable name"
},
{
"type": "positional",
"valueHint": "image_name",
"value": "ghcr.io/github/github-mcp-server",
"description": "The container image to run"
}
],
"environmentVariables": [
{
"description": "Your GitHub personal access token with appropriate scopes.",
"isRequired": true,
"format": "string",
"isSecret": true,
"name": "GITHUB_PERSONAL_ACCESS_TOKEN"
}
]
}
],
"remotes": [
{
"type": "streamable-http",
"url": "https://api.githubcopilot.com/mcp/"
}
]
}
Loading