Atlas / MCP servers / heratiki / LocaLLama

LocaLLamaBLOCK

mcp/heratiki/locallama

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.

Verdict
BLOCK
Grade
F
Trust score
53 /100
Exposed tools
20 16r · 3w · 1d
Transport
stdio
License
—
Stars
43
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://github.com/Heratiki/locallama-mcp/releases) [](https://github.com/Heratiki/locallama-mcp/releases)

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.

Node.js: >=22

⚠️ Early / experimental — not yet a stable release. This project is under active, rapid development and has not been fully verified end-to-end. MCP tool signatures, configuration, and behavior may change between releases without notice. Version numbers follow SemVer mechanically (they're derived from Conventional Commit messages, not hand-picked), so a 1.x number signals only "a public surface exists" — it is not a promise of stability or completeness. If you depend on this server, pin to an exact version. - Tagged releases on `main` are the relatively safer builds. - The `testing` channel publishes bleeding-edge pre-releases (x.y.z-testing.n) for trying unproven changes early.

Overview

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.

Supported MCP clients: Codex, Claude Code, Claw Code, Cursor, GitHub Copilot Agent mode, and any generic MCP stdio client.

Requirements

  • Node.js 22+
  • npm
  • At least one of: Ollama, LM Studio, llama.cpp server, or an OpenRouter API key

Read from source at commit 9c03639448efOBSERVED · 2026-10-08
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add locallama-mcp --env OPENROUTER_API_KEY=${OPENROUTER_API_KEY} --env TOKEN_THRESHOLD=${TOKEN_THRESHOLD} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "locallama-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "OPENROUTER_API_KEY": "${OPENROUTER_API_KEY}",
        "TOKEN_THRESHOLD": "${TOKEN_THRESHOLD}"
      }
    }
  }
}
03

Exposed tools (20)

16 read · 3 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
benchmark_free_modelsreadBenchmark the performance of free models from OpenRouter
benchmark_modelwriteRun built-in benchmark suites against a specific model identified by its model id.
benchmark_taskreadBenchmark the performance of local LLMs vs paid APIs for a specific task. When live job monitoring is available, the response includes monitoring.websocketUrl and MCP job resource URIs.
benchmark_tasksreadBenchmark the performance of local LLMs vs paid APIs for multiple tasks. When live job monitoring is available, the response includes monitoring.websocketUrl and MCP job resource URIs.
cancel_jobreadCancel a running background job. Returns the job id, whether cancellation succeeded, and the final status.
cancel_taskreadCancel all queued or in-progress jobs belonging to a non-blocking route_task submission.
check_for_updatesreadCheck whether the running locallama-mcp server is up to date with the latest commit on the future-testing branch on GitHub. Returns upToDate status, local SHA, remote SHA, and any error.
clear_openrouter_trackingdestructiveClear OpenRouter tracking data and force an update
get_cost_estimatereadReturns a structured JSON cost estimate for running a given number of tokens through the router.
get_free_modelsreadGet a list of free models available from OpenRouter
get_system_statereadReturn a structured snapshot of current runtime health: local slot occupancy (inference vs benchmark vs idle),
get_task_statusreadPoll a non-blocking route_task submission. Returns aggregate task status, progress, retry hint, and per-job summaries including inline result content when completed.
get_telemetry_summaryreadReturn an analytics summary of LLM call telemetry recorded across all runs.
preemptive_route_taskreadCheap model-selection check that returns a routing recommendation WITHOUT executing the task.
rate_modelreadProvide explicit human or orchestrator feedback on generator or validator model performance for a completed task/job. Updates capability scores and enqueues fixture candidates for negative outcomes.
reload_configwriteReload runtime configuration from the project .env file and apply only hot-reloadable fields.
retriv_initreadInitialize and configure Retriv for code search and indexing
retriv_searchreadSearch code using native BM25 engine
route_taskreadQueue a coding task for execution by the most cost-effective LLM available and return immediately with a task_id.
set_model_prompting_strategywriteUpdate the prompting strategy used for a specific OpenRouter model. Allows callers to supply a custom system prompt, user prompt template, and assistant prompt template that will be used on subsequent task executions for that model.
04

Trust audit

BLOCKgrade F · trust 53/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)FAIL
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (6 observation(s))
Network
declared (2 observation(s))
Shell
declared (5 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (20)

HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
src/modules/decision-engine/services/codeValidator.ts:46
const containsDangerousPatterns = code.includes('eval(') ||
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
src/modules/decision-engine/services/codeValidator.ts:47
code.includes('new Function(') ||
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
src/modules/llama-cpp/discovery.ts:21
exec(cmd, (error, stdout) => {
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHPrompt injection · prompt.override · CWE-94, CWE-1427
docs/PLAN.md:1108
- Attempt to override system-prompt instructions in the local model (jailbreak attempts).
Why it matters. asks the agent to drop prior instructions or safety
Fix. remove the instruction
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
clear_openrouter_tracking
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.hidden_file · CWE-1104
.releaserc.json
.releaserc.json
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.rooignore
.rooignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.no_license · CWE-1104
Why it matters. no LICENSE file and no repo licence
Fix. add a licence
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/modules/benchmark/storage/results.ts:47
const testHash = crypto.createHash('md5')
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/modules/api-integration/cost-estimation/index.ts:1
import { costMonitor } from '../../cost-monitor/index.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/modules/api-integration/cost-estimation/index.ts:2
import { openRouterModule } from '../../openrouter/index.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/modules/api-integration/cost-estimation/index.ts:4
import { config } from '../../../config/index.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/modules/api-integration/cost-estimation/index.ts:5
import { logger } from '../../../utils/logger.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/modules/api-integration/openrouter-integration/index.ts:1
import { config } from '../../../config/index.js';
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
README.md:296
"monitoringUrl": "http://127.0.0.1:3001",
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/LIVE_TESTING.md:88
LLAMA_CPP_ENDPOINT=http://127.0.0.1:8080
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/LIVE_TESTING.md:123
curl http://127.0.0.1:8080/v1/models
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
test/dispatcher.test.ts:636
url: 'http://127.0.0.1:8081/',
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
test/dispatcher.test.ts:652
expect(mockGetCachedMonitoringReachability).toHaveBeenCalledWith('http://127.0.0.1:8081/');
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/sdk, @opentelemetry/api, @opentelemetry/exporter-trace-otlp-http, @opentelemetry/resources, @opentelemetry/sdk-trace-base, @opentelemetry/sdk-trace-node, @opentelemetry/semantic-
Why it matters. 36 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: instruction_override, no_behavioural_pass, no_license.

Audited 2026-10-08 · audit v0.4.1 · source sha 9c03639448effull audit observations/trust-audit/mcp-server/heratiki__locallama.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-089c03639448efBLOCKF53first audit
06

Questions

What is the LocaLLama MCP server?

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.

What tools does LocaLLama expose?

20 in total: 16 read-only, 3 that write, and 1 that can delete or overwrite (clear_openrouter_tracking). Every one is listed on this page with its risk.

Is LocaLLama safe to connect to an agent?

No — not without reading the findings first. The audit graded it F (53/100) and found 4 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does LocaLLama need?

It reads OPENROUTER_API_KEY and TOKEN_THRESHOLD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does LocaLLama run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as locallama-mcp at 1.31.4.

How current is this page?

The grade is for one exact copy of the source (9c03639448ef), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement