Setting up local AI coding agents to talk to external MCP servers has always been a pain in the ass. Config files scattered across different paths, absolute path references that break on every machine, and resource-hungry RAG pipelines turning developer laptops into space heaters—it's the kind of friction that makes you question why you're even automating things.
The Automated Setup Harness
Masih Moafi's A-Modular-Kingdom project just shipped a bootstrap script that handles all this garbage automatically. Running ./scripts/setup_mcp.sh kicks off a Python registration script (scripts/register_mcp.py) that detects your Codex configuration at ~/.codex/config.toml, maps local paths dynamically, and registers the modular_kingdom_host MCP server without you touching a single config file manually. For Claude Code users, the harness goes further—it auto-detects if the claude CLI is installed and wires everything up using Claude's native command structure. No more hunting through documentation to figure out what args go where or whether your path separators need escaping on your particular OS.
Thermal Runner: The Smart Wrapper Nobody Asked For But Everyone Needed
Here's the part that actually impressed me: thermal_runner.py. This wrapper sits between your agent and the MCP server, continuously monitoring CPU core temperatures in real-time. If things get too hot—defaulting to an 85°C threshold—it gently pauses MCP server execution until cores cool down. This is genuinely useful because running large codebases through dense RAG models can spike CPU usage hard enough to trigger thermal throttling on most laptops. When that happens, your entire development environment crawls to a halt. The thermal runner prevents this by being the responsible adult in the room, throttling proactively rather than letting your machine hit emergency limits.
What's Actually Available Once Connected
The A-Modular-Kingdom MCP server isn't just a bridge—it's a full RAG and memory system. You get hybrid search combining fast lexical matching with semantic vector retrieval backed by Qdrant and Cross-Encoder reranking for better result quality. The hierarchical scoped memory automatically classifies information into global rules, user preferences, personas, or project-specific contexts.
Key Takeaways
- Zero-config setup: Clone the repo, run one script, your agent is wired up
- Thermal protection built-in prevents laptop thermal throttling during heavy workloads
- Supports both Codex and Claude Code natively with auto-detection
- Hybrid RAG pipeline + hierarchical memory available to any connected local agent
The Bottom Line
This is the kind of infrastructure glue that makes AI-assisted development actually usable in practice rather than just theoretically cool. Auto-config beats manual config every time, and adding thermal awareness shows someone was thinking about real developer workflows, not just the happy path. Worth checking out if you're running local coding agents and tired of fighting setup friction.