diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6db39f..7cd506c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,12 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - 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: Authenticate to MCP Registry + run: ./mcp-publisher login github-oidc + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: diff --git a/.gitignore b/.gitignore index efccf29..66a12ee 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ config.yaml # Build artifacts latest.txt +server.json completions/ # Claude diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d520b22..9d6827a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -189,7 +189,7 @@ changelog: - "^specs:" # TODO: Other files that should be ignored -# PackageCloud publisher for Linux packages +# Publishers for external registries publishers: # Upload all Linux packages (deb, rpm) to PackageCloud - name: packagecloud @@ -206,6 +206,13 @@ publishers: env: - PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }} + # Publish server.json to MCP Registry + - name: mcp-registry + disable: '{{ ne .Prerelease "" }}' # Skip this step for prereleases + ids: + - docker # Only publish docker images + cmd: sh -c 'sed "s/\$VERSION/{{ .Version }}/g" server-template.json > server.json && ./mcp-publisher publish' + # Release configuration release: github: diff --git a/server-template.json b/server-template.json new file mode 100644 index 0000000..b91030f --- /dev/null +++ b/server-template.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", + "name": "io.github.timescale/tiger-cli", + "title": "Tiger MCP", + "description": "Provides programmatic access to Tiger Cloud services, databases, and documentation.", + "version": "$VERSION", + "homepage": "https://github.com/timescale/tiger-cli", + "repository": { + "url": "https://github.com/timescale/tiger-cli", + "source": "github" + }, + "packages": [ + { + "registryType": "oci", + "identifier": "ghcr.io/timescale/tiger-cli:$VERSION", + "transport": { + "type": "stdio" + }, + "runtimeArguments": [ + { + "type": "named", + "description": "Mount the config directory into the volume", + "name": "--mount", + "value": "type=bind,src={source_path},dst=/home/tiger/.config/tiger", + "variables": { + "source_path": { + "description": "Source path on host", + "format": "filepath", + "isRequired": true, + "default": "${HOME}/.config/tiger" + } + } + }, + { + "type": "named", + "description": "Mount the .pgpass file into the volume", + "name": "--mount", + "value": "type=bind,src={source_path},dst=/home/tiger/.pgpass", + "variables": { + "source_path": { + "description": "Source path on host", + "format": "filepath", + "isRequired": true, + "default": "${HOME}/.pgpass" + } + } + } + ], + "environmentVariables": [ + { + "name": "TIGER_PUBLIC_KEY", + "description": "Tiger Cloud API public key for authentication", + "format": "string", + "isRequired": true, + "isSecret": false + }, + { + "name": "TIGER_SECRET_KEY", + "description": "Tiger Cloud API secret key for authentication", + "format": "string", + "isRequired": true, + "isSecret": true + } + ] + } + ] +}