[BUG] Custom MCP servers silently fail after "Extension not found" check
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When running /mcp in Claude Code, custom MCP servers configured in .mcp.json fail with "Failed to reconnect to raid-memory" with no diagnostic information.
Log evidence from C:\Users\MN\AppData\Roaming\Claude\logs\main.log shows Claude Code logs "Extension not found" but never spawns the custom process:
2025-10-15 10:48:53 [info] MCP Server connection requested for: raid-memory
2025-10-15 10:48:53 [info] Launching MCP Server: raid-memory
2025-10-15 10:48:53 [info] Checking if UtilityProcess should be used for extension raid-memory
2025-10-15 10:48:53 [warn] UtilityProcess Check: Extension raid-memory not found in installed extensions
[NO FURTHER LOGS - process never spawned]
The built-in Filesystem server works fine, showing it successfully spawns:
2025-10-15 10:48:53 [info] Using UtilityProcess for extension Filesystem
2025-10-15 10:48:55 [info] [UtilityProcess stderr] Secure MCP Filesystem Server running on stdio
This pattern repeats 8 times across multiple days (2025-10-13 through 2025-10-15).
Related to #4793 (Windows "Failed to connect"), #3369 (Windows MCP failures), #4382 (dotnet commands), #1611 (macOS MCP failures), #6838 (WSL2 MCP not launching).
What Should Happen?
After Claude Code determines a server is not an installed extension, it should fall back to spawning it as a custom process:
- Read
commandandargsfrom.mcp.json - Spawn process using those parameters + environment variables from
env - Log: "Starting custom MCP server [name] via [command]"
- On success: Log "MCP server [name] started with PID [number]" and perform MCP handshake
- On failure: Log actual error with command details and show diagnostic info to user
Expected log flow:
[info] Checking if UtilityProcess should be used for extension raid-memory
[warn] Extension raid-memory not found in installed extensions
[info] Falling back to custom process spawn
[info] Spawning: C:\Program Files\dotnet\dotnet.exe run --project [...]
[info] MCP server raid-memory started with PID 12345
[info] MCP handshake successful
Currently, the process stops after "Extension not found" with no fallback attempt.
Error Messages/Logs
Main log shows 8 instances of the same pattern:
2025-10-13 12:51:45 [info] MCP Server connection requested for: raid-memory
2025-10-13 12:51:45 [info] Launching MCP Server: raid-memory
2025-10-13 12:51:45 [info] Checking if UtilityProcess should be used for extension raid-memory
2025-10-13 12:51:45 [warn] UtilityProcess Check: Extension raid-memory not found in installed extensions
(Pattern repeats on 2025-10-13 18:14:23, 19:42:43, 2025-10-14 16:49:19, 18:00:18, 19:25:29, 20:51:04, 2025-10-15 10:48:53)
User-facing error: "Failed to reconnect to raid-memory."
Developer Console: No errors (1400+ lines checked, none related to MCP)
Steps to Reproduce
- Create a custom MCP server (non-Node.js, e.g., .NET):
- Server must use stdio transport per MCP spec
- Must respond to MCP initialize protocol
- Configure in
.mcp.jsonat project root:
{
"mcpServers": {
"raid-memory": {
"command": "C:\\Program Files\\dotnet\\dotnet.exe",
"args": [
"run",
"--project",
"C:\\src\\Life Projects\\LLM-SqlServerExpertAgent\\src\\MCP\\Raid.MCP.Memory\\Raid.MCP.Memory.csproj",
"--no-build"
],
"env": {
"MemoryAgent__BaseUrl": "http://localhost:6100",
"MemoryAgent__AgentId": "mcp-memory-client"
}
}
}
}
- Verify the command works manually:
echo '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
MemoryAgent__BaseUrl="http://localhost:6100" \
"C:\Program Files\dotnet\dotnet.exe" run --project [...] --no-build
Expected: JSON response with server info (this WORKS)
- Open Claude Code in the project directory
- Run
/mcpcommand - Observe: "Failed to reconnect to raid-memory" message
- Check logs: See "Extension not found" warning but no spawn attempt
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.17 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
Root Cause Analysis:
After logging "Extension not found", Claude Code stops processing instead of spawning the custom process via command/args from config. This appears to be a missing code path.
Proof Server Works:
Manual stdio test proves the MCP server itself is functional:
Response to initialize:
{
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {"logging": {}, "tools": {"listChanged": true}},
"serverInfo": {"name": "Raid.MCP.Memory", "version": "1.0.0.0"}
}
}
Configuration Details:
- File location: C:\src\Life Projects\LLM-SqlServerExpertAgent\.mcp.json (verified exists)
- Server type: Custom .NET 9.0 MCP server
- MCP Protocol: ModelContextProtocol 0.4.0-preview.2 (NuGet package)
- Backend: Memory Agent API at http://localhost:6100 (health check returns "operational")
Additional Testing:
✅ MCP test suite: 97.44% pass rate (38/39 tests)
✅ Backend API healthy
✅ Server builds successfully
✅ Toggled Windows/WSL2 paths (no difference)
✅ Restarted Claude Code (no fix)
Why This Report is Valuable:
This provides exact log evidence showing WHERE Claude Code stops, proof the server works independently, and may be the root cause for multiple related Windows MCP connection issues (#4793, #3369, #4382, #1611, #6838).
.mcp.json configuration used:
[See Steps to Reproduce section above]
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗