Generate MCP Manifest workflow (pathintegral-institute/mcpm.sh)
The Generate MCP Manifest workflow from pathintegral-institute/mcpm.sh, explained and optimized by Latchkey.
CI health: C - fair
Point runs-on at Latchkey and get caching, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Generate MCP Manifest workflow from the pathintegral-institute/mcpm.sh 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: Generate MCP Manifest
on:
workflow_dispatch:
inputs:
repo_url:
description: 'Repository URL to generate manifest for'
required: true
type: string
repository_dispatch:
types: [generate-manifest]
issues:
types: [opened, labeled]
jobs:
generate-manifest:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'server submission') }}
permissions:
contents: write
pull-requests: write
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.MCPM_REGISTRY_BOT_APP_ID }}
private-key: ${{ secrets.MCPM_REGISTRY_BOT_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Extract repository URL from issue
id: extract-url
if: github.event_name == 'issues'
env:
ISSUE_BODY: ${{ github.event.issue.body }}
run: |
# Extract the repository URL from the GitHub issue form
# The form renders the repository field as a URL line after the label
REPO_URL=$(echo "$ISSUE_BODY" | grep -oP 'https://github\.com/[^\s]+' | head -1)
if [ -z "$REPO_URL" ]; then
echo "No GitHub repository URL found in issue body"
echo "Issue body: $ISSUE_BODY"
exit 1
fi
echo "Found repository URL: $REPO_URL"
echo "repo_url=$REPO_URL" >> $GITHUB_OUTPUT
- name: Generate manifest
env:
ANYON_API_KEY: ${{ secrets.ANYON_API_KEY }}
run: |
REPO_URL="${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }}"
python scripts/get_manifest.py "$REPO_URL"
- name: Extract repo name for branch
id: repo-info
run: |
REPO_URL="${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }}"
REPO_NAME=$(echo "$REPO_URL" | sed 's/.*github\.com[:/]//' | sed 's/\.git$//' | tr '/' '-')
echo "repo_name=$REPO_NAME" >> $GITHUB_OUTPUT
echo "branch_name=add-manifest-$REPO_NAME" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: |
feat: add manifest for ${{ steps.repo-info.outputs.repo_name }}
Generated manifest JSON for repository: ${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }}
Co-Authored-By: Lucien
title: "feat: Add MCP manifest for ${{ steps.repo-info.outputs.repo_name }}"
body: |
## Summary
This PR adds a new MCP server manifest generated from the repository: ${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }}
## Changes
- Added new manifest JSON file in `mcp-registry/servers/`
- Manifest was automatically generated using the chatxiv.org API
## Test plan
- [ ] Verify the generated JSON is valid
- [ ] Check that all required fields are present
- [ ] Validate installation instructions work correctly
---
🤖 Generated with [Claude Code](https://claude.ai/code)
branch: ${{ steps.repo-info.outputs.branch_name }}
delete-branch: true
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: Generate MCP Manifest on: workflow_dispatch: inputs: repo_url: description: 'Repository URL to generate manifest for' required: true type: string repository_dispatch: types: [generate-manifest] issues: types: [opened, labeled] jobs: generate-manifest: timeout-minutes: 30 runs-on: latchkey-small if: ${{ github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'server submission') }} permissions: contents: write pull-requests: write steps: - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.MCPM_REGISTRY_BOT_APP_ID }} private-key: ${{ secrets.MCPM_REGISTRY_BOT_PRIVATE_KEY }} - name: Checkout repository uses: actions/checkout@v4 with: token: ${{ steps.app-token.outputs.token }} - name: Set up Python uses: actions/setup-python@v4 with: cache: 'pip' python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip pip install requests - name: Extract repository URL from issue id: extract-url if: github.event_name == 'issues' env: ISSUE_BODY: ${{ github.event.issue.body }} run: | # Extract the repository URL from the GitHub issue form # The form renders the repository field as a URL line after the label REPO_URL=$(echo "$ISSUE_BODY" | grep -oP 'https://github\.com/[^\s]+' | head -1) if [ -z "$REPO_URL" ]; then echo "No GitHub repository URL found in issue body" echo "Issue body: $ISSUE_BODY" exit 1 fi echo "Found repository URL: $REPO_URL" echo "repo_url=$REPO_URL" >> $GITHUB_OUTPUT - name: Generate manifest env: ANYON_API_KEY: ${{ secrets.ANYON_API_KEY }} run: | REPO_URL="${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }}" python scripts/get_manifest.py "$REPO_URL" - name: Extract repo name for branch id: repo-info run: | REPO_URL="${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }}" REPO_NAME=$(echo "$REPO_URL" | sed 's/.*github\.com[:/]//' | sed 's/\.git$//' | tr '/' '-') echo "repo_name=$REPO_NAME" >> $GITHUB_OUTPUT echo "branch_name=add-manifest-$REPO_NAME" >> $GITHUB_OUTPUT - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ steps.app-token.outputs.token }} commit-message: | feat: add manifest for ${{ steps.repo-info.outputs.repo_name }} Generated manifest JSON for repository: ${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }} Co-Authored-By: Lucien title: "feat: Add MCP manifest for ${{ steps.repo-info.outputs.repo_name }}" body: | ## Summary This PR adds a new MCP server manifest generated from the repository: ${{ github.event.inputs.repo_url || github.event.client_payload.repo_url || steps.extract-url.outputs.repo_url }} ## Changes - Added new manifest JSON file in `mcp-registry/servers/` - Manifest was automatically generated using the chatxiv.org API ## Test plan - [ ] Verify the generated JSON is valid - [ ] Check that all required fields are present - [ ] Validate installation instructions work correctly --- 🤖 Generated with [Claude Code](https://claude.ai/code) branch: ${{ steps.repo-info.outputs.branch_name }} delete-branch: true
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. - 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.