Implementation: How should Claude Code sessions access MCP tools (preflight,...
Documentation for Sessions
⚙️ Implementation: How should Claude Code sessions access MCP tools (preflight,...
📋 Decision Context
Question:
How should Claude Code sessions access MCP tools (preflight, log_decision, find_similar)?
Task: Not specified
🎯 Decision Made
Chosen:
Create universal MCP client script using stdio transport
Options Considered:
- Wait for native Claude Code MCP integration
- Create universal MCP client script using stdio transport
- Use REST API endpoints only
- Manual curl commands for each tool
💭 Reasoning
Implemented tools/scripts/mcp-client.js that spawns independent MCP server processes via tsx, communicates using JSON-RPC 2.0 protocol over stdio. Benefits: (1) Works immediately without native integration, (2) No conflicts with Cursor native MCP, (3) Full access to all MCP tools, (4) Simple usage via yarn scripts, (5) Well-documented with comprehensive README. Tested successfully with get_stats, preflight, and log_decision tools. Achieves 600-1200ms response time which is acceptable. Added yarn scripts (mcp, mcp:stats, mcp:preflight) for ease of use. Production-ready with comprehensive error handling and timeout protection.
📁 Files Involved
- No files specified
🔗 Related
- Decision ID:
dev_1767824807016_utju5vm - Session: 22
- Workspace: editor2
Auto-generated by MCP Smart Consolidation