MCP Neo4j Cypher Generate and Upload DXT File workflow (neo4j-contrib/mcp-neo4j)
The MCP Neo4j Cypher Generate and Upload DXT File workflow from neo4j-contrib/mcp-neo4j, explained and optimized by Latchkey.
CI health: F - at risk
Point runs-on at Latchkey and get caching, run de-duplication, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the MCP Neo4j Cypher Generate and Upload DXT File 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: MCP Neo4j Cypher Generate and Upload DXT File
on:
push:
tags:
- mcp-neo4j-cypher-v*
workflow_dispatch: # Allows manual triggering of the workflow
inputs:
release_tag:
description: 'Release tag to add .dxt file to (e.g., mcp-neo4j-cypher-v1.0.0)'
required: true
type: string
permissions:
contents: write
jobs:
generate-dxt:
runs-on: ubuntu-latest
steps:
- name: Determine tag name
id: tag
run: |
if [ "${{ github.event_name }}" = "push" ]; then
TAG_NAME="${{ github.ref_name }}"
echo "Tag from push event: $TAG_NAME"
else
TAG_NAME="${{ github.event.inputs.release_tag }}"
echo "Tag from manual input: $TAG_NAME"
fi
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
- name: Checkout code at specific tag
uses: actions/checkout@v4
with:
ref: ${{ steps.tag.outputs.tag_name }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: "servers/mcp-neo4j-cypher/pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Setup Node.js for dxt
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Anthropic dxt
run: npm install -g @anthropic-ai/dxt@0.2.0
- name: Setup Python environment and dependencies with uv
run: |
cd servers/mcp-neo4j-cypher/
uv sync
# Install the package in development mode
uv pip install -e .
- name: Generate .dxt file
run: |
cd servers/mcp-neo4j-cypher/
echo "Running dxt pack with uv..."
uv run dxt pack .
- name: Upload .dxt file to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ steps.tag.outputs.tag_name }}" \
servers/mcp-neo4j-cypher/*.dxt \
--clobber
The same workflow, on Latchkey
Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.
name: MCP Neo4j Cypher Generate and Upload DXT File on: push: tags: - mcp-neo4j-cypher-v* workflow_dispatch: # Allows manual triggering of the workflow inputs: release_tag: description: 'Release tag to add .dxt file to (e.g., mcp-neo4j-cypher-v1.0.0)' required: true type: string permissions: contents: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: generate-dxt: timeout-minutes: 30 runs-on: latchkey-small steps: - name: Determine tag name id: tag run: | if [ "${{ github.event_name }}" = "push" ]; then TAG_NAME="${{ github.ref_name }}" echo "Tag from push event: $TAG_NAME" else TAG_NAME="${{ github.event.inputs.release_tag }}" echo "Tag from manual input: $TAG_NAME" fi echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - name: Checkout code at specific tag uses: actions/checkout@v4 with: ref: ${{ steps.tag.outputs.tag_name }} - name: Setup Python uses: actions/setup-python@v5 with: python-version-file: "servers/mcp-neo4j-cypher/pyproject.toml" - name: Install uv uses: astral-sh/setup-uv@v5 - name: Setup Node.js for dxt uses: actions/setup-node@v4 with: cache: 'npm' node-version: '18' - name: Install Anthropic dxt run: npm install -g @anthropic-ai/dxt@0.2.0 - name: Setup Python environment and dependencies with uv run: | cd servers/mcp-neo4j-cypher/ uv sync # Install the package in development mode uv pip install -e . - name: Generate .dxt file run: | cd servers/mcp-neo4j-cypher/ echo "Running dxt pack with uv..." uv run dxt pack . - name: Upload .dxt file to release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release upload "${{ steps.tag.outputs.tag_name }}" \ servers/mcp-neo4j-cypher/*.dxt \ --clobber
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. - Cancel superseded runs when a branch or PR gets a newer push.
- Cache dependency installs on the setup step so they are served from cache.
- Add a job timeout so a hung step cannot burn hours of runner time.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
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:
- Dependency installs
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.