Skip to main content
Glama

Switchback MCP

Switchback용 MCP 서버 — AI 에이전트 턴을 복잡도별로 분류하고, 이를 처리할 수 있는 가장 저렴한 모델을 선택합니다. Claude Desktop, Cursor, Cline 및 모든 MCP 클라이언트에서 바로 사용할 수 있습니다.

npm Powers VibeKit

VibeKit 제작 — 호스팅 제품의 모든 "Auto" 턴을 구동하는 것과 동일한 캐스케이드 라우터입니다. 자세히 알아보기 →

기능

Model Context Protocol을 통해 두 가지 도구를 제공합니다:

  • classify_turn — 사용자 메시지가 주어지면 {tier: 0|1|2, why, fallback, durationMs}를 반환합니다. 다음 에이전트 단계에서 플래그십 모델에 비용을 쓸지, 저렴한 모델을 유지할지 결정할 때 사용합니다.

  • recommend_model — 사용자 메시지 + 모델 래더(저렴 → 플래그십)가 주어지면, 해당 메시지를 처리할 수 있을 것으로 보이는 래더에서 가장 저렴한 모델을 반환합니다. classify_turn의 편의 래퍼입니다.

두 도구 모두 OpenRouter를 통해 단일 소형 모델 호출을 실행합니다(기본값: openai/gpt-5.4-mini, 호출당 약 $0.0001). 실패 시 안전하게 작동합니다: 오류가 발생하면 에이전트를 차단하는 대신 fallback: true와 함께 tier 1을 반환합니다.

Related MCP server: oracle-models

설치

npm install -g vibekit-switchback-mcp

구성

OpenRouter 키를 설정합니다(https://openrouter.ai/keys에서 발급):

export OPENROUTER_API_KEY=sk-or-...

선택 사항: 분류 모델 재정의:

export SWITCHBACK_CLASSIFIER_MODEL=anthropic/claude-haiku-4.5

Claude Desktop

~/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 / 기타

stdio 서버를 지원하는 모든 MCP 클라이언트에서 사용할 수 있습니다. 동일한 npx 명령을 사용합니다.

호출 예시

classify_turn:

{
  "userMessage": "rebuild the auth flow with passkeys"
}

반환:

{
  "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"
  ]
}

반환:

{
  "recommended_model": "openai/gpt-5.4-mini",
  "tier": 0,
  "ladder_size": 3,
  "classifier": { "tier": 0, "why": "trivial copy edit", "fallback": false, "durationMs": 318 }
}

사용 시점

  • 다단계 에이전트 — 라운드 사이에 모델을 교체할 수 있는 경우.

  • BYOK 방식 제품 — 모든 라우팅을 사용자가 선택한 브랜드 내에서 유지하려는 경우 — 사용자별로 브랜드 고정 래더를 전달하세요.

  • 비용에 민감한 오케스트레이터 — 사소한 턴에 플래그십 요금을 지출하지 않으려는 경우.

사용하지 말아야 할 시점

  • 일회성 채팅 완성 — 첫 호출 후 모델을 변경할 수 없는 경우 — 대신 OpenRouter의 auto 또는 NotDiamond/Martian을 사용하세요.

  • 첫 토큰까지 200ms 미만이 필요한 지연 시간 민감 UX — 분류기가 200-500ms를 추가합니다.

라이선스

MIT. LICENSE 참조.

VibeKit 제작. 핵심 라이브러리는 vibekit-switchback입니다 — 이 패키지는 MCP 래퍼입니다.

Available Tools

2 tools
classify_turnA

Classify how complex a user request is on a 0/1/2 scale. Use this when you're orchestrating an agent and want to decide whether to spend on a flagship model (tier 2), a mid-tier model (tier 1), or stay cheap (tier 0). Returns {tier, why, fallback, durationMs}.

NameRequiredDescriptionDefault
userMessageYesThe user's request to classify. Capped at 1500 chars internally.
recentHistoryNoOptional. Last 1-2 assistant turns for context. Each capped at 200 chars internally.

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose the return shape ({tier, why, fallback, durationMs}) and explains the tier meanings, which adds value. However, it does not disclose potential side effects, fallback semantics, or internal behavior such as truncation limits beyond what the schema already contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action and scale, then followed by the use case and return shape. Every sentence earns its place with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The schema is simple and the description covers purpose, use case, and return fields, but it does not explain the meanings of 'fallback' and 'durationMs', nor does it contrast with the sibling 'recommend_model'. This leaves gaps an agent might need to resolve before confidently choosing this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does not add parameter-specific detail beyond the schema; it only explains the tier scale, not how userMessage or recentHistory should be formatted beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states a specific verb ('Classify'), a resource ('user request'), and the 0/1/2 scale, making the tool's purpose immediately clear. It also ties the scale to model-tier decisions, but it does not explicitly differentiate from the sibling tool 'recommend_model'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use it ('when you're orchestrating an agent and want to decide whether to spend...'), giving clear context for deployment. However, it does not state when not to use it or mention the alternative tool, so it lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

recommend_modelA

Given a ladder of models (cheap → flagship) and a user message, return the cheapest model on the ladder that can plausibly handle it, plus reasoning. The ladder should be brand-locked (all-Anthropic, all-OpenAI, etc.) to honor your user's BYOK provider.

NameRequiredDescriptionDefault
ladderYesOrdered model ids, index 0 = cheapest. Example: ['openai/gpt-5.4-mini', 'openai/gpt-5.4', 'openai/gpt-5.5']
userMessageYesThe user's request.
recentHistoryNoOptional context. Last 1-2 assistant turns.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of explaining behavior. It states the tool returns a recommendation plus reasoning and enforces a brand-locked ladder, but it does not disclose what happens when no model is suitable, how 'plausibly' is determined, or whether the tool actually invokes any external model.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler. The primary behavior is front-loaded in the first sentence, and the BYOK constraint earns its place in the second sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description appropriately explains the expected return: cheapest model plus reasoning. It could be more explicit about edge cases, such as an incapable ladder or how 'recentHistory' should influence the selection, but the core invocation context is covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds useful context about ladder ordering and brand-locking, but it does not materially expand on the meaning of 'userMessage' or 'recentHistory' beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('return') and resource ('the cheapest model on the ladder') and clearly defines the task: select the cheapest plausible model for a user message and provide reasoning. It is easy to distinguish from the sibling 'classify_turn' because the purpose centers on model selection, not classification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool: when a model ladder and a user message are available, and when BYOK provider constraints apply. It does not explicitly contrast with 'classify_turn' or state when not to use it, but the usage context is unambiguous enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.1
    • First observedclassify_turn
    • First observedrecommend_model

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation3/5

The two tools both relate to routing user requests to models, so an agent could confuse classifying a turn with recommending a model. However, the inputs and outputs are distinct enough—one returns a tier, the other returns a specific model—to be workable with clear descriptions.

Naming Consistency5/5

Both tools follow a consistent verb_noun snake_case pattern: classify_turn and recommend_model. Naming is predictable and clearly indicates the action and object.

Tool Count3/5

With only two tools, the server feels thin, but the scope is narrow enough that both tools can earn their place. The count is borderline rather than egregiously insufficient.

Completeness4/5

The server covers the core routing workflow: classifying complexity and selecting a cost-appropriate model. Minor gaps exist, such as no combined route tool or ladder management, but agents can work around these using the provided inputs.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Classifies development task complexity (LIGHT/MEDIUM/HEAVY) and recommends the most cost-efficient AI model per provider, enabling optimized model selection for coding tasks.
    3
    36 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Optimizes token costs by intelligently delegating low-complexity tasks to local LLMs via LiteLLM, enabling cost-effective development workflows.
    3
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Pre-execution cost estimation for LLM agent workflows, providing cost estimates before running tasks and improving accuracy over time through calibration.
    6
    42 PyPI
    2
    MIT