From 47c851220d186380bfaa3a1605f6b3793a3d8904 Mon Sep 17 00:00:00 2001 From: Franz Haberfellner Date: Tue, 10 Nov 2026 20:01:39 +0100 Subject: [PATCH] feat(ci): add MCP Registry automated publish workflow and bump version to 2.7.1 (#134) --- .github/workflows/publish-mcp.yml | 62 +++++++++++++++++++++++++++++++ CHANGELOG.md | 9 ++++- docker/Dockerfile | 2 +- docs/releases.md | 5 +++ pyproject.toml | 2 +- server.json | 4 +- tests/unit/test_ci_workflows.py | 8 ++++ uv.lock | 2 +- 8 files changed, 88 insertions(+), 6 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..b29cb7a --- /dev/null +++ b/.github/workflows/publish-mcp.yml @@ -0,0 +1,62 @@ +name: Publish to MCP Registry + +# Triggers when a new version tag (e.g., v2.7.1) is pushed. +# +# Note on publishing architecture: +# - Gated strictly behind `verify-live` to prevent publishing untested configurations. +# - Uses GitHub Actions OIDC (`id-token: write`) to securely authenticate +# under the repository namespace `io.github.hapheus/*` without static tokens. +# - Validates `server.json` before publishing. + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + +permissions: + contents: read + +jobs: + verify-live: + name: "Live Image Verification (Pre-Publish Gate)" + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Run Live Image Verification + uses: ./.github/actions/live-verification + with: + image_ref: "torproxy:smoke-test" + build_local: "true" + run_alerts: "false" + dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} + + publish-mcp: + name: "Publish to MCP Registry" + needs: verify-live + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Install mcp-publisher + run: | + OS=$(uname -s | tr '[:upper:]' '[:lower:]') + ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') + curl -sSL "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_${OS}_${ARCH}.tar.gz" | tar xz mcp-publisher + chmod +x mcp-publisher + + - name: Validate server.json + run: ./mcp-publisher validate server.json + + - name: Authenticate with MCP Registry via GitHub OIDC + run: ./mcp-publisher login github-oidc + + - name: Publish server.json to MCP Registry + run: ./mcp-publisher publish server.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c8166c..da366eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.7.1] — 2026-11-10 + +### Added +- **ci**: Add automated GitHub Actions workflow to publish `server.json` to the official MCP Registry on release tags via GitHub OIDC (#134) +- **deps**: Update ruff to 0.17.4 (#130) + ## [2.7.0] — 2026-11-10 ### Added @@ -212,7 +218,8 @@ Sprint 1 security & contract correctness release. --- -[Unreleased]: https://github.com/hapheus/torproxy/compare/v2.7.0...HEAD +[Unreleased]: https://github.com/hapheus/torproxy/compare/v2.7.1...HEAD +[2.7.1]: https://github.com/hapheus/torproxy/compare/v2.7.0...v2.7.1 [2.7.0]: https://github.com/hapheus/torproxy/compare/v2.6.2...v2.7.0 [2.6.2]: https://github.com/hapheus/torproxy/compare/v2.6.1...v2.6.2 [2.6.1]: https://github.com/hapheus/torproxy/compare/v2.6.0...v2.6.1 diff --git a/docker/Dockerfile b/docker/Dockerfile index 7e3eeb9..b9b88fd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,7 +7,7 @@ ARG PYTHON_VERSION=3.14 LABEL org.opencontainers.image.title="torproxy" \ org.opencontainers.image.description="A minimal HTTP proxy routed through Tor" \ - org.opencontainers.image.version="2.7.0" \ + org.opencontainers.image.version="2.7.1" \ org.opencontainers.image.licenses="MIT" \ org.opencontainers.image.source="https://github.com/hapheus/torproxy" \ org.opencontainers.image.url="https://github.com/hapheus/torproxy" diff --git a/docs/releases.md b/docs/releases.md index 798749f..df20271 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -91,6 +91,11 @@ If an upgraded image exhibits unexpected behavior in your environment: ## 6. Release Notes +### 2.7.1 (MCP Registry automated publishing workflow) + +- **Automated MCP Registry Publish (#134):** Added `.github/workflows/publish-mcp.yml` using GitHub Actions OIDC (`id-token: write`) to automatically publish the verified `server.json` to `registry.modelcontextprotocol.io` upon pushing release tags (`v*`). +- **Dependencies (#130):** Bumped ruff to 0.17.4. + ### 2.7.0 (Model Context Protocol Registry manifest) - **Official MCP Registry Manifest (#132):** Added standardized `server.json` manifest conforming to schema `2025-12-11` under namespace `io.github.hapheus/torproxy` for OCI container distribution via `docker.io/hapheus/torproxy:2.7.0`. Validated against `registry.modelcontextprotocol.io`. diff --git a/pyproject.toml b/pyproject.toml index 7d35e7b..d199a76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "torproxy" -version = "2.7.0" +version = "2.7.1" description = "A minimal HTTP and SOCKS5 proxy routed through the Tor network with local REST control API" readme = "README.md" requires-python = ">=3.10" diff --git a/server.json b/server.json index 22f51e6..4764733 100644 --- a/server.json +++ b/server.json @@ -3,7 +3,7 @@ "name": "io.github.hapheus/torproxy", "title": "torproxy", "description": "Tor HTTP and SOCKS5 proxy with REST API and built-in MCP server.", - "version": "2.7.0", + "version": "2.7.1", "repository": { "url": "https://github.com/hapheus/torproxy", "source": "github" @@ -11,7 +11,7 @@ "packages": [ { "registryType": "oci", - "identifier": "docker.io/hapheus/torproxy:2.7.0", + "identifier": "docker.io/hapheus/torproxy:2.7.1", "transport": { "type": "stdio" }, diff --git a/tests/unit/test_ci_workflows.py b/tests/unit/test_ci_workflows.py index 659e48e..c5178ef 100644 --- a/tests/unit/test_ci_workflows.py +++ b/tests/unit/test_ci_workflows.py @@ -113,6 +113,14 @@ def test_release_waits_for_live_verification() -> None: assert "verify-live" in release +def test_publish_mcp_waits_for_live_verification() -> None: + publish_mcp = _read("publish-mcp.yml") + assert "uses: ./.github/actions/live-verification" in publish_mcp + assert "needs: verify-live" in publish_mcp or "needs: [verify-live]" in publish_mcp + assert "id-token: write" in publish_mcp + assert "mcp-publisher login github-oidc" in publish_mcp + + def test_daily_canary_reuses_the_shared_action() -> None: daily = _read("daily-image-verification.yml") assert "schedule:" in daily diff --git a/uv.lock b/uv.lock index 38d92ac..831b417 100644 --- a/uv.lock +++ b/uv.lock @@ -842,7 +842,7 @@ wheels = [ [[package]] name = "torproxy" -version = "2.7.0" +version = "2.7.1" source = { editable = "." } [package.optional-dependencies]