Skip to content

feat: register MCP servers via plugin manifest so updates need no setup re-run#123

Merged
antonbabenko merged 1 commit into
masterfrom
feat/manifest-mcp-registration
Jun 2, 2026
Merged

feat: register MCP servers via plugin manifest so updates need no setup re-run#123
antonbabenko merged 1 commit into
masterfrom
feat/manifest-mcp-registration

Conversation

@antonbabenko

Copy link
Copy Markdown
Owner

Problem

Updating the plugin was a multi-step ritual: /plugin update -> re-run /deliberation:setup -> restart. Root cause: commands/setup.md registered the 5 MCP servers at user scope via claude mcp add, writing a hardcoded absolute versioned cache path into ~/.claude.json:

deliberation-gemini -> node ~/.claude/plugins/cache/antonbabenko/deliberation/<VERSION>/server/gemini/index.js

Every release lands in a new versioned dir, so the path goes stale and only /deliberation:setup rewrites it. Reproduced live: a machine pinned to 3.2.0 while 3.3.0 was already installed in cache.

Fix

Register all 5 servers only in the plugin manifest .claude-plugin/mcp.json (keys deliberation-* / deliberation) with ${CLAUDE_PLUGIN_ROOT} args, which Claude Code re-resolves on every load. The manifest self-heals across versions.

Update flow becomes: /plugin update + /reload-plugins (or restart). No setup re-run, no stale paths.

Tool ids unchanged (zero rules rewrite)

Verified against the Claude Code binary: a plugin manifest server key is used verbatim as the tool namespace, with no plugin-name prefix (mcp__${serverName}__${tool}). So deliberation-codex -> mcp__deliberation-codex__codex. All rules and commands keep working untouched.

Changes

  • .claude-plugin/mcp.json - keys renamed to deliberation-* / deliberation; sole runtime MCP registration.
  • commands/setup.md - removed the claude mcp add registration + stale-path verification. Now seeds config, installs rules, and one-time removes any stale user-scope deliberation-* entries from a pre-manifest install (migration), then reports status.
  • Docs - README.md gains an Updating section (Claude Code flow + non-Claude npx-cache caveat); AGENTS.md / regenerated SKILL.md / POWER.md note the non-Claude update path; CLAUDE.md records the manifest as the sole runtime registration.

Behavior notes

  • Per-provider enable/disable continues to gate the unified fan-out (/ask-all, /consensus) via config; the direct provider tools always load (codex is the external codex mcp-server and can't self-gate - accepted).
  • Non-Claude hosts unaffected - they register the unified server via npx -y @antonbabenko/deliberation-mcp and never used setup.md or the manifest.

Verification

  • npm run check green: typecheck clean, 496 tests pass, 0 fail.
  • node scripts/sync-hosts.js run to clear host-artifact drift.
  • Namespacing gate confirmed by binary inspection (above).

Not covered in-session (needs a real release cycle)

  • The live /plugin update round-trip resolving to the new version with no setup re-run.
  • Post-migration cleanup removing stale user-scope entries on a real upgrader's machine.

Out of scope (follow-up)

  • Optional in-bridge per-provider gating (so a config-disabled provider's direct tool also hides) - not required for the update fix.
  • Pruning the accumulated old cached versions.

…up re-run

Move all five MCP server registrations out of the user-scope `claude mcp add`
in /deliberation:setup and into .claude-plugin/mcp.json under the
deliberation-* / deliberation keys. The manifest args use ${CLAUDE_PLUGIN_ROOT},
which Claude Code re-resolves on every load, so a version bump self-heals and
updating is just /plugin update + /reload-plugins - no setup re-run, no stale
absolute versioned cache paths left in ~/.claude.json.

setup.md now seeds config, installs rules, and one-time-removes any stale
user-scope deliberation-* entries from a pre-manifest install (migration), then
reports status. Tool ids are unchanged: a plugin manifest server key is used
verbatim as the tool namespace with no plugin-name prefix (confirmed against the
Claude Code binary), so deliberation-codex -> mcp__deliberation-codex__codex and
the rules and commands need no rewrite.

Per-provider enable/disable continues to gate the unified fan-out (/ask-all,
/consensus) via config; the direct provider tools always load. Non-Claude hosts
are unaffected - they register the unified server via npx and never used setup
or the manifest.

Docs: README gains an Updating section (Claude Code flow + non-Claude npx-cache
caveat); AGENTS.md/SKILL.md/POWER.md note the non-Claude update path; CLAUDE.md
records the manifest as the sole runtime registration.
@antonbabenko antonbabenko force-pushed the feat/manifest-mcp-registration branch from 4aea3b1 to f891ad7 Compare June 2, 2026 13:11
@antonbabenko antonbabenko enabled auto-merge (squash) June 2, 2026 13:12
@antonbabenko antonbabenko merged commit 00be051 into master Jun 2, 2026
1 check passed
@antonbabenko antonbabenko deleted the feat/manifest-mcp-registration branch June 2, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant