ModelRouter MCP
The ModelRouter MCP server provides advisory LLM model recommendations, task and repository analysis, and model registry management for Cursor. All recommendations are advisory — the user must manually select the model. No user data is sent externally.
recommend_model: Advisory model recommendation based on plan and repo metadata, with optional alternatives and config overrides.analyze_task: Parse a plan document to determine task type, complexity, and requirement vector.analyze_repository: Inspect repo metadata (file counts, languages, frameworks, diff stats) without reading source file contents.estimate_cost: Estimate token usage and cost for a specific model given a plan.list_models: List all models in the registry with basic metadata.get_model_profile: Fetch the full profile and provenance for a specific model by ID.sync_metadata: Refresh model metadata from external fixture-based adapters (blocked in privacy mode).get_telemetry_summary: View local telemetry data — never leaves the machine via outbound HTTP.generate_cursor_guidance: Generate advisory Cursor guidance snippets — does not automatically apply or enforce model selection.
Integrates Ollama as a local model registry, enabling recommendations for locally hosted Ollama models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ModelRouter MCPrecommend a model for my Python data science project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ModelRouter MCP
Advisory MCP server for intelligent LLM model recommendations in Cursor.
v1 Capability Statement
Ships:
Advisory
recommend_modelwith schema-validated JSONHeuristic 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 APIProduct 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 smokeCursor 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
Write a plan file (or pass
planTextinline)Call
recommend_modelwithplanPathorplanText(+ optionalrepoPath)Manually select the recommended model in the Cursor picker
Call
sync_metadatawhen pricing/models look stale (or wait for 24h background sync)
Tools (10)
Tool | Description |
| Advisory recommendation from plan + repo metadata |
| Task type, complexity, requirement vector |
| File counts, languages, frameworks, diff stats |
| Registry model list |
| Full profile with provenance |
| Sync from external sources (blocked in privacy mode) |
| Advisory snippets — does not apply model |
| In-process telemetry counters |
| Cost estimate for a specific model |
| 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 |
| Live HTTP (fixtures when |
| Live HTTP / fixtures |
| Packaged fixture only (no live HTTP yet) |
| Probes localhost; does not write model profiles |
Configuration
See schemas/modelrouter-config.schema.json.
Setting | Default | Notes |
|
| Blocks outbound HTTP; local recommend still works |
|
| Disable to skip metadata sync |
| all adapters | Enum of source IDs above |
|
| 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 | Read-only seeds (npm install) |
| Writable user cache (sync updates) |
| Last sync TTL tracking |
Single-instance assumption: concurrent writes are not supported.
Troubleshooting
Build errors: Run
npm run buildbefore starting MCPStale metadata: Call
sync_metadataor wait for background TTL sync (24h)Offline dev: Set
MODELROUTER_USE_FIXTURES=1Privacy: Set
MODELROUTER_PRIVACY_MODE=1orprivacyMode: trueto 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.tsImplementation 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 |
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 toolsanalyze_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
Scored across 9 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseCqualityDmaintenanceMCP server for sharing source-backed engineering memory across AI coding clients like Cursor and VS Code.301MIT
- FlicenseNot gradedqualityDmaintenanceLocal MCP server for Cursor that analyzes code, finds bugs, generates tests and documentation via OpenRouter.-
- AlicenseAqualityDmaintenanceUniversal MCP server that analyzes any codebase and provides structured context to AI assistants. Dynamic, accurate, and token-efficient.1812 npmMIT
- AlicenseAqualityBmaintenanceMCP server that lets any agent or MCP host delegate tasks to the Cursor CLI agent for fast, headless execution. Supports task delegation, project discovery, file analysis, and follow-up sessions.314 npm4MIT