model-shuntSAFE
Decoupled, zero-dependency model-routing shunt for AI coding agents (Antigravity, Cursor, Claude Code, Windsurf)
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://github.com/yasmanycastillo/model-shunt/actions) [](https://opensource.org/licenses/MIT) [](https://www.python.org/downloads/) [](#-key-highlights) [](https://yasmanycastillo.github.io/model-shunt/) [](https://m8ven.ai/mcp/yasmanycastillo-model-shunt-b7r4qh)
A decoupled, zero-dependency, universal implementation of the Shunt model-routing pattern (originally conceived by Spotify Engineering).
Model-Shunt allows AI coding agents (Antigravity, Cursor, Windsurf, Claude Code, Aider, OpenHands, etc.) to delegate token-heavy I/O (bulk file reading/code analysis) and repetitive boilerplate generation (tests, mocks, stubs, configs) to fast, economical, or local worker models (Gemini 2.5 Flash, Groq/Llama, Ollama, DeepSeek, GPT-4o-mini). This cuts primary agent token consumption by up to 90% while keeping the main context window clean.
⚡ Key Highlights
- Zero External Dependencies: Built with pure Python 3 standard library (
urllib,json,re,argparse). Nopip install, no virtual environment, and nonpmrequired. - Agent-Agnostic: Works transparently across any AI coding agent via standard MCP (Model Context Protocol), standalone CLI scripts, or PreToolUse lifecycle hooks.
- Dynamic Model Discovery & Auto-Routing: Queries the worker endpoint in real time to discover available models and automatically routes to the best model for the task:
- Reader Mode (Bulk I/O): Prioritizes massive context windows and ultra-low cost (e.g., `ge
9d3a5d77ed9cOBSERVED · 2026-10-11Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add model-shunt -- None model-shunt==1.2.1
claude mcp add model-shunt -- npx -y [email protected]
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (5 observation(s))
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (4)
docs/brag.mp4
Provider API keys are read from environment variables at runtime. They are
curl -fsSL https://yasmanycastillo.github.io/model-shunt/install.sh | bash
Gates applied: no_behavioural_pass.
9d3a5d77ed9cfull audit observations/trust-audit/mcp-server/yasmanycastillo__model-shunt.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | 9d3a5d77ed9c | SAFE | B | 89 | first audit |
Questions
What is the model-shunt MCP server?
Decoupled, zero-dependency model-routing shunt for AI coding agents (Antigravity, Cursor, Claude Code, Windsurf)
Is model-shunt safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does model-shunt need?
It reads SHUNT_API_KEY, SHUNT_MAX_DIRECT_TOKENS and SHUNT_MAX_TOKENS from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does model-shunt run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as model-shunt at 1.2.1.
How current is this page?
The grade is for one exact copy of the source (9d3a5d77ed9c), read on 2026-10-11. The repository is watched and re-audited when it changes.