MCP server tools not exposed in session despite server responding correctly
Bug
MCP server tools are not available in the Claude Code session even though the server is correctly configured and responds to JSON-RPC requests when tested manually.
Environment
- Claude Code CLI (latest)
- macOS Darwin 25.3.0
- MCP server: custom Node.js stdio server (
@batiste/code)
Configuration
Project-level .claude/settings.json:
{
"mcpServers": {
"batiste-code": {
"command": "node",
"args": ["/path/to/batiste/packages/code/dist/cli.js"],
"env": {
"PROJECT_ROOT": "/path/to/project",
"DATA_DIR": "/path/to/project/.batiste"
},
"disabled": false
}
}
}
User-level ~/.claude/settings.json also has a separate MCP server configured for a different project.
Reproduction
- Configure an MCP server in
.claude/settings.jsonas shown above - Start a Claude Code session
- The MCP server tools (11 tools including
index_codebase,summarize_codebase, etc.) are not available —ToolSearchreturns no matches
Manual verification
Testing the exact same server config manually works perfectly:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"capabilities":{},"protocolVersion":"2024-11-05","clientInfo":{"name":"test","version":"0.1"}}}' \
| PROJECT_ROOT=/path/to/project DATA_DIR=/path/to/project/.batiste \
node /path/to/batiste/packages/code/dist/cli.js
Returns valid initialize response. Subsequent tools/list returns all 11 tools correctly.
Expected behavior
Tools from the MCP server should be available in the Claude Code session as deferred or direct tools.
Actual behavior
ToolSearch for any MCP tool name returns "No matching deferred tools found". The session proceeds without MCP tools despite the server being functional.
Notes
- The server prints a startup banner to stderr:
@batiste/code MCP Server started (stdio)— unclear if this affects connection - The server also emits debug log lines to stderr during operation (e.g.,
[batiste:git-tracker] Git repository detected) - Having a second MCP server in user-level settings (for a different project) may contribute to the issue
- This has been consistently reproducible across multiple session restarts
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗