Skip to content

fix: eliminate version/skill drift in MCP release pipeline #78

Description

@markballew

Problem

When any MCP repo releases a new version, several artifacts go stale:

  • Git URL pins in plugin.json args (e.g. @v0.3.5 stays while version bumps to v1.2.0)
  • Skill copies in .cursor-plugin/skills/ and .opencode/skills/ diverge from canonical skills/
  • .mcp.json, opencode.json, .openhands/mcp.json, AGENTS.md keep old version strings

This affects all 10+ MCP repos. The tooling exists (mcp-plugin-gen generate/check) but nothing triggers it at the right times.

Evidence: agent-memory v1.2.0 release

During the v1.2.0 release of agent-memory, all four failure modes occurred:

  1. All plugin.json files still pinned @v0.3.5 after the version field was bumped to 1.2.0
  2. The updated SKILL.md (with new wiki/reflect commands) was not copied to .cursor-plugin/skills/
  3. The workspace mem binary stayed at v0.3.5, Docker container needed manual rebuild
  4. No CI check caught any of these issues

The same stale-pin problem exists in other repos:

  • redfish-mcp: version 2.25.3, git pin @v2.11.1 (14 versions behind)
  • gpu-diag-mcp: version 1.2.2, git pin @v1.1.1
  • netbox-mcp: version 2.10.7, git pin @v2.10.3

Root cause

  • semantic-release version_variables only updates the "version" key in plugin.json, not the git URL in args
  • mcp-plugin-gen rewrites all pins correctly when invoked, but:
    • Pre-commit hook only triggers on mcp-plugin.toml changes (not pyproject.toml or skills/)
    • mcp-plugin-check hook exists but is adopted by zero repos and run in zero CI workflows
    • Release workflows never run mcp-plugin-gen generate
  • rebuild-marketplaces.yml REPOS list is missing agent-memory

Design

1. Broaden pre-commit hook triggers

In .pre-commit-hooks.yaml, expand file patterns so version bumps and skill edits trigger regeneration:

- id: mcp-plugin-gen
  name: Regenerate plugin configs from mcp-plugin.toml
  entry: mcp-plugin-gen generate .
  language: python
  files: (^mcp-plugin\.toml$|^pyproject\.toml$|^skills/)
  pass_filenames: false

- id: mcp-plugin-check
  name: Check plugin configs are in sync
  entry: mcp-plugin-gen check .
  language: python
  files: (^mcp-plugin\.toml$|^pyproject\.toml$|^skills/|^\.cursor-plugin/|^\.claude-plugin/|^\.mcp\.json|^opencode\.json|^AGENTS\.md)
  pass_filenames: false

2. Create a shared CI reusable workflow

New .github/workflows/plugin-sync-check.yml that any MCP repo can call:

name: Plugin Sync Check
on:
  workflow_call:
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v5
      - name: Install mcp-common
        run: uv pip install "mcp-common[cli] @ git+https://github.com/vhspace/mcp-common"
      - name: Check plugin configs in sync
        run: mcp-plugin-gen check .

Each repo adds to ci.yml:

plugin-sync:
  uses: vhspace/mcp-common/.github/workflows/plugin-sync-check.yml@main

3. Post-release regeneration pattern

After semantic-release tags, release workflows should run mcp-plugin-gen generate . and push regenerated files:

- name: Regenerate plugin configs with new version
  run: |
    uv pip install "mcp-common[cli] @ git+https://github.com/vhspace/mcp-common"
    mcp-plugin-gen generate .
- name: Commit regenerated files
  run: |
    git add -A
    git diff --staged --quiet || git commit -m "chore: regenerate plugin configs [skip ci]"
    git push

4. Add agent-memory to marketplace rebuild

Add agent-memory to rebuild-marketplaces.yml REPOS list.

5. Update mcp-release-workflow skill

  • Remove manual git tag instructions (contradicts RELEASING.md)
  • Add mcp-plugin-gen generate . as mandatory post-version-bump step
  • Add agent-memory with Docker-specific instructions
  • Document CI enforcement

Acceptance Criteria

  • Pre-commit hooks trigger on pyproject.toml and skills/ changes
  • mcp-plugin-check reusable workflow exists and is callable
  • Post-release regeneration pattern documented and ready for adoption
  • agent-memory in marketplace REPOS list
  • mcp-release-workflow skill updated
  • Existing drift in agent-memory, redfish-mcp, gpu-diag-mcp, netbox-mcp fixed (separate PRs)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions