Switchback MCP
Classifies AI agent turns by complexity and recommends the cheapest model that can handle them, reducing costs in multi-step workflows.
README
Switchback MCP
MCP server for Switchback — classify AI agent turns by complexity and pick the cheapest model that can handle them. Drop-in for Claude Desktop, Cursor, Cline, and any MCP client.
Built by VibeKit — same cascade router that powers every "Auto" turn in our hosted product. Learn more →
What it does
Exposes two tools over the Model Context Protocol:
classify_turn— given a user message, returns{tier: 0|1|2, why, fallback, durationMs}. Use it when you're deciding whether to spend on a flagship model or stay on a cheap one for the next agent step.recommend_model— given a user message + a ladder of models (cheap → flagship), returns the cheapest model on the ladder that can plausibly handle it. Convenience wrapper aroundclassify_turn.
Both tools fire a single small-model call via OpenRouter (default: openai/gpt-5.4-mini, ~$0.0001/call). Fail-soft: any error returns tier 1 with fallback: true rather than blocking your agent.
Install
npm install -g vibekit-switchback-mcp
Configure
Set your OpenRouter key (get one at https://openrouter.ai/keys):
export OPENROUTER_API_KEY=sk-or-...
Optional: override the classifier model:
export SWITCHBACK_CLASSIFIER_MODEL=anthropic/claude-haiku-4.5
Claude Desktop
Add to your ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"switchback": {
"command": "npx",
"args": ["-y", "vibekit-switchback-mcp"],
"env": {
"OPENROUTER_API_KEY": "sk-or-..."
}
}
}
}
Cursor / Cline / others
Any MCP client that supports stdio servers. Same npx invocation.
Example calls
classify_turn:
{
"userMessage": "rebuild the auth flow with passkeys"
}
returns:
{
"tier": 2,
"why": "architectural rework + new auth method",
"fallback": false,
"durationMs": 412
}
recommend_model:
{
"userMessage": "fix typo in README",
"ladder": [
"openai/gpt-5.4-mini",
"openai/gpt-5.4",
"openai/gpt-5.5"
]
}
returns:
{
"recommended_model": "openai/gpt-5.4-mini",
"tier": 0,
"ladder_size": 3,
"classifier": { "tier": 0, "why": "trivial copy edit", "fallback": false, "durationMs": 318 }
}
When to use it
- Multi-step agents where you can swap models between rounds.
- BYOK-style products where you want to keep all routing inside the user's chosen brand — pass a brand-locked ladder per user.
- Cost-conscious orchestrators that want to avoid spending flagship rates on trivial turns.
When NOT to use it
- One-shot chat completions where you can't change models after the first call — use OpenRouter's
autoor NotDiamond/Martian instead. - Latency-critical sub-200ms-first-token UX — the classifier adds 200-500ms.
License
MIT. See LICENSE.
Built by VibeKit. The core library is vibekit-switchback — this package is the MCP wrapper.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.