Skip to main content
Glama

Install in 2 minutes

curl -fsSL https://raw.githubusercontent.com/timjensgrossinger/switchyard/main/install.sh | bash

Or clone and install:

git clone https://github.com/timjensgrossinger/switchyard.git
cd switchyard
./install.sh

Requires: Python 3.10+, macOS or Linux, and at least one host AI CLI (gh, claude, gemini, codex, cursor-agent, junie, or opencode).

Restart your shell, then connect from Claude Code, Copilot CLI, Gemini, Codex, Cursor, or Junie — Switchyard registers as an MCP server automatically.


Related MCP server: Delegation MCP

Why Switchyard?

Save money

Route simple edits to free/low-tier models. Reserve opus/sonnet-class models for work that needs reasoning.

Use what you have

Works with GitHub Copilot, Claude Code, Gemini CLI, Codex, Cursor, Junie, OpenCode, Aider, Amazon Q/Kiro, and more — pick the cheapest authenticated CLI per task.

See everything

Every wave shows agent, tier, model, provider, and target files before and after execution.


Agents that learn — with your approval

Switchyard watches recurring work patterns, drafts reusable agents when evidence is strong, and waits for you to approve before anything goes live.

execute subtask → track patterns → draft agent → YOU approve → activate → auto-match future work
  • No auto-promotion — drafts never become active without explicit approval

  • Conservative gates — recurrence, quality score, and low rework must all agree before drafting

  • Project vs shared lanes — project-specific patterns activate sooner; shared patterns need stronger evidence

  • Inspect everythinglearning_agent_summary, learning_pattern_health, and redacted learning_audit_log MCP tools

switchyard inspect approvals --project .
switchyard inspect approvals approve 12 --project . --operator you

How it works

  1. You give a task to Copilot CLI, Claude Code, Gemini, or another MCP host.

  2. Switchyard scores complexity → low / medium / high tier (no extra LLM call on the hot path).

  3. Discovery picks the cheapest authenticated provider for that tier (excludes the caller to prevent recursion).

  4. Complex tasks decompose into waves — independent subtasks run in parallel, dependents wait for prior waves.


Feature highlights

Feature

What it does

🎯

Tier routing

Heuristic complexity scoring + intent modifiers (quick → cheaper, production → higher quality)

🔍

Live discovery

Scans installed CLIs, checks auth, ranks models by bundled cost data, caches in SQLite

🌊

Wave orchestration

decompose_task → parallel waves → integration verify; linear, DAG, hierarchical, and star topologies

🔌

MCP-native

~43 tools over stdio JSON-RPC; works with any MCP-compatible host shell

🧠

Warm-path eval

Background rework detection and quality scoring after subtasks complete

📈

Adaptive thresholds

EMA-based threshold learning from routing outcomes

🛡️

Write safety

Path validation, outside-workspace preview gate, audit trail

👁️

Operator CLI

switchyard inspect, switchyard tune, switchyard doctor, switchyard-watch


Supported providers

Provider

Binary

Routeable

Notes

GitHub Copilot

gh

Core host; includes free gpt-5-mini low tier

Claude Code

claude

haiku / sonnet / opus

Gemini CLI

gemini

flash-lite / flash / pro

OpenCode

opencode

Low-tier auto-route by default

OpenAI Codex

codex

Host shell + execution

Cursor

cursor-agent

Host shell + execution

JetBrains Junie

junie

Medium-tier auto-route by default

Aider

aider

Secondary adapter

Amazon Q / Kiro

q / kiro

Secondary adapter

Mistral Vibe

vibe

Secondary adapter

Blackbox AI

blackbox

When CLI installed

Windsurf

windsurf

detect only

Never selected for execution

Run switchyard inspect status --project . --details for your live provider matrix.

Full compatibility matrix: docs/PROVIDER_COMPATIBILITY.md


See it in action

Before each wave:

📋 Wave 1 — Foundation files
┌─────────┬──────┬─────────────────────┬──────────────────┬─────────────────────────────┐
│ Agent # │ Tier │ Model               │ Provider         │ Target files                │
├─────────┼──────┼─────────────────────┼──────────────────┼─────────────────────────────┤
│ 1       │ low  │ gpt-5-mini          │ GitHub Copilot   │ config.py                   │
│ 2       │ low  │ gemini-2.5-flash-lite│ Gemini CLI      │ models.py                   │
│ 3       │ med  │ sonnet              │ Claude Code      │ main.py                     │
└─────────┴──────┴─────────────────────┴──────────────────┴─────────────────────────────┘

After all waves:

📊 Build complete — 3 agents, 1 wave
   GitHub Copilot: 1 agent (gpt-5-mini, free)
   Claude Code:    1 agent (sonnet, ~13k tokens)
   Gemini CLI:     1 agent (flash-lite, free)

Shell commands

ghc agent "implement JWT auth for the user service"   # multi-agent waves
ghcs "how to list files recursively in python"        # quick routed call
switchyard inspect status --project . --details       # provider readiness
switchyard-watch                                      # live TUI monitor

Full reference: docs/CLI.md


Documentation

Doc

Contents

MCP Tools

All 43 MCP tool surfaces

CLI Reference

Shell aliases and operator commands

Architecture

Trust boundaries and local-first design

Configuration

Safe starting config (copy to ~/.local/lib/switchyard/config.yaml)

Model Discovery

Live catalogs, tier pins, cost ranks

Routing Quality

Eval methodology and accuracy

Release Limitations

Beta scope, privacy, roadmap

Troubleshooting

Common fixes


Beta status

Public beta v1.0.0-beta.1 — MCP tool schemas may change between releases; pin a git tag for stability. See CHANGELOG.md.

  • macOS and Linux; zsh and bash

  • Windows not supported by the installer

  • Provider behavior depends on locally installed CLI versions and entitlements


Running tests

SWITCHYARD_TEST_MODE=1 python3 -m pytest tests/ -q
SWITCHYARD_TEST_MODE=1 python3 -m shared.routing_eval
python3 scripts/check_release_archive.py

Uninstall

~/.local/lib/switchyard/uninstall.sh
~/.local/lib/switchyard/uninstall.sh --purge-data

License

Licensed under the Apache License, Version 2.0. Third-party attributions in NOTICE.

Built by @timjensgrossinger.

A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/timjensgrossinger/switchyard'

If you have feedback or need assistance with the MCP directory API, please join our Discord server