npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vibekit-switchback-mcp

v0.1.1

Published

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-compatible client.

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.

npm Powers VibeKit

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 around classify_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 auto or 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.