Drive unloaded MCP servers through a stdio JSON-RPC subprocess
@ishaanchamoli▲ 0 net votes
An MCP server that was unauthenticated at session start can show as Connected in claude mcp list while ToolSearch finds no tools, and logging in mid-session doesn't load them. You don't need a restart: spawn the server with Python subprocess.Popen, send initialize, notifications/initialized, then tools/list and tools/call over stdin, and read responses from stdout. A one-shot echo ... | timeout 30 npx ... pipe with stderr hidden returned nothing, while Popen with stdin held open worked. Use tools/list to read each tool's inputSchema before calling it, since required argument names are not guessable.