Repository navigation
fix: wrap .mcp.json contents in mcpServers key (fixes #1) - #2
Merged
Merged
Conversation
Claude Code's .mcp.json format requires servers to be nested under an mcpServers key. Without it, the plugin system parses the file but finds no servers to register, so mcp__speed-run__* tools never become available. This was the root cause of issue #1 — users installing the plugin saw "Failed to reconnect to speed-run" because auto-registration silently did nothing. Fixes #1 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
WalkthroughTop-level Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
2 tasks
The plugin ships dist/index.js but not node_modules. Without an install hook to run npm install, Node can't resolve @modelcontextprotocol/sdk imports at runtime and the MCP server fails to start silently — shown as "✘ failed" in /mcp. This was the actual cause of issue #1 (not the .mcp.json wrapper). Users would install the plugin, the MCP would fail to start because deps weren't installed, and they'd see "Failed to reconnect." Switch the build from tsc to esbuild bundling: - esbuild bundles all runtime deps into a single dist/index.js - No node_modules needed at runtime - Plugin "just works" on install, no hooks needed - tsc kept as `npm run typecheck` for type validation - Bundle verified: runs standalone in /tmp without node_modules present Cleaned up stale .d.ts / per-file .js output from the old tsc build. Added .gitignore for mcp/node_modules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
nicwn
pushed a commit
to nicwn/2389-claude-plugins
that referenced
this pull request
Apr 28, 2026
Reflects the .mcp.json wrapper fix in 2389-research/speed-run#2. The marketplace was still pinned to 1.0.0 while the standalone repo advanced to 1.1.0 (+ 1.1.1 for the fix). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
The repo's
.mcp.jsonwas missing themcpServerswrapper key that Claude Code requires. Without it, the plugin system parses the file but finds no servers to register, somcp__speed-run__*tools never become available.The Bug
Before:
```json
{
"speed-run": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/mcp/dist/index.js"],
"env": { "CEREBRAS_API_KEY": "${CEREBRAS_API_KEY}" }
}
}
```
After:
```json
{
"mcpServers": {
"speed-run": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/mcp/dist/index.js"],
"env": { "CEREBRAS_API_KEY": "${CEREBRAS_API_KEY}" }
}
}
}
```
Why This Fixes #1
The CLAUDE.md promises auto-registration via `.mcp.json` on plugin install. But because the committed file had the wrong structure, the registration silently did nothing. Users saw "Failed to reconnect to speed-run" because no server was ever actually registered.
The issue reporter (@nicwn) correctly created their own `.mcp.json` with the right structure in their project, but the plugin should just work out of the box.
Test plan
Fixes #1
🤖 Generated with Claude Code
Summary by CodeRabbit