Publish Cypher MCP to Github MCP Registry workflow (neo4j-contrib/mcp-neo4j)
The Publish Cypher MCP to Github MCP Registry workflow from neo4j-contrib/mcp-neo4j, explained and optimized by Latchkey.
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Publish Cypher MCP to Github MCP Registry workflow from the neo4j-contrib/mcp-neo4j repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Publish Cypher MCP to Github MCP Registry
on:
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # For OIDC
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
# MCP publishing (works for all package types)
- name: Download MCP Publisher
run: |
LATEST_VERSION=$(curl -s https://api.github.com/repos/modelcontextprotocol/registry/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/${LATEST_VERSION}/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz
- name: Publish to MCP Registry
run: |
chmod +x mcp-publisher
cd servers/mcp-neo4j-cypher/
../../mcp-publisher login github-oidc
../../mcp-publisher publish
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Publish Cypher MCP to Github MCP Registry on: workflow_dispatch: # Allows manual triggering of the workflow jobs: publish: timeout-minutes: 30 runs-on: latchkey-small permissions: id-token: write # For OIDC contents: read steps: - name: Checkout repository uses: actions/checkout@v4 # MCP publishing (works for all package types) - name: Download MCP Publisher run: | LATEST_VERSION=$(curl -s https://api.github.com/repos/modelcontextprotocol/registry/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') curl -L "https://github.com/modelcontextprotocol/registry/releases/download/${LATEST_VERSION}/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz - name: Publish to MCP Registry run: | chmod +x mcp-publisher cd servers/mcp-neo4j-cypher/ ../../mcp-publisher login github-oidc ../../mcp-publisher publish
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Network fetches
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.