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
62 changes: 62 additions & 0 deletions .github/workflows/publish-mcp.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.7.2] — 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, #135)

## [2.7.1] — 2026-11-10

### Changed
Expand Down Expand Up @@ -218,7 +223,8 @@ Sprint 1 security & contract correctness release.

---

[Unreleased]: https://github.com/hapheus/torproxy/compare/v2.7.1...HEAD
[Unreleased]: https://github.com/hapheus/torproxy/compare/v2.7.2...HEAD
[2.7.2]: https://github.com/hapheus/torproxy/compare/v2.7.1...v2.7.2
[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
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.1" \
org.opencontainers.image.version="2.7.2" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://github.com/hapheus/torproxy" \
org.opencontainers.image.url="https://github.com/hapheus/torproxy"
Expand Down
4 changes: 4 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ If an upgraded image exhibits unexpected behavior in your environment:

## 6. Release Notes

### 2.7.2 (MCP Registry automated publishing workflow)

- **Automated MCP Registry Publish (#134, #135):** 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*`).

### 2.7.1 (Dependency and GitHub Actions updates)

- **Dependency Updates (#130, #131):** Bumped `ruff` to 0.17.4 and updated GitHub Actions pin digests (CodeQL 4.39.3, docker/login-action 4.8.0, git-cliff-action 4.9.1, action-gh-release 3.0.4).
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "torproxy"
version = "2.7.1"
version = "2.7.2"
description = "A minimal HTTP and SOCKS5 proxy routed through the Tor network with local REST control API"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
4 changes: 2 additions & 2 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"name": "io.github.hapheus/torproxy",
"title": "torproxy",
"description": "Tor HTTP and SOCKS5 proxy with REST API and built-in MCP server.",
"version": "2.7.1",
"version": "2.7.2",
"repository": {
"url": "https://github.com/hapheus/torproxy",
"source": "github"
},
"packages": [
{
"registryType": "oci",
"identifier": "docker.io/hapheus/torproxy:2.7.1",
"identifier": "docker.io/hapheus/torproxy:2.7.2",
"transport": {
"type": "stdio"
},
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/test_ci_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading