What happens
When Claude Code's working directory is not inside a git repository, the devkit MCP server fails to connect with only an opaque error visible to the user:
Failed to reconnect to plugin:devkit:devkit-engine: -32000
The user has no indication of why. Many will assume the install is broken and try to reinstall, purge caches, or file confused bug reports.
Actual root cause
devkit mcp checks for a git repo at startup and exits immediately with:
Error: not inside a git repo — run devkit from a project directory
This message goes to the engine's stderr, which Claude Code does not surface to the user. The process exits before completing the MCP initialize handshake, so Claude Code only sees the JSON-RPC -32000 server-error.
Reproduction
mkdir /tmp/not-a-repo && cd /tmp/not-a-repo
- Start Claude Code with devkit enabled
/mcp → Failed to reconnect to plugin:devkit:devkit-engine: -32000
cd into any git repo, restart → works fine
Suggested fixes (pick one)
- Defer the git check. Let
devkit mcp always start successfully and only error on the first tool call that needs git state, returning a structured error in the JSON-RPC response so the user sees the real message.
- Surface the failure in the launcher. Have the launcher run a pre-flight git check and exit with a stderr message Claude Code is known to log visibly, or write a sentinel file the user can find.
- At minimum, document it. Add a "common issues" entry in the README so users searching for `-32000` find the answer.
Option 1 is the most user-friendly — devkit is useful for non-git tasks too (general workflows, capability skills like `scrape`, `research`), and many of those don't need git at all.
Environment
- devkit `v2.1.34`
- Claude Code on Windows 11
- Engine binary verified working — runs fine once cwd is inside a git repo
What happens
When Claude Code's working directory is not inside a git repository, the devkit MCP server fails to connect with only an opaque error visible to the user:
The user has no indication of why. Many will assume the install is broken and try to reinstall, purge caches, or file confused bug reports.
Actual root cause
devkit mcpchecks for a git repo at startup and exits immediately with:This message goes to the engine's stderr, which Claude Code does not surface to the user. The process exits before completing the MCP
initializehandshake, so Claude Code only sees the JSON-RPC-32000server-error.Reproduction
mkdir /tmp/not-a-repo && cd /tmp/not-a-repo/mcp→Failed to reconnect to plugin:devkit:devkit-engine: -32000cdinto any git repo, restart → works fineSuggested fixes (pick one)
devkit mcpalways start successfully and only error on the first tool call that needs git state, returning a structured error in the JSON-RPC response so the user sees the real message.Option 1 is the most user-friendly — devkit is useful for non-git tasks too (general workflows, capability skills like `scrape`, `research`), and many of those don't need git at all.
Environment