An MCP Server that works with Roo Code/Cline.Bot/Claude Desktop to optimize costs by intelligently routing coding tasks between local LLMs free APIs
An MCP Server that works with Roo Code/Cline.Bot/Claude Desktop to optimize costs by intelligently routing coding tasks between local LLMs free APIs and paid APIs.
Local-first, provider-neutral Model Context Protocol server for coding-agent workflows. Routes tasks across local models (Ollama, LM Studio, llama.cpp), free OpenRouter models, and paid frontier models using cost, latency, context capacity, and benchmark history.
LocalLama MCP reduces token costs without sacrificing quality. Tasks are queued asynchronously — route_task returns a task_id immediately; callers poll get_task_status for results. The decision engine chooses local → free → paid based on measured provider capabilities and configurable thresholds.
Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| route_task | task, context_length, expected_output_length?, complexity?, priority?, preemptive? |
| get_task_status | task_id |
| cancel_task | task_id |
| cancel_job | job_id |
| preemptive_route_task | task, context_length, expected_output_length?, complexity?, priority? |
| get_cost_estimate | context_length, expected_output_length?, model? |
| benchmark_task | task_id, task, context_length, expected_output_length?, complexity?, local_model?, paid_model?, runs_per_task? |
| benchmark_tasks | tasks[], runs_per_task?, parallel?, max_parallel_tasks? |
| benchmark_model | model_id, provider_id?, task_categories? |
| retriv_init | directories[], exclude_patterns?, chunk_size?, force_reindex?, bm25_options? |
| retriv_search | query, limit? |
| reload_config | — |
| check_for_updates | — |
| update_server | — |
{
"mcpServers": {
"locallama": {
"command": "node",
"args": ["/path/to/locallama-mcp/dist/index.js"],
"env": {
"LM_STUDIO_ENDPOINT": "http://localhost:1234/v1",
"OLLAMA_ENDPOINT": "http://localhost:11434/api",
"DEFAULT_LOCAL_MODEL": "qwen2.5-coder-3b-instruct",
"TOKEN_THRESHOLD": "1500",
"COST_THRESHOLD": "0.02",
"QUALITY_THRESHOLD": "0.07",
"OPENROUTER_API_KEY": "your_openrouter_api_key_here"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| LM_STUDIO_ENDPOINT | Configuration value read at startup. | Optional |
| OLLAMA_ENDPOINT | Configuration value read at startup. | Optional |
| DEFAULT_LOCAL_MODEL | Configuration value read at startup. | Optional |
| TOKEN_THRESHOLD | Credential the server authenticates with. | Yes |
| COST_THRESHOLD | Configuration value read at startup. | Optional |
| QUALITY_THRESHOLD | Configuration value read at startup. | Optional |
| OPENROUTER_API_KEY | Credential the server authenticates with. | Yes |
| BENCHMARK_RESULTS_PATH | Filesystem location the server is allowed to use. | Optional |
Store entities, relations and observations in a local knowledge graph with the reference Memory MCP server.
Connect the Notion MCP server to search workspace content and work with pages and databases through Notion’s hosted OAuth service.
OAuth CRM tools for companies, deals, campaign insights and contact creation in FirstSales.
Scheduling infrastructure for AI agents across Google and Microsoft calendars.
MCP server for Cucumber Studio API integration
Agent-native task management: your AI agent is the interface. Delegate to anyone by email.