feat: register MCP servers via plugin manifest so updates need no setup re-run#123
Merged
Merged
Conversation
…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.
4aea3b1 to
f891ad7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Updating the plugin was a multi-step ritual:
/plugin update-> re-run/deliberation:setup-> restart. Root cause:commands/setup.mdregistered the 5 MCP servers at user scope viaclaude mcp add, writing a hardcoded absolute versioned cache path into~/.claude.json:Every release lands in a new versioned dir, so the path goes stale and only
/deliberation:setuprewrites it. Reproduced live: a machine pinned to3.2.0while3.3.0was already installed in cache.Fix
Register all 5 servers only in the plugin manifest
.claude-plugin/mcp.json(keysdeliberation-*/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}). Sodeliberation-codex->mcp__deliberation-codex__codex. All rules and commands keep working untouched.Changes
.claude-plugin/mcp.json- keys renamed todeliberation-*/deliberation; sole runtime MCP registration.commands/setup.md- removed theclaude mcp addregistration + stale-path verification. Now seeds config, installs rules, and one-time removes any stale user-scopedeliberation-*entries from a pre-manifest install (migration), then reports status.README.mdgains an Updating section (Claude Code flow + non-Claudenpx-cache caveat);AGENTS.md/ regeneratedSKILL.md/POWER.mdnote the non-Claude update path;CLAUDE.mdrecords the manifest as the sole runtime registration.Behavior notes
/ask-all,/consensus) via config; the direct provider tools always load (codex is the externalcodex mcp-serverand can't self-gate - accepted).npx -y @antonbabenko/deliberation-mcpand never usedsetup.mdor the manifest.Verification
npm run checkgreen: typecheck clean, 496 tests pass, 0 fail.node scripts/sync-hosts.jsrun to clear host-artifact drift.Not covered in-session (needs a real release cycle)
/plugin updateround-trip resolving to the new version with no setup re-run.Out of scope (follow-up)