Skip to content
Conduit

mcp server

mozart-router

Local orchestration and routing for AI agents — gateway-first, agent-first, integration-first

ucav/mozart-routercommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • Node.js 20 or newer
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mozart-router": {
      "command": "npx",
      "args": [
        "-y",
        "mozart-router"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 17, 2026

🎻 Mozart

Mozart is the local conductor for AI agents. Gateways execute. Mozart decides.

CI npm Tests License


What problem does Mozart solve?

You have Ollama, OpenRouter, LiteLLM, OpenCode, OpenClaw... multiple gateways, multiple models. Every time you ask your agent to do something, you have to guess which model to use. Cheap one for simple stuff? Premium for complex? Local for sensitive files?

Mozart decides for you. It detects every gateway and model you already have, classifies your task, scans for secrets, estimates cost, and routes to the best model — automatically.

Before Mozart:  "Hmm, should I use GPT-4 or Llama for this? Is there a secret in this file?"
After Mozart:   "Just ask. Mozart handles it."

⚡ Quick Install

npm install -g mozart-router
mozart-router doctor

That's it. Mozart finds everything you already have configured.


🎯 What Mozart does

CapabilityHow
🔍 Auto-detectFinds Ollama, OpenClaw, OpenCode, LiteLLM, OpenRouter, LM Studio, vLLM, NIM — plus 11 endpoints via auto-discovery
🧠 Classify tasksHeuristic classifier: debugging, code gen, refactor, security audit, test writing...
🛡️ Protect secretsScans content for API keys, tokens, .env files. Blocks cloud routing when sensitive.
📊 Route intelligentlyScores models on quality, cost, latency, privacy, context, reliability. Returns full explanation.
💰 Estimate costPer-model pricing. Live prices from OpenRouter (357 models).
🔄 Fallback chainsAutomatic retry with exponential backoff. Circuit breaker on failing providers.
📝 Explain everythingEvery route decision comes with a "why" — why this model, why not the others.
🏠 100% localNo cloud dependency. Classification, privacy scanning, routing — all local.

🚀 30-Second Demo

# See what's on your machine
mozart-router doctor

# Simulate routing for a task
mozart-router simulate "debug my Next.js build error"

# Route a real task
mozart-router route "write Playwright tests for the login page"

# Understand the decision
mozart-router why

# Session report
mozart-router report

# See the dashboard
mozart-router start --port=4444
# Open http://localhost:4444

🔌 Integration modes

Mozart works however you need it to:

# As a CLI tool
mozart-router doctor

# As an SDK in your agent code
import { Mozart } from 'mozart-router'

# As a skill for OpenCode / OpenClaw / Hermes
mozart-router init --gateway opencode

# As an MCP server (Claude Desktop, Cursor, Continue.dev)
mozart-router mcp

# As an OpenAI-compatible proxy
mozart-router proxy --port=4445

# As a streaming middleware (SSE)
mozart-router stream --port=4445

📦 Supported Gateways

GatewayDetectionStatus
Ollamaollama list✅ Real
OpenClawReads ~/.openclaw/openclaw.json✅ Real
OpenCodeEnv vars + models cache✅ Real
LiteLLMScans litellm_config.yaml✅ Real
OpenRouterOPENROUTER_API_KEY env✅ Real
LM StudioGET /v1/models on localhost:1234✅ Real
vLLMGET /v1/models on localhost:8000✅ Real
NVIDIA NIMLocal endpoint + env✅ Real
Generic OpenAIAuto-discovers 11 endpoints✅ Real
Hermes AgentConfig file detection✅ Real
CursorIntegration docs📋 Stub

🧭 How routing works

Your task → "debug the authentication error"
                ↓
         Task Classifier → debugging, high complexity, very_high context
                ↓
         Privacy Guard  → scans for secrets, API keys
                ↓
         Policy Engine  → your budget, privacy preferences
                ↓
         Routing Engine → scores all available models on 7 dimensions
                ↓
         Output         → "qwen3:8b via OpenClaw (score 0.92, cost $0)"
                           + fallback chain
                           + full explanation

📊 Commands

CommandDescription
doctorDetect all gateways and models
simulate <task>Simulate routing without executing
route <task>Route and explain
whyExplain last decision
reportSession statistics
start [--port=4444]HTTP API + dashboard
proxy [--port=4445]OpenAI-compatible middleware
stream [--port=4445]Streaming SSE middleware
mcpMCP server (stdio)
skillsList Mozart skills
profilesList policy profiles
pricing syncFetch live OpenRouter prices
scan-localScan local hardware
healthProvider health check
config initInteractive setup wizard

📚 Docs

DocContent
ARCHITECTURESystem design
GATEWAY_FIRSTWhy Mozart doesn't replace gateways
FEATURE_MATRIXComplete feature status
INTEGRATIONSGateway/agent setup guides
ADAPTERSAdapter reference
SECURITYPrivacy guard + redaction
LIMITATIONSHonest limits

↑↓ navigate openesc close