Skip to content

fix: register MCP servers inline in plugin.json, drop root .mcp.json#127

Merged
antonbabenko merged 2 commits into
masterfrom
fix/inline-mcp-manifest
Jun 2, 2026
Merged

fix: register MCP servers inline in plugin.json, drop root .mcp.json#127
antonbabenko merged 2 commits into
masterfrom
fix/inline-mcp-manifest

Conversation

@antonbabenko

Copy link
Copy Markdown
Owner

Problem

Inside the plugin's own repo, claude mcp list showed every node-based deliberation server twice:

  • plugin:deliberation:deliberation-* -> Connected (plugin scope; ${CLAUDE_PLUGIN_ROOT} resolves)
  • bare deliberation-* -> "Pending approval" + Missing environment variables: CLAUDE_PLUGIN_ROOT warning (project scope)

Root cause: v3.5.1 added a repo-root .mcp.json so 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.json means nothing for the project-scope loader to pick up, so the duplicates and warnings disappear while installs still register.

  • Add mcpServers to .claude-plugin/plugin.json (exact 5-server config from old root .mcp.json).
  • Delete /.mcp.json and the dead /.claude-plugin/mcp.json (never a documented read location; identical content).
  • Correct CLAUDE.md + commands/setup.md, which wrongly called .claude-plugin/mcp.json the registration source.

Other hosts unaffected

Codex (plugins/deliberation/.mcp.json), Kiro (root mcp.json), and the registry (server.json) all wire the standalone @antonbabenko/deliberation-mcp npx server, generated from scripts/hosts/_shared.js - none read repo-root .mcp.json. No host artifact drifted.

Verification

  • npm run check green: 496 tests + typecheck + sync:check (host-artifacts drift).
  • Before merge: load the branch (claude --plugin-dir <repo> from a non-repo dir) and confirm the 5 deliberation* servers register from the inline plugin.json block with no CLAUDE_PLUGIN_ROOT warning. If inline registration is unsupported on the target build, fall back to restoring root .mcp.json + repo .claude/settings.json disabledMcpjsonServers.

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.
@antonbabenko antonbabenko enabled auto-merge (squash) June 2, 2026 14:13
@antonbabenko antonbabenko merged commit f3aa1c9 into master Jun 2, 2026
1 check passed
@antonbabenko antonbabenko deleted the fix/inline-mcp-manifest branch June 2, 2026 14:14
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