decisions-mcp
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., "@decisions-mcp locate where expired tokens return 401 in my codebase"
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.
decisions-mcp
Let your AI agent scan huge codebases for a fraction of a cent — without reading them.
An MCP server that gives any coding agent — Claude Code, Claude Desktop, Cursor, VS Code, Codex, Windsurf — access to tiny decision models on OpenRouter: Jev by default, Cloudflare Clef, Mercury Decide, Liquid D1 and every other model behind the Decisions API. The agent describes what it's looking for; the model sifts through every line and points to the exact spot.
English · Русский
Why
Your agent needs to find a bug somewhere in 80 files. Reading them costs ~270k tokens of its context. With this server it asks "where does this happen?" and gets back ~1k tokens: the file, the line range, and the code. Then it reads and fixes just that — it's already an LLM, it doesn't need another one.
Decision models don't write text. They score and pick: yes/no with a probability, one of N options, a level on a scale. That's exactly what's needed to narrow down a search — and it costs $0.02–0.05 per 1M input tokens, output free.
Related MCP server: Glancey
How it works
flowchart LR
A["Agent: 'valid tokens get<br/>401 Token has expired'"] --> B[locate_in_files]
B --> C["Pass 1 · Jev scores<br/>every chunk of every file"]
C --> D["Pass 2 · Jev re-scores<br/>~40-line windows in the top chunks"]
D --> E["bearerAuth.js:31-70 · 0.97<br/>+ the code"]
E --> ANothing is truncated: large files are split into overlapping chunks and all of them are scored, so a bug in the middle of a 20k-line file is still found.
Benchmarks
Measured on the compiled MCP TypeScript SDK 1.32.1 — 87 files, ~230k tokens — with ground truth that can be checked mechanically. Reproduce with npm run bench; raw results are in bench/results.
Bug — 6 one-line bugs planted one at a time (inverted comparisons, an off-by-one, a wrong constant), in 6 different files. The model gets only the symptom, half of them in Russian. file #1 — the buggy file ranks first; line window #1 — the top ~40-line window contains the bug.
Facts — 6 yes/no questions for every file (calls fetch, defines a class, throws, uses timers, uses zod, async), checked with regexes.
Classify — client / server / shared / examples for 71 files, with paths anonymized so the model has to read the code.
Model | Bug: file #1 | Bug: file top-3 | Bug: line window #1 | Bug: line top-3 | Facts acc | Facts F1 | Classify acc | Cost | Time |
| 6/6 | 6/6 | 6/6 | 6/6 | 99% | 0.96 | 85% | $0.0313 | 88s |
| 6/6 | 6/6 | 6/6 | 6/6 | 99% | 0.97 | 83% | $0.0889 | 139s |
| 6/6 | 6/6 | 6/6 | 6/6 | 97% | 0.89 | 79% | $0.1760 | 47s |
| 6/6 | 6/6 | 5/6 | 6/6 | 99% | 0.97 | 85% | $0.0443 | 65s |
| 6/6 | 6/6 | 5/6 | 6/6 | 99% | 0.94 | 72% | $0.0907 | 63s |
| 6/6 | 6/6 | 5/6 | 6/6 | 98% | 0.93 | 72% | $0.0436 | 54s |
| 6/6 | 6/6 | 4/6 | 5/6 | 98% | 0.91 | 87% | $0.0775 | 53s |
| 6/6 | 6/6 | 4/6 | 5/6 | 99% | 0.96 | 80% | $0.0658 | 57s |
| 6/6 | 6/6 | 4/6 | 5/6 | 98% | 0.91 | 76% | $0.0597 | 59s |
| 6/6 | 6/6 | 3/6 | 5/6 | 99% | 0.97 | 75% | $0.2532 | 49s |
| 5/6 | 6/6 | 3/6 | 5/6 | 97% | 0.92 | 69% | $0.0425 | 75s |
| 4/6 | 4/6 | 3/6 | 4/6 | 99% | 0.96 | 73% | $0.0945 | 61s |
| 4/6 | 4/6 | 2/6 | 3/6 | 98% | 0.95 | 73% | $0.0639 | 134s |
| 4/6 | 5/6 | 1/6 | 3/6 | 98% | 0.96 | 66% | $0.0916 | 115s |
| 2/6 | 4/6 | 2/6 | 3/6 | 89% | 0.75 | n/a | $0.0000 | 57s |
| 1/6 | 3/6 | 1/6 | 2/6 | 94% | 0.88 | 69% | $0.1341 | 631s |
| 1/6 | 2/6 | 1/6 | 1/6 | 90% | 0.83 | 66% | $0.1336 | 116s |
Takeaways
Every top-10 model found the right file for all 6 bugs on the first try, out of 87 files.
inception/mercury-decideis the best all-rounder and the cheapest model that handles every task: perfect bug localization, 0.96 facts F1, about $0.03 for the whole benchmark.cloudflare/clefmatches it on localization and ties for the best facts score. Jev 1.13 has the best classification accuracy.Small 4B models and the Upstage / Respan models are noticeably weaker at localization. Respan is an LLM-judge model and only supports yes/no questions.
Runs vary a little: with 6 bugs, one window more or less moves line #1 by a whole step. Treat differences of ±1 as noise.
Tools
Tool | What it does | Example |
| Finds where something is: a bug from its symptoms, the code behind a feature, where a setting lives. Returns ranked | "valid tokens get 401 'Token has expired', expired ones pass" |
| Sorts every file into your labels with a confidence score |
|
| Several typed questions per file: |
|
| Decision models available on OpenRouter with context size and price; pass any id as |
|
Common parameters: paths (files and/or directories), include / exclude (globs), respect_gitignore, model, dry_run (show what would be scanned — no API calls).
Most likely locations (probability · file:lines):
1. 0.97 server/auth/middleware/bearerAuth.js:31-70
2. 0.72 examples/server/demoInMemoryOAuthProvider.js:91-130
3. 0.62 examples/server/elicitationUrlExample.js:151-190
Files ranking:
1. 0.97 server/auth/middleware/bearerAuth.js
2. 0.68 examples/server/simpleStreamableHttp.js
3. 0.66 examples/server/elicitationUrlExample.js
--- server/auth/middleware/bearerAuth.js:31-70 (0.97)
...
45| // Check if the token is set to expire or if it is expired
46| if (typeof authInfo.expiresAt !== 'number' || isNaN(authInfo.expiresAt)) {
47| throw new InvalidTokenError('Token has no expiration time');
48| }
49| else if (authInfo.expiresAt > Date.now() / 1000) {
50| throw new InvalidTokenError('Token has expired');
51| }
...
---
files: 88 | ~source tokens: 268700 | chunks: 108 | windows: 48 | model calls: 156 | cost: $0.01175Any decision model
Every tool takes a model argument, and DECISIONS_MODEL sets the default. The server adapts to each model automatically:
Context size is read from OpenRouter's catalog, and chunks are sized to fit — from 8k-token models like
jaredpalmer/kev-4bto 1M-token ones.Request quirks are learned from the first rejection and remembered: models that want
stateas a string (ScaleDown, Respan) or accept only yes/no questions with plain-string criteria (Respan) just work.Fallbacks: list backups in
DECISIONS_FALLBACK_MODELS, and they take over if the primary model fails.
Install
You need Node.js 18+ and a regular OpenRouter API key — openrouter.ai/keys (a management/provisioning key won't work).
git clone https://github.com/GorOhanyan/decisions-mcp.git
cd decisions-mcp && npm installEvery config below runs node /ABS/PATH/decisions-mcp/src/index.js. Desktop apps often don't see your shell PATH, so use the absolute path to node (which node) if node alone doesn't start.
Or skip the clone and let npx fetch it from GitHub: use "command": "npx", "args": ["-y", "github:GorOhanyan/decisions-mcp"].
claude mcp add decisions --scope user -e OPENROUTER_API_KEY=sk-or-... -- node /ABS/PATH/decisions-mcp/src/index.jsmacOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"decisions": {
"command": "node",
"args": ["/ABS/PATH/decisions-mcp/src/index.js"],
"env": { "OPENROUTER_API_KEY": "sk-or-..." }
}
}
}{
"mcpServers": {
"decisions": {
"command": "node",
"args": ["/ABS/PATH/decisions-mcp/src/index.js"],
"env": { "OPENROUTER_API_KEY": "sk-or-..." }
}
}
}Same format for Windsurf (~/.codeium/windsurf/mcp_config.json).
{
"inputs": [
{ "type": "promptString", "id": "openrouter-key", "description": "OpenRouter API key", "password": true }
],
"servers": {
"decisions": {
"type": "stdio",
"command": "node",
"args": ["/ABS/PATH/decisions-mcp/src/index.js"],
"env": { "OPENROUTER_API_KEY": "${input:openrouter-key}" }
}
}
}[mcp_servers.decisions]
command = "node"
args = ["/ABS/PATH/decisions-mcp/src/index.js"]
tool_timeout_sec = 300
[mcp_servers.decisions.env]
OPENROUTER_API_KEY = "sk-or-..."Make the agent actually use it
The server ships MCP instructions telling the agent when to call it, but a line in CLAUDE.md / AGENTS.md / .cursor/rules makes it reliable:
When you need to find something in a lot of code or text (a bug from its symptoms, where a feature
is implemented, where a setting lives) or triage many files — use the decisions MCP first
(locate_in_files / classify_files / decide_files), then read only the lines it points to.Configuration
The old JEV_* names (from when the project was called jev-offload-mcp) are still accepted.
Variable | Default | Description |
| — | Required |
|
| Default decision model (any id from |
| — | Comma-separated backups tried in order if the primary fails |
|
| Parallel requests to Jev |
| workspace root from MCP roots, else cwd | What relative paths resolve against |
| — | Restrict reading to these directories ( |
|
| Limits for file collection |
| — |
|
|
| Decisions API endpoint |
| OpenRouter decision-model catalog | Where context sizes and prices are read from |
|
| Per-request timeout |
What never leaves your machine
node_modules, .git, dist / build, lock files, minified bundles, binaries, everything in .gitignore, and secrets — .env*, *.pem, *.key, id_rsa*, credentials*, .npmrc, .aws/, .ssh/ and similar. Use dry_run: true to see exactly what would be sent.
Development
npm install
npm testThe test is end-to-end: a real MCP client talks to the server over stdio while the Decisions API is mocked. It covers every tool, dry runs, filters, secret / .gitignore / binary exclusion, a full scan of a large file with pinpointing to a line window, context-aware chunk sizing, per-model request adaptation, fallback models and workspace-root detection via MCP roots.
npm run bench runs the quality benchmark against the real API (needs OPENROUTER_API_KEY; about $1–2 for all models).
License
MIT © Gor Ohanyan
Available Tools
4 toolsclassify_filesClassify filesA
Classify every file in the given paths into your labels with a decision model (one very cheap request per file, calibrated confidence). Returns files grouped by label. Good for triage: tests/configs/dead code, sorting documents by topic, flagging files about X. Label descriptions after a colon noticeably improve accuracy.
Inputs: paths (required), labels (required), model, format, +7 more.
decide_filesTyped per-file decisionsA
Ask several typed questions about EACH file with a decision model: yes_no flags, one-of choices and ordered scores, with calibrated probabilities. Example: for every file decide uses_db (yes_no), layer (choice: api/domain/ui/infra), complexity (score: low/medium/high). Use only_matching to return just the files where a yes_no question is yes.
Inputs: paths (required), questions (required), model, format, +7 more.
list_modelsList decision modelsA
List the decision models available on OpenRouter (id, context window, input price) and which one is the default. Pass an id as model to any other tool. Bigger context = bigger chunks per request.
Inputs: no named parameters.
locate_in_filesFind where something is in many/huge filesA
Find which files and lines most likely contain what you describe — the cause of a bug from its symptoms, the code implementing a feature, where a setting is defined. Pass 1: every file is split into chunks and ALL chunks are scored by the decision model (nothing is truncated; very cheap even for megabytes). Pass 2: the best chunks are re-scored in small line windows to pinpoint the lines. Returns ranked file:line ranges with probabilities, a per-file ranking and the code of the top locations, so you can go straight to the fix.
Inputs: paths (required), query (required), top, model, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
locate_in_files and list_models are clearly distinct, but classify_files and decide_files overlap: classification is effectively a one-question decision, so an agent must read carefully to know which to pick for a single-label vs multi-question pass. The descriptions do clarify the intended boundary (grouped label output vs typed yes_no/choice/score answers), so confusion is limited rather than pervasive.
All four tools are snake_case verb-first names (classify_files, locate_in_files, decide_files, list_models) with a predictable verb + target pattern. list_models is the only one not scoped to 'files', but it follows the same convention and is semantically clear.
Four tools is a tight, well-scoped surface: three file-analysis operations plus a model-discovery utility that enables the others. Each tool has a distinct role and none feels redundant or bolted on.
The core workflow of triage (classify), structured interrogation (decide), and pinpointing (locate) is covered, with list_models to support model choice. Minor gaps exist: no direct way to inspect raw file contents outside results, no aggregation/summary across the outputs of multiple passes, and no mechanism to persist or reuse a named question set.
Maintenance
Related MCP Connectors
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceIndexes codebases and lets AI agents retrieve precise code snippets (functions, classes, routes) instead of reading entire files, reducing token usage and improving accuracy.71 npm7MIT
- AlicenseNot gradedqualityDmaintenanceAdds semantic code search to AI coding agents, enabling natural language queries across entire codebases to retrieve relevant code chunks, saving tokens and providing deep context.22 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to quickly find relevant code, focus reads on important parts of large files, and pick relevant items from long lists, reducing token usage and search time.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to locate code by meaning rather than text patterns, combining embedding-based semantic search, exact/regex literal matching, and tree-sitter AST structural filters to return compact, tree-shaken code context. It also supports symbol metadata filtering, duplicate detection, codebase surveys and clustering, call-graph exploration, and exhaustive changed-file audits.2Apache 2.0