Skip to main content
Glama

ModelRouter MCP

Advisory MCP server for intelligent LLM model recommendations in Cursor.

v1 Capability Statement

Ships:

  • Advisory recommend_model with schema-validated JSON

  • Heuristic task analysis (Layer A) + metadata scoring (Layer B)

  • Static seed registry with user-writable cache (~/.modelrouter)

  • Live metadata sync by default (Class D inbound fetch when privacyMode: false)

  • Guidance snippets for Cursor — user manually picks model

Does NOT ship:

  • Force Composer/Auto model selection

  • Continuous validation against engineering tasks (Phase 8 — stub only in v0.1)

  • Cursor.models.list() or any IDE runtime model API

  • Product HTTP/REST API (stdio MCP only)

Related MCP server: code-review-mcp

Quick Start

npm install
npm run build
MODELROUTER_USE_FIXTURES=1 npm test
npm run validate-schemas
npm run smoke

Cursor MCP Configuration

npm (after publish):

{
  "mcpServers": {
    "modelrouter": {
      "command": "npx",
      "args": ["-y", "modelrouter-mcp"]
    }
  }
}

Local development:

{
  "mcpServers": {
    "modelrouter": {
      "command": "node",
      "args": ["/absolute/path/to/ModelRouter_MCP/dist/index.js"]
    }
  }
}

Efficient usage

  1. Write a plan file (or pass planText inline)

  2. Call recommend_model with planPath or planText (+ optional repoPath)

  3. Manually select the recommended model in the Cursor picker

  4. Call sync_metadata when pricing/models look stale (or wait for 24h background sync)

Tools (10)

Tool

Description

recommend_model

Advisory recommendation from plan + repo metadata

analyze_task

Task type, complexity, requirement vector

analyze_repository

File counts, languages, frameworks, diff stats

list_models

Registry model list

get_model_profile

Full profile with provenance

sync_metadata

Sync from external sources (blocked in privacy mode)

generate_cursor_guidance

Advisory snippets — does not apply model

get_telemetry_summary

In-process telemetry counters

estimate_cost

Cost estimate for a specific model

run_internal_validation

Opt-in stub (no LLM calls / no score writes in v0.1)

Benchmark ingest is internal-only (via SweBenchAdapter), not exposed as an MCP tool.

Sync source matrix

Source ID

Behavior

openrouter_models

Live HTTP (fixtures when MODELROUTER_USE_FIXTURES=1)

swe_bench_leaderboard

Live HTTP / fixtures

anthropic_docs

Packaged fixture only (no live HTTP yet)

ollama_local

Probes localhost; does not write model profiles

Configuration

See schemas/modelrouter-config.schema.json.

Setting

Default

Notes

privacyMode

false

Blocks outbound HTTP; local recommend still works

sync.enabled

true

Disable to skip metadata sync

sync.sources

all adapters

Enum of source IDs above

validation.enabled

false

Stub only in v0.1

Environment variables (not in JSON schema):

  • MODELROUTER_DATA_DIR — override user cache directory (default ~/.modelrouter)

  • MODELROUTER_USE_FIXTURES=1 — fixtures only, no live HTTP (CI/dev offline)

  • MODELROUTER_PRIVACY_MODE=1 — startup privacy (blocks outbound sync)

Optional file: ~/.modelrouter/config.json (same schema). Precedence: env → file → defaults.

Privacy

See PRIVACY.md. User plan and repository data are never sent outbound. Optional public model metadata fetch (Class D) occurs when privacyMode: false.

Data Directories

Path

Purpose

Packaged data/models/

Read-only seeds (npm install)

~/.modelrouter/models/

Writable user cache (sync updates)

~/.modelrouter/sync-state.json

Last sync TTL tracking

Single-instance assumption: concurrent writes are not supported.

Troubleshooting

  • Build errors: Run npm run build before starting MCP

  • Stale metadata: Call sync_metadata or wait for background TTL sync (24h)

  • Offline dev: Set MODELROUTER_USE_FIXTURES=1

  • Privacy: Set MODELROUTER_PRIVACY_MODE=1 or privacyMode: true to block outbound HTTP

Maintainer Scripts

# Optional — requires CURSOR_API_KEY
npm run verify-cursor-ids

# CI denylist check
npm run lint:cursor-denylist

# Record live sync fixtures (network required)
npx tsx scripts/record-sync-fixtures.ts

Implementation status

Phase

Status

Runtime foundation (user dir, async sync)

Complete

Live metadata sync

Partial (see sync matrix)

Registry quality (cursor IDs)

Documented IDs; not all verified

Calibration

Provisional

npm publish

Pending pre-publish hardening

Cursor model IDs in the seed registry are documented, not runtime-verified. Calibration is provisional.

See CONTRIBUTING.md for maintainer workflows.

License

MIT — see LICENSE

Available Tools

9 tools
analyze_repositoryA

Analyze repository metadata (file counts, languages, frameworks, diff stats). No source file contents are read.

Inputs: repoPath (required).

analyze_taskB

Analyze a plan document for task type, complexity, and requirement vector. Advisory analysis only — does not select a model.

Inputs: planPath (required), repoPath.

estimate_costC

Estimate token usage and cost for a specific model given a plan.

Inputs: modelId (required), planPath (required), repoPath.

generate_cursor_guidanceC

Generate advisory Cursor guidance snippets. Does not apply or enforce model selection.

Inputs: planPath (required), config, repoPath.

get_model_profileC

Get full model profile with provenance for a specific model ID.

Inputs: modelId (required).

get_telemetry_summaryA

Get local telemetry summary. Data never leaves the machine.

Inputs: no named parameters.

list_modelsA

List all models in the registry with basic metadata.

Inputs: no named parameters.

recommend_modelC

Advisory model recommendation based on plan analysis and registry metadata. User must manually select model in Cursor picker.

Inputs: planPath (required), config, repoPath, alternativesCount.

sync_metadataC

Sync model metadata from external sources. Blocked in privacy mode.

Inputs: config.

Tool Schema Changelog

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

    TDQS

    B3.4/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of model routing: repository analysis, task analysis, cost estimation, guidance generation, profile retrieval, telemetry, listing, recommendation, and metadata sync. No two tools have overlapping purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case, such as analyze_repository, estimate_cost, and list_models. This makes the tool set predictable and easy to navigate.

    Tool Count5/5

    With 9 tools, the server provides a comprehensive yet concise set of capabilities for an advisory model router. Each tool has a clear role, and the count is well within the optimal 3-15 range.

    Completeness4/5

    The tool surface covers the core workflow of analyzing tasks, recommending models, estimating costs, and retrieving metadata. Minor gaps exist, such as no tool for direct model selection or comparison, but these are intentional given the advisory nature.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers