From 99b8269e95b44360f37754ec9dcfb4f1f988700f Mon Sep 17 00:00:00 2001 From: Richard-Otterli Date: Sun, 22 Feb 2026 00:50:39 +0000 Subject: [PATCH 1/2] publish mcp pipeline --- .github/workflows/publish-mcp.yml | 67 +++++++++++++++++++++++++++++++ server.json | 4 +- 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish-mcp.yml diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.yml new file mode 100644 index 0000000..0b2efbb --- /dev/null +++ b/.github/workflows/publish-mcp.yml @@ -0,0 +1,67 @@ +name: Publish MCP Server + +on: + release: + types: [published] + +permissions: + contents: read + id-token: write + +jobs: + publish-mcp: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Derive release version + id: version + run: | + TAG="${{ github.event.release.tag_name }}" + VERSION="${TAG#v}" + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + echo "Publishing MCP metadata for version: ${VERSION}" + + - name: Wait for PyPI package availability + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + set -euo pipefail + URL="https://pypi.org/pypi/specleft/${VERSION}/json" + + for attempt in $(seq 1 30); do + if curl -fsS "$URL" >/dev/null; then + echo "PyPI release available: specleft==${VERSION}" + exit 0 + fi + + echo "PyPI release not available yet (attempt ${attempt}/30). Retrying in 20s..." + sleep 20 + done + + echo "Timed out waiting for specleft==${VERSION} on PyPI" + exit 1 + + - name: Install mcp-publisher + run: | + CLI_VERSION="$(curl -fsSL https://api.github.com/repos/modelcontextprotocol/registry/releases/latest | jq -r '.tag_name' | sed 's/^v//')" + OS="$(uname -s | tr '[:upper:]' '[:lower:]')" + ARCH="$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')" + curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/download/v${CLI_VERSION}/mcp-publisher_${CLI_VERSION}_${OS}_${ARCH}.tar.gz" | tar xz mcp-publisher + + - name: Sync server.json version fields + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + jq --arg v "$VERSION" '.version = $v | .packages = (.packages | map(.version = $v))' server.json > server.tmp + mv server.tmp server.json + + - name: Validate server.json + run: ./mcp-publisher publish --dry-run + + - name: Authenticate to MCP Registry (GitHub OIDC) + run: ./mcp-publisher login github-oidc + + - name: Publish to MCP Registry + run: ./mcp-publisher publish diff --git a/server.json b/server.json index b030341..0da3de4 100644 --- a/server.json +++ b/server.json @@ -1,8 +1,8 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", - "name": "io.github.SpecLeft/specleft", + "name": "io.github.specleft/specleft", "title": "SpecLeft", - "description": "Track and enforce Python feature coverage with verifiable safety guarantees. Generates pytest test scaffolding from markdown specifications, monitors implementation progress, and blocks PRs that violate coverage policies. Agent-optimised: 3 resources, 1 tool, offline-only, no telemetry, no API keys required.", + "description": "Python intent tracing MCP: map specs to pytest tests, monitor implementation progress, offline-only.", "version": "0.3.0", "websiteUrl": "https://specleft.dev", "repository": { From dc432717453471e579fcb4c07d5f3366e5b48877 Mon Sep 17 00:00:00 2001 From: Richard-Otterli Date: Sun, 22 Feb 2026 00:56:48 +0000 Subject: [PATCH 2/2] Update publish-mcp.yml --- .github/workflows/publish-mcp.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.yml index 0b2efbb..d312239 100644 --- a/.github/workflows/publish-mcp.yml +++ b/.github/workflows/publish-mcp.yml @@ -3,6 +3,12 @@ name: Publish MCP Server on: release: types: [published] + workflow_dispatch: + inputs: + version: + description: "Version to publish (e.g. 0.3.0). Leave blank to use server.json version." + required: false + type: string permissions: contents: read @@ -18,8 +24,15 @@ jobs: - name: Derive release version id: version run: | - TAG="${{ github.event.release.tag_name }}" - VERSION="${TAG#v}" + if [ "${{ github.event_name }}" = "release" ]; then + TAG="${{ github.event.release.tag_name }}" + VERSION="${TAG#v}" + elif [ -n "${{ github.event.inputs.version }}" ]; then + VERSION="${{ github.event.inputs.version }}" + else + VERSION="$(jq -r '.version' server.json)" + fi + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "Publishing MCP metadata for version: ${VERSION}"