MCP integration
Overview — all three servers
prom.codes ships three MCP servers — a code-context engine, an agent memory, and a token saver. Here's what each does, how the agent uses them together, and the one canonical environment-variable reference.
prom.codes is three MCP servers. Two of them — context and memory — are the everyday pair (most setups run both); the third is a one-shot installer you add on top.
@prom.codes/context-mcpanswers "what does this codebase look like?" — it indexes the workspace and serves grounded code retrieval (search_code,find_references,expand_context, …). See Code context engine.@prom.codes/memory-mcpanswers "what did we already learn, decide and agree on?" — durable facts, decisions and procedures that survive context-window resets and agent restarts. See Agent Memory.@prom.codes/saveranswers "why is this agent burning tokens narrating itself?" — a one-shot installer that writes an efficient-output rule block into your runtime so the agent spends fewer tokens on its own prose while keeping code, commands and context verbatim. Pure JS (no database, no embeddings, no native modules), no API key. See Token Saver.
Context stays in the present (the code as it is now); memory carries the past forward (the conventions and decisions behind it). Together the agent can ground a change in the real call sites and remember the team's rules about how that change should be made.
Install
All three install with one command each in Claude Code — see Install for Claude Code for the canonical commands. Cursor and VS Code use the same JSON shape in their own config files.
You need one prom_live_… key (mint it at
/app/api-keys) for context and memory; the
saver needs no key.
What the agent does with them
A typical loop touches context and memory:
- Recall first. At session start the agent calls
memory_read(ormemory_search) to pull the project's conventions and prior decisions — "usepnpm test:intfor integration tests", "the billing module owns retry logic". The memory server returns a token-capped markdown block ready to drop into the prompt. - Retrieve code. When it needs the actual implementation it calls
search_code/find_references/expand_contextagainst the context engine to find the real symbols and call sites — no hallucinated names. - Capture at the end. After finishing, the agent calls
memory_captureso the session's plan, outcome and any new facts become durable memory for next time.
The token saver sits outside this loop: its one setup tool
installs an efficient-output rule block once, and from then on every turn the
agent writes is leaner — without touching what it retrieves or remembers.
Environment-variable reference
These are the variables that matter day-to-day — the specialised tuning knobs live on each server's own page (Agent Memory has the full memory matrix). All are optional except the API key for context and memory — workspace root and DB paths are auto-detected.
| Variable | Used by | Purpose |
|---|---|---|
PROMETHEUS_API_KEY | context + memory | Required. Your prom_live_… key, the same value for both servers. Unlocks managed code embeddings and memory. The saver needs no key. |
PROMETHEUS_WORKSPACE_ROOT | context + memory | Optional / auto-detected. Absolute path of the repo to work on. Resolved automatically from CLAUDE_PROJECT_DIR (Claude Code) or the editor's MCP roots (Cursor, VS Code). Set it only to point at a different folder than the one open. |
PROMETHEUS_DB_PATH | context | Optional / auto-defaulted. Override for the local SQLite code index (default ~/.prometheus/<hash>.db). |
PROMETHEUS_MEMORY_DB_PATH | memory | Optional / auto-defaulted. Override for the memory database (default ~/.prometheus/memory.db). |
PROMETHEUS_MEMORY_TEMPORAL | memory | Optional (0.7.0+, on by default). Temporal-intent ranking: for "latest"/"earliest"-style queries it promotes the newest/oldest matching record. Pure-local, free; no effect on non-temporal queries. Set off to disable; tune with PROMETHEUS_MEMORY_TEMPORAL_WEIGHT (default 2.0). |
PROMETHEUS_MEMORY_AUTO_SETUP | memory | Optional (0.9.0+, on by default). On startup, install the memory-protocol rule into runtime config files that already exist (CLAUDE.md/AGENTS.md/Cursor/Augment) so the agent actually uses memory — idempotent, marked, never creates a new file, skipped for home/root. Set off to disable. |
PROMETHEUS_SAVER_AUTO_SETUP | saver | Optional (0.1.6+, on by default). Same mechanism for the Saver: auto-installs the efficient-output rule into existing config files on startup so it actually takes effect. Idempotent, marked, never creates a new file, skipped for home/root. Set off to disable. |
PROMETHEUS_AUTO_UPDATE | context | Optional (0.13.0+, on by default for global installs). When a newer version is published, the server hands the install to a detached updater that waits until every prom window has closed before installing — it can never corrupt a running install. Set 0 to opt out (controlled/enterprise environments). Dev builds never auto-update. |
PROMETHEUS_NO_UPDATE_CHECK | context + memory | Optional. Set to 1 to silence the non-blocking startup check that logs to stderr when a newer npm version is published. The check is best-effort, throttled to ~once a day, and never installs anything by itself (installing is the job of auto-update / update_servers). |
PROMETHEUS_IDLE_EXIT_MS | context + memory + saver | Optional (0.10.1+, default 30 min). Milliseconds a server may sit with no inbound MCP traffic before it exits itself. This reaps servers an editor abandons without closing stdin (e.g. on a reconnect) so they cannot pile up and burn CPU. A server in use resets the timer on every request; 0 disables the watchdog. If a long-idle window drops your tools, the client re-spawns the server on next use. |
Where your data lives locally
Everything is plain SQLite under one folder in your home directory, so you
can open it with any SQLite viewer (sqlite3, DB Browser for SQLite, …):
| What | Default path | Override |
|---|---|---|
| Folder | ~/.prometheus/ (Windows: %USERPROFILE%\.prometheus\) | — |
| Code index | ~/.prometheus/<hash>.db — <hash> = first 16 hex of sha256(absolute workspace path), so each project gets its own file | PROMETHEUS_DB_PATH |
| Memory database | ~/.prometheus/memory.db — one file for all projects, partitioned internally by project/scope | PROMETHEUS_MEMORY_DB_PATH |
| Project memories (mirror) | <repo>/.prometheus/memories/*.md — project-scoped facts also written as git-versioned, human-editable markdown inside the repo (the SQLite row stays the source of truth for recall) | — |
The code index never leaves your machine and is safe to delete — it rebuilds on
the next run. The server prints the resolved root and db path to stderr at
startup (… workspace=… db=…). Quick peek:
sqlite3 ~/.prometheus/memory.db '.tables'
ls -la ~/.prometheus/