Auto-classifies prompt complexity and routes to the right Claude thinking mode. No API key needed.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Automatic reasoning mode selection for Claude agents.
You built an AI agent. It handles everything โ status checks, quick lookups, complex architecture questions, deep debugging sessions. But under the hood it runs every single message through the same model with the same thinking settings.
That means you're burning extended thinking tokens on "what time is it in Tokyo?" and getting shallow answers on "help me design the entire auth system."
You could manually tag requests โ ULTRATHINK: before the hard ones. But you forget. Your users definitely won't do it. And if you're building agents for other people, you can't train every end user to manage thinking modes.
ThinkGate fixes this at the infrastructure layer. It sits between the incoming message and your model call, classifies the complexity in ~200ms, and returns exactly which model and thinking depth to use. Automatically. Every time.
ULTRATHINK manually and thought: this should just happen on its ownA cheap, fast Haiku call reads your prompt and decides which tier it needs. Then your main Claude call runs with the right effort level. You pay almost nothing for the classification, and save real money (and latency) on the 60%+ of messages that don't need extended reasoning.
The classifier is the IP here โ not which model runs it. Three tiers. A system prompt trained on the boundary between "this needs thinking" and "this doesn't." Works out of the box.
| Tier | Claude effort | When |
|---|---|---|
fast | none | Factual, conversational, simple edits |
think | medium | Architecture, debugging, multi-step analysis |
ultrathink | max / high | System design, proofs, open-ended complexity |
Set THINKGATE_PROFILE or pass { profile } to classifyPrompt:
| Profile | fast | think | ultrathink |
|---|---|---|---|
claude (default) | claude-haiku-4-5-... | claude-sonnet-4-6 | claude-opus-4-6 |
openrouter-cost | google/gemini-2.5-flash | anthropic/claude-sonnet-4.5 | anthropic/claude-opus-4.6 |
openrouter-balanced | anthropic/claude-haiku-4.5 | anthropic/claude-sonnet-4.5 | anthropic/claude-opus-4.6 |
Per-tier overrides: THINKGATE_FAST_MODEL, THINKGATE_THINK_MODEL, THINKGATE_ULTRA_MODEL.
Cost note: the MCP tool is advisory. Hosts must actually switch models.
Pi does this via ~/.pi/agent/extensions/thinkgate-router.ts + thinkgate.json.
Rule mode (no API key) is free and preferred for auto-routing. Long checklist pastes no longer auto-upgrade to THINK.
Add to ~/.claude/settings.json (Claude Code) or ~/Library/Application Support/Claude/claude_desktop_config.json (Claude Desktop):
Restart Claude. Now you can ask it to classify before it answers:
"Before responding, classify the complexity of this task: design a rate limiter for a public API"
Install:
Import and use:
TinyClaw is an open-source multi-agent framework for Claude. ThinkGate is wired into its invokeAgent() function โ every message is automatically classified before the Claude CLI runs, and --effort is set accordingly.
Three lines added. Zero config required. Every agent in every team automatically gets the right thinking depth.
See the integration at src/lib/invoke.ts.
See CONTRIBUTING.md for dev setup, commands, and PR process.
See SECURITY.md for vulnerability reporting.
MIT โ see LICENSE
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-thinkgate)<a href="https://allmcps.com/mcp/mcp-thinkgate"><img src="https://allmcps.com/api/badge/mcp-thinkgate?style=directory" alt="MCP Thinkgate on AllMCPs" /></a>