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
12 changes: 11 additions & 1 deletion .github/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ extraFiles: [
"docs/en/how-to/connect-ide/neo4j_mcp.md",
"docs/en/how-to/connect-ide/sqlite_mcp.md",
"gemini-extension.json",
]
{
"type": "json",
"path": ".registry/server.json",
"jsonpath": "$.version"
},
{
"type": "json",
"path": ".registry/server.json",
"jsonpath": "$.packages[0].identifier"
},
]
73 changes: 73 additions & 0 deletions .github/workflows/publish-mcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Publish to MCP Registry

on:
push:
tags: ["v*"] # Triggers on version tags like v1.0.0
# allow manual triggering with no inputs required
workflow_dispatch:

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: Wait for image in Artifact Registry
shell: bash
run: |
MAX_ATTEMPTS=10
VERSION=$(jq -r '.version' server.json)
REGISTRY_URL="https://us-central1-docker.pkg.dev/v2/database-toolbox/toolbox/toolbox/manifests/${VERSION}"

# initially sleep time to wait for the version release
sleep 3m

for i in $(seq 1 ${MAX_ATTEMPTS}); do
echo "Attempt $i: Checking for image ${REGISTRY_URL}..."
# Use curl to check the manifest header
# Using -I to fetch headers only, -s silent, -f fail fast on errors.
curl -Isf "${REGISTRY_URL}" > /dev/null

if [ $? -eq 0 ]; then
echo "✅ Image found! Continuing to next steps."
exit 0
else
echo "❌ Image not found (likely 404 error) on attempt $i."
if [ $i -lt ${MAX_ATTEMPTS} ]; then
echo "Sleeping for 5 minutes before next attempt..."
sleep 2m
else
echo "Maximum attempts reached. Image not found."
exit 1
fi
fi
done

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

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

- name: Publish to MCP Registry
run: ./mcp-publisher publish --file=.registry/server.json
71 changes: 71 additions & 0 deletions .registry/server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
"name": "io.github.googleapis/genai-toolbox",
"description": "MCP Toolbox for Databases enables your agent to connect to your database.",
"title": "MCP Toolbox",
"websiteUrl": "https://github.com/googleapis/genai-toolbox",
"icons": [
{
"src": "https://github.com/googleapis/genai-toolbox/blob/main/.hugo/assets/icons/logo.svg",
"mimeType": "image/svg+xml"
}
],
"repository": {
"url": "https://github.com/googleapis/genai-toolbox",
"source": "github"
},
"version": "0.19.1",
"packages": [
{
"registryType": "oci",
"registryBaseUrl": "https://artifactregistry.googleapis.com",
"identifier": "us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:0.19.1",
"transport": {
"type": "streamable-http",
"url": "http://{host}:{port}/mcp"
},
"runtimeArguments": [
{
"type": "named",
"name": "--tools-file",
"description": "File path specifying the tool configuration.",
"default": "tools.yaml",
"isRequired": false
},
{
"type": "named",
"name": "--address",
"description": "Address of the interface the server will listen on.",
"value": "{host}",
"variables": {
"host": {
"description": "ip address",
"isRequired": true,
"default": "127.0.0.1"
}
}
},
{
"type": "named",
"name": "--port",
"description": "Port the server will listen on.",
"value": "{port}",
"variables": {
"port": {
"description": "port",
"isRequired": true,
"default": "5000"
}
}
},
{
"type": "named",
"name": "--log-level",
"description": "Specify the minimum level logged.",
"default": "info",
"choices": ["debug", "info", "warn", "error"]
}
]
}
]
}
Loading