Auto-classifies prompt complexity and routes to the right Claude thinking mode. No API key needed.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"thinkgate": {
"env": {
"ANTHROPIC_API_KEY": "your-api-key-here"
},
"args": [
"-y",
"mcp-thinkgate"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Automatic reasoning mode selection for Claude agents.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'mcp-thinkgate' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked mcp-thinkgate against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
Dynamic problem-solving through sequential thought chains
Persistent memory using a knowledge graph
An autonomous agent that conducts deep research on any data using any LLM providers
🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, distributed swarm intelligence, RAG integration, and native Claude Code / Codex Integration
MCP Security Weekly
Get CVE alerts and security updates for io.github.tjp2021/mcp-thinkgate and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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 ownIncoming message
↓
Haiku call (~200ms, ~$0.0001)
"How complex is this?"
↓
fast → no extended thinking
think → medium effort
ultrathink → max effort
↓
Claude runs with the right settings
A 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 | System design, proofs, open-ended complexity |
Add to ~/.claude/settings.json (Claude Code) or ~/Library/Application Support/Claude/claude_desktop_config.json (Claude Desktop):
{
"mcpServers": {
"thinkgate": {
"command": "npx",
"args": ["-y", "mcp-thinkgate"],
"env": {
"ANTHROPIC_API_KEY": "your-api-key-here"
}
}
}
}
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"
Tier: think
Effort: medium
Suggested model: claude-sonnet-4-6
Confidence: 92%
Why: Requires structured design reasoning and trade-off analysis, but has well-defined scope.
Install:
npm install mcp-thinkgate
Import and use:
import { classifyPrompt, setLogLevel } from 'mcp-thinkgate';
// Optional: silence logs (default level is 'info', writes to stderr)
setLogLevel('error');
const result = await classifyPrompt(userMessage, process.env.ANTHROPIC_API_KEY!);
// result.tier → 'fast' | 'think' | 'ultrathink'
// result.effort → 'none' | 'medium' | 'max'
// result.confidence → 0.0 - 1.0
// result.reasoning → one sentence explanation
// Works without an API key too (rule-based fallback):
const quickResult = a
... [View full README on GitHub](https://github.com/tjp2021/mcp-thinkgate#readme)