fix: register MCP servers inline in plugin.json, drop root .mcp.json#127
Merged
Conversation
Root .mcp.json registered the plugin's MCP servers for Claude Code, but the
same file was also auto-loaded as a project-scope MCP config whenever Claude
Code ran inside this repo. In project scope ${CLAUDE_PLUGIN_ROOT} is undefined,
so every node-based server registered a second time as "Pending approval" with
a "Missing environment variables: CLAUDE_PLUGIN_ROOT" diagnostics warning.
Installs were unaffected; the duplicates only appeared in the plugin's own
source repo.
Move the 5-server manifest inline into .claude-plugin/plugin.json (mcpServers),
a documented registration location read only by the plugin loader. With no root
.mcp.json there is no file for the project-scope loader to pick up, so the
duplicates and warnings disappear while installs still register.
Also delete the dead .claude-plugin/mcp.json (never a documented read location;
identical content) and correct CLAUDE.md / commands/setup.md which wrongly
called it the registration source.
Other hosts are unaffected: Codex (plugins/deliberation/.mcp.json), Kiro (root
mcp.json), and the registry all wire the standalone @antonbabenko/deliberation-mcp
npx server, generated from scripts/hosts/_shared.js, not repo-root .mcp.json.
…mand '/plugin update' reports 'already at latest' without pulling a new marketplace revision; the marketplace-scoped update is what actually refreshes the plugin. Update CLAUDE.md, README.md, and commands/setup.md accordingly.
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
Inside the plugin's own repo,
claude mcp listshowed every node-based deliberation server twice:plugin:deliberation:deliberation-*-> Connected (plugin scope;${CLAUDE_PLUGIN_ROOT}resolves)deliberation-*-> "Pending approval" +Missing environment variables: CLAUDE_PLUGIN_ROOTwarning (project scope)Root cause: v3.5.1 added a repo-root
.mcp.jsonso Claude Code would register the servers. That fixed installs, but the same file is also auto-loaded as a project-scope MCP config when Claude Code runs inside this repo, where${CLAUDE_PLUGIN_ROOT}is undefined -> duplicates + warnings. Installs were never affected; the noise only appeared in the source repo.Fix
Move the 5-server manifest inline into
.claude-plugin/plugin.json(mcpServers) - a documented registration location read only by the plugin loader. No root.mcp.jsonmeans nothing for the project-scope loader to pick up, so the duplicates and warnings disappear while installs still register.mcpServersto.claude-plugin/plugin.json(exact 5-server config from old root.mcp.json)./.mcp.jsonand the dead/.claude-plugin/mcp.json(never a documented read location; identical content).CLAUDE.md+commands/setup.md, which wrongly called.claude-plugin/mcp.jsonthe registration source.Other hosts unaffected
Codex (
plugins/deliberation/.mcp.json), Kiro (rootmcp.json), and the registry (server.json) all wire the standalone@antonbabenko/deliberation-mcpnpx server, generated fromscripts/hosts/_shared.js- none read repo-root.mcp.json. No host artifact drifted.Verification
npm run checkgreen: 496 tests + typecheck +sync:check(host-artifacts drift).claude --plugin-dir <repo>from a non-repo dir) and confirm the 5deliberation*servers register from the inlineplugin.jsonblock with noCLAUDE_PLUGIN_ROOTwarning. If inline registration is unsupported on the target build, fall back to restoring root.mcp.json+ repo.claude/settings.jsondisabledMcpjsonServers.