Skip to content

Commit 35d86df

Browse files
Feat - add Code Assist to Anthropic MCP Marketplace registry (#41)
* feat: Add server configuration file and update MCP name in package.json * feat: Update .gitignore to include MCP Registry local authentication tokens * feat: Add MCP publishing workflow and integrate with existing publish process * feat: Bump version to 0.2.0 in package and server manifests * Release v0.2.0: Version bump and manual release documentation - Bump version from 0.1.7 to 0.2.0 (minor release for new features) - Update package.json, server.json, and .release-please-manifest.json - Add .mcpregistry_* to .gitignore for security - Add developer documentation for manual MCP publishing process - Note GitHub Actions workflow bug requiring manual releases * revert mcp publush steps from public readme * fix: Update MCP name in package.json and server.json to match the correct repository * Update .github/workflows/publish-mcp.yml Co-authored-by: Nils Ingwersen <32036474+nilsingwersen@users.noreply.github.com> * Update .github/workflows/publish-mcp.yml Co-authored-by: Nils Ingwersen <32036474+nilsingwersen@users.noreply.github.com> * Update .github/workflows/publish-mcp.yml Co-authored-by: Nils Ingwersen <32036474+nilsingwersen@users.noreply.github.com> * Update .github/workflows/publish-mcp.yml Co-authored-by: Nils Ingwersen <32036474+nilsingwersen@users.noreply.github.com> * Update .github/workflows/publish-mcp.yml Co-authored-by: Nils Ingwersen <32036474+nilsingwersen@users.noreply.github.com> --------- Co-authored-by: Nils Ingwersen <32036474+nilsingwersen@users.noreply.github.com>
1 parent 7712154 commit 35d86df

6 files changed

Lines changed: 169 additions & 3 deletions

File tree

.github/workflows/publish-mcp.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Workflow to publish MCP server to the official MCP Registry
16+
name: Publish MCP Server
17+
18+
on:
19+
workflow_call:
20+
inputs:
21+
package_published:
22+
description: 'Whether the NPM package was successfully published'
23+
required: true
24+
type: boolean
25+
workflow_dispatch: # manual trigger for testing
26+
27+
concurrency:
28+
group: mcp-publishing
29+
cancel-in-progress: true
30+
31+
jobs:
32+
publish-mcp:
33+
runs-on: ubuntu-latest
34+
if: ${{ inputs.package_published }}
35+
permissions:
36+
id-token: write # Required for GitHub OIDC authentication
37+
contents: read
38+
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v5
42+
43+
- name: Setup Node.js
44+
uses: actions/setup-node@v5
45+
with:
46+
node-version: 22
47+
48+
- name: Setup Go (for MCP Publisher)
49+
uses: actions/setup-go@v6
50+
with:
51+
go-version: '1.24'
52+
53+
- name: Install and Build MCP Publisher
54+
run: |
55+
git clone --depth 1 https://github.com/modelcontextprotocol/registry mcp-registry
56+
cd mcp-registry
57+
make publisher
58+
cp cmd/publisher/bin/mcp-publisher ../mcp-publisher
59+
cd ..
60+
chmod +x mcp-publisher
61+
rm -rf mcp-registry
62+
63+
- name: Validate server.json
64+
working-directory: packages/code-assist
65+
run: |
66+
# Basic validation that server.json exists and has required fields
67+
if [ ! -f "server.json" ]; then
68+
echo "❌ server.json not found"
69+
exit 1
70+
fi
71+
72+
# Check for required fields using jq
73+
if ! command -v jq &> /dev/null; then
74+
sudo apt-get update && sudo apt-get install -y jq
75+
fi
76+
77+
name=$(jq -r '.name // empty' server.json)
78+
if [ -z "$name" ]; then
79+
echo "❌ server.json missing 'name' field"
80+
exit 1
81+
fi
82+
83+
echo "✅ server.json validation passed"
84+
echo "📦 Publishing MCP server: $name"
85+
86+
- name: Login to MCP Registry (GitHub OIDC)
87+
working-directory: packages/code-assist
88+
run: |
89+
echo "🔐 Authenticating with MCP Registry using GitHub OIDC..."
90+
../mcp-publisher login github-oidc
91+
92+
- name: Publish to MCP Registry
93+
working-directory: packages/code-assist
94+
run: |
95+
echo "🚀 Publishing to MCP Registry..."
96+
../mcp-publisher publish
97+
98+
- name: Verify Publication
99+
working-directory: packages/code-assist
100+
run: |
101+
# Extract server name from server.json for verification
102+
server_name=$(jq -r '.name' server.json)
103+
registry_url="https://registry.modelcontextprotocol.io/servers/${server_name}"
104+
105+
echo "📡 Verifying publication at: $registry_url"
106+
107+
# Wait a moment for registry to update
108+
sleep 10
109+
110+
# Check if server appears in registry
111+
if curl -f -s "$registry_url" > /dev/null; then
112+
echo "✅ MCP server successfully published and verified!"
113+
echo "🌐 Available at: $registry_url"
114+
else
115+
echo "⚠️ Publication completed but verification failed. This may be due to registry propagation delays."
116+
echo "🔍 Manual verification recommended at: $registry_url"
117+
fi
118+
119+
- name: Notify on Success
120+
if: success()
121+
run: |
122+
server_name=$(jq -r '.name' packages/code-assist/server.json)
123+
echo "✅ MCP Server '$server_name' published successfully to the MCP Registry!"
124+
125+
- name: Notify on Failure
126+
if: failure()
127+
run: |
128+
echo "❌ MCP Server publishing failed. Check the logs above for details."
129+
echo "💡 Common issues:"
130+
echo " - Package not yet available on NPM (try again in a few minutes)"
131+
echo " - server.json validation errors"
132+
echo " - Authentication issues"

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ jobs:
6262
env:
6363
# The NODE_AUTH_TOKEN is used to authenticate against the Wombat Dressing Room registry.
6464
NODE_AUTH_TOKEN: ${{ secrets.NPM_WOMBOT_TOKEN }}
65+
66+
# Publish to MCP Registry after successful NPM publishing
67+
publish-mcp:
68+
needs: publish
69+
if: ${{ needs.publish.result == 'success' }}
70+
uses: ./.github/workflows/publish-mcp.yml
71+
with:
72+
package_published: true
73+
secrets: inherit

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"packages/code-assist": "0.1.7"
2+
"packages/code-assist": "0.2.0"
33
}

packages/code-assist/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ coverage/
3434
# Temporary files
3535
*.tmp
3636
.temp/
37-
tmp/
37+
tmp/
38+
39+
# MCP Registry local authentication tokens
40+
.mcpregistry_*

packages/code-assist/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@googlemaps/code-assist-mcp",
3-
"version": "0.1.7",
3+
"version": "0.2.0",
4+
"mcpName": "io.github.googlemaps/code-assist-mcp",
45
"main": "dist/index.js",
56
"type": "module",
67
"bin": {

packages/code-assist/server.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
3+
"name": "io.github.googlemaps/code-assist-mcp",
4+
"description": "Google Maps Platform Code Assist MCP",
5+
"status": "active",
6+
"repository": {
7+
"url": "https://github.com/googlemaps/platform-ai",
8+
"source": "github"
9+
},
10+
"version": "0.2.0",
11+
"packages": [
12+
{
13+
"registry_type": "npm",
14+
"identifier": "@googlemaps/code-assist-mcp",
15+
"version": "0.2.0",
16+
"transport": {
17+
"type": "stdio"
18+
}
19+
}
20+
]
21+
}

0 commit comments

Comments
 (0)