diff --git a/.github/workflows/publish-mcp-registry.yml b/.github/workflows/publish-mcp-registry.yml new file mode 100644 index 0000000..136596e --- /dev/null +++ b/.github/workflows/publish-mcp-registry.yml @@ -0,0 +1,59 @@ +name: Publish to MCP Registry + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Sync server.json version with release tag + run: | + VERSION="${GITHUB_REF_NAME#v}" + if [ -z "$VERSION" ] || [ "$VERSION" = "$GITHUB_REF_NAME" ]; then + VERSION=$(node -p "require('./package.json').version") + fi + echo "Publishing version: $VERSION" + node -e " + const fs = require('fs'); + const s = JSON.parse(fs.readFileSync('server.json', 'utf8')); + s.version = '$VERSION'; + for (const p of s.packages || []) p.version = '$VERSION'; + fs.writeFileSync('server.json', JSON.stringify(s, null, 2) + '\n'); + " + cat server.json + + - name: Wait for npm package to be available + run: | + VERSION=$(node -p "require('./server.json').version") + echo "Waiting for mcp-gsheets@$VERSION on npm..." + for i in $(seq 1 60); do + if npm view "mcp-gsheets@$VERSION" version 2>/dev/null | grep -q "^$VERSION$"; then + echo "Package available." + exit 0 + fi + echo "Not yet (attempt $i/60), sleeping 10s..." + sleep 10 + done + echo "Timed out waiting for npm package." + exit 1 + + - name: Install mcp-publisher + run: | + curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz" \ + | tar xz mcp-publisher + chmod +x mcp-publisher + + - name: Login to MCP Registry (GitHub OIDC) + run: ./mcp-publisher login github-oidc + + - name: Publish to MCP Registry + run: ./mcp-publisher publish diff --git a/README.md b/README.md index 5675a42..2388f58 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + + # MCP Google Sheets Server diff --git a/package-lock.json b/package-lock.json index affde49..6352312 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcp-gsheets", - "version": "1.7.1", + "version": "1.8.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mcp-gsheets", - "version": "1.7.1", + "version": "1.8.1", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.29.0", diff --git a/package.json b/package.json index 395c695..e0db8ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "mcp-gsheets", - "version": "1.8.0", + "version": "1.8.1", + "mcpName": "io.github.freema/mcp-gsheets", "description": "Model Context Protocol (MCP) server for Google Sheets API integration", "author": "freema", "license": "MIT", diff --git a/server.json b/server.json new file mode 100644 index 0000000..045d3d9 --- /dev/null +++ b/server.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json", + "name": "io.github.freema/mcp-gsheets", + "description": "MCP server for Google Sheets API — read, write, format, batch operations.", + "status": "active", + "repository": { + "url": "https://github.com/freema/mcp-gsheets", + "source": "github" + }, + "version": "1.8.1", + "packages": [ + { + "registryType": "npm", + "registryBaseUrl": "https://registry.npmjs.org", + "identifier": "mcp-gsheets", + "version": "1.8.1", + "transport": { + "type": "stdio" + }, + "environmentVariables": [ + { + "name": "GOOGLE_PROJECT_ID", + "description": "Google Cloud project ID", + "isRequired": true + }, + { + "name": "GOOGLE_APPLICATION_CREDENTIALS", + "description": "Path to service account key JSON file (auth method 1)", + "isRequired": false + }, + { + "name": "GOOGLE_SERVICE_ACCOUNT_KEY", + "description": "Service account key as JSON string (auth method 2)", + "isRequired": false, + "isSecret": true + }, + { + "name": "GOOGLE_PRIVATE_KEY", + "description": "Service account private key in PEM format (auth method 3)", + "isRequired": false, + "isSecret": true + }, + { + "name": "GOOGLE_CLIENT_EMAIL", + "description": "Service account email (auth method 3)", + "isRequired": false + } + ] + } + ] +}