# Prism Coder MCP server

> Gives AI coding agents persistent session memory, local on-device inference, and an auditable token savings report.

- Repository: https://github.com/dcostenco/prism-coder
- Page: https://hostedmcp.org/servers/dcostenco/prism-coder
- Transport: stdio
- Stars: 156
- License: Apache-2.0
- Latest version: 20.22.4

## Install

### Claude Code

```sh
claude mcp add --env 'BRAVE_API_KEY=<YOUR_BRAVE_API_KEY>' --env 'GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>' --env 'SUPABASE_KEY=<YOUR_SUPABASE_KEY>' prism-coder -- npx -y prism-mcp-server
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "prism-coder": {
      "command": "npx",
      "args": [
        "-y",
        "prism-mcp-server"
      ],
      "env": {
        "BRAVE_API_KEY": "<YOUR_BRAVE_API_KEY>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
        "SUPABASE_KEY": "<YOUR_SUPABASE_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "prism-coder": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "prism-mcp-server"
      ],
      "env": {
        "BRAVE_API_KEY": "<YOUR_BRAVE_API_KEY>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
        "SUPABASE_KEY": "<YOUR_SUPABASE_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"prism-coder","type":"stdio","command":"npx","args":["-y","prism-mcp-server"],"env":{"BRAVE_API_KEY":"<YOUR_BRAVE_API_KEY>","GEMINI_API_KEY":"<YOUR_GEMINI_API_KEY>","SUPABASE_KEY":"<YOUR_SUPABASE_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "prism-coder": {
      "command": "npx",
      "args": [
        "-y",
        "prism-mcp-server"
      ],
      "env": {
        "BRAVE_API_KEY": "<YOUR_BRAVE_API_KEY>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
        "SUPABASE_KEY": "<YOUR_SUPABASE_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add prism-coder --env 'BRAVE_API_KEY=<YOUR_BRAVE_API_KEY>' --env 'GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>' --env 'SUPABASE_KEY=<YOUR_SUPABASE_KEY>' -- npx -y prism-mcp-server
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.prism-coder]
command = "npx"
args = ["-y", "prism-mcp-server"]

[mcp_servers.prism-coder.env]
BRAVE_API_KEY = "<YOUR_BRAVE_API_KEY>"
GEMINI_API_KEY = "<YOUR_GEMINI_API_KEY>"
SUPABASE_KEY = "<YOUR_SUPABASE_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'BRAVE_API_KEY=<YOUR_BRAVE_API_KEY>' -e 'GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>' -e 'SUPABASE_KEY=<YOUR_SUPABASE_KEY>' prism-coder npx -- -y prism-mcp-server
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "prism-coder": {
      "command": "npx",
      "args": [
        "-y",
        "prism-mcp-server"
      ],
      "env": {
        "BRAVE_API_KEY": "<YOUR_BRAVE_API_KEY>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>",
        "SUPABASE_KEY": "<YOUR_SUPABASE_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `BRAVE_API_KEY` | no | yes | Brave Search API key for web search tools |
| `GEMINI_API_KEY` | no | yes | Google Gemini API key for AI-powered summarization and embeddings |
| `SUPABASE_KEY` | no | yes | Supabase service role key for database access |
| `GCP_PROJECT_ID` | no | no | Google Cloud project ID for Vertex AI Discovery Engine integration |
| `LOCAL_LLM_URL` | no | no |  |
| `PRISM_SYNALUX_API_KEY` | no | no |  |
| `PRISM_USER_ID` | no | no | User ID for multi-tenant row-level security isolation (defaults to 'default') |
| `SUPABASE_URL` | no | no | Supabase project URL for session memory and knowledge persistence |
| `VERTEX_DATA_STORE_ID` | no | no | Vertex AI Discovery Engine data store ID for enterprise search |
| `VERTEX_LOCATION` | no | no | Vertex AI location/region (defaults to 'global') |

## Tools (53)

- `brave_web_search`: Performs a web search using the Brave Search API, ideal for general queries, news, articles, and online content. Use this for broad information gathering, recent events, or when you need diverse web sources. Supports pagination, content filtering, and freshness controls. Maximum 20 results per request, with offset for pagination.
- `brave_web_search_code_mode`: Performs a web search using the Brave Search API, and then runs a custom JavaScript code string against the RAW API RESPONSE in a secure QuickJS sandbox. This drastically reduces context window usage by only returning the output of your script. Use this for broad information gathering, recent events, or when you need diverse web sources and only need specific parts of the result. Your script should read the 'DATA' global variable (a JSON string of the API response), process it, and use console.log() to print the desired output.
- `brave_local_search`: Searches for local businesses and places using Brave's Local Search API. Best for queries related to physical locations, businesses, restaurants, services, etc. Returns detailed information including: - Business names and addresses - Ratings and review counts - Phone numbers and opening hours Use this when the query implies 'near me' or mentions specific locations. Automatically falls back to web search if no local results are found.
- `brave_local_search_code_mode`: Performs a local search using Brave APIs, and then runs a custom JavaScript code string against the RAW API RESPONSE in a secure QuickJS sandbox. This reduces context window usage by only returning the output of your script. Use this for local/business lookups when you only need specific fields from large local payloads. Your script should read the 'DATA' global variable (a JSON string payload) and use console.log() to print the desired output.
- `code_mode_transform`: A universal code-mode transformer. Takes RAW TEXT or JSON output from ANY MCP tool (GitHub, Firecrawl, chrome-devtools, camoufox, codegraphcontext, videoMcp, arxiv, etc.) and runs a custom JavaScript code string against it in a secure QuickJS sandbox. Use this as a second step after calling any tool that returns large payloads — pass the raw output as 'data' and a JS extraction script as 'code'. Your script reads the 'DATA' global variable (a string of the tool output) and uses console.log() to print only the fields you need. NEW in v2.1: Pass 'template' instead of 'code' for instant extraction. Available templates: github_issues, github_prs, jira_tickets, dom_links, dom_headings, api_endpoints, slack_messages, csv_summary. Example: { data: '<raw JSON>', template: 'github_issues' } — no custom code needed.
- `brave_answers`: Returns direct AI answers grounded in Brave Search using Brave AI Grounding. Uses an OpenAI-compatible chat completions endpoint and is best for concise answer generation with live web grounding.
- `gemini_research_paper_analysis`: Performs in-depth analysis of research papers using Google's Gemini-2.0-flash model. Ideal for academic research, literature reviews, and deep understanding of scientific papers. Can extract key findings, provide critical evaluation, summarize complex research, and place papers within the broader research landscape. Best for long-form academic content that requires expert analysis.
- `prism_infer`: Run local inference using the saved coding backend preference. Explicit local_backend overrides it. oMLX uses authenticated loopback oMLX for text-only code/reviewer drafts, without Ollama/cloud substitution or final sign-off. Owns model selection across 27B / 9B / 4B / 2B using an explicit `model_ceiling` or the caller's `task_complexity`, then validates loaded memory size, model context, entitlements, installed models, and free RAM at call time. Falls through to the Synalux portal Gemini 3.6 Flash cloud fallback only when local is unviable or refused and the plan allows cloud; `cloud_fallback: false` forbids it. When `project` is provided, loads the dashboard-configured quick/standard/deep handoff and bounded history as untrusted historical context for a memory-aware local worker. Use this for code generation, summarisation, classification, or any synth task you would otherwise hand to the cloud model — it costs $0 when the local hit succeeds. For a FOLLOW-UP to an earlier prism_infer answer, pass the accepted prior turns as `messages` (paid plans): without them the worker answers the follow-up from nothing and fabricates. Every entitlement-resolved result reports `multi_turn` (your plan's caps) and `history_turns` (what was sent); the crisis intercept reports only `history_turns`. A behaviour-plan request also reports `clinical_sections` — how many required sections were found and which were not. That is a structural census, never a clinical endorsement: a section can be present and still be wrong, and a credentialed BCBA decides whether a plan is adequate. History over the plan's caps is refused (history_over_plan_cap), never trimmed; a free plan or a host with no portal is refused (multi_turn_not_in_plan). Hosts that compact large schemas may drop parameter text, so the contract lives here. (read-only)
- `session_bootstrap`: IMPORTANT: On the first user turn of every conversation, including a greeting, call this tool exactly once before any user-facing response, passing the user's verbatim first message as {prompt: "<first user message>"}. The prompt is matched against prompt_keywords ON-DEVICE to load symptom-triggered skills on turn one; it is used for routing only and never leaves the machine. Pass {} only when there is no user message. Do not substitute session_load_context for this startup call. This starts a Prism-backed conversation without host hooks. Prism reads the dashboard's Auto-Load Projects, Context Depth (quick/standard/deep), developer name, and default role, then returns the greeting and correctly scoped prior-session context. Emit no preamble. Print the complete tool result verbatim as the entire first-turn startup display, before any optional answer. Do not summarize, paraphrase, rename headings, reformat, or omit any returned section. Preserve its order and line content. For a greeting-only prompt, stop after the verbatim startup display. Do not guess or pass a project or depth. Prism returns a stable conversation_id on the trailing <prism_session /> line; reuse it for session_save_ledger, session_save_handoff, and session_detect_drift throughout this conversation without adding it to the visible greeting. This is the first-turn startup call only: if a later save is refused with context_not_loaded, recover with session_load_context for that save's project and conversation_id, then retry the save once, rather than repeating this startup display. (read-only)
- `session_route_prompt`: Call this at the START of any turn where the user states a NEW task, changes the kind of work, or reports a defect — passing their verbatim message as {prompt: "..."} and the skills you already have as {loaded: [...]}. session_bootstrap routes only the first turn of a conversation; this routes every turn after it, so a long session still picks up the skills its current work requires. The prompt is matched ON-DEVICE against the same table and the same account-scoped frontmatter triggers; it never leaves the machine. Calling it is cheap: when nothing new matches it returns a single line, and anything named in `loaded` is never returned again. When it does return skills, read and follow them before doing the work — they are the rules for the task at hand, not background. It also checks bounded implementation requests for Factory. Supply the current project, working_directory, files_involved and test_command when known. When prism_factory_route recommends session_start_pipeline, call it automatically with recommended_args, then report the pipeline id and monitor it. Routing itself does not execute code. Skip it only for follow-ups within work you have already routed. (read-only)
- `skill_save`: Save a skill at one of three scopes: local (this machine only, works signed out), user (your account — follows you to every machine), or team (a workspace — delivered to its members; owner/admin only, optionally targeted with assign_to). Default when signed in is USER; team is never a default. Content must be a SKILL.md body with frontmatter (name, description). To make the skill load automatically when a prompt matches, add prompt_triggers to the frontmatter — a list of up to 5 case-insensitive regexes. They stay as private as the skill itself (matching happens on-device; scoped skills cannot use the public routing table): prompt_triggers: - "\\binvoice\\b.{0,20}\\bsubmit\\b"
- `skill_manage`: Manage scoped skills and platform-skill activation. Actions: list (your skills, team skills, releases); delete (remove a user/team/local skill — the final content is archived locally first); release (deactivate a PLATFORM skill you never use, freeing host catalog budget — per user, or per team by admins); restore (re-activate a released platform skill; lossless).
- `session_save_ledger`: Save an immutable session log entry to the session ledger. Use this at the END of each work session to record what was accomplished. The ledger is append-only — entries cannot be updated or deleted. This creates a permanent audit trail of all agent work sessions. The save is refused with context_not_loaded until session_bootstrap or session_load_context has loaded this exact project for this conversation_id; on that refusal call session_load_context with the same project and conversation_id, then retry the save once.
- `session_save_handoff`: Upsert the latest project handoff state for the next session to consume on boot. This is the 'live context' that gets loaded when a new session starts. Calling this replaces the previous handoff for the same project (upsert on project). **v5.4 CRDT Merge**: On version conflict, a CRDT OR-Map engine automatically merges your changes with concurrent work (Add-Wins OR-Set for arrays, Last-Writer-Wins for scalars). Pass expected_version to enable concurrency control. **v0.4.0 OCC**: If you received a version number from session_load_context, /resume_session prompt, or memory resource attachment, you MUST pass it as expected_version to prevent overwriting another session's changes. Pass the same conversation_id as session_save_ledger: the save is refused with context_not_loaded until session_bootstrap or session_load_context has loaded this exact project for it; on that refusal call session_load_context with the same project and conversation_id, then retry the save once, passing the version it shows as expected_version.
- `session_load_context`: Load session context for a project using progressive context loading. Use this to recover when session_save_ledger or session_save_handoff is refused with context_not_loaded (pass that save's project and the same conversation_id, then retry the save once; a recovery load is not a second startup), for an explicit project reload, or as a startup fallback only when session_bootstrap is unavailable. When session_bootstrap is available, do not substitute this tool for the first-turn bootstrap. Three levels available: - **quick**: Just the latest project state — keywords and open TODOs (~50 tokens) - **standard**: Project state plus recent session summaries and decisions (~200 tokens, recommended) - **deep**: Everything — full session history with all files changed, TODOs, and decisions (~1000+ tokens)
- `knowledge_search`: Search accumulated knowledge across all sessions by keywords, category, or free text. The knowledge base grows automatically as sessions are saved — keywords are extracted from every ledger and handoff entry. Use this to find related past work, decisions, and context from previous sessions. Categories available: debugging, architecture, deployment, testing, configuration, api-integration, data-migration, security, performance, documentation, ai-ml, ui-frontend, resume
- `knowledge_forget`: Selectively forget (delete) accumulated knowledge entries. Like a brain pruning bad memories — remove outdated, incorrect, or irrelevant session entries to keep the knowledge base clean and relevant. Forget modes: - **By project**: Clear all knowledge for a specific project - **By category**: Remove entries matching a category (e.g. 'debugging') - **By age**: Forget entries older than N days - **Full reset**: Wipe everything (requires confirm_all=true) ⚠️ This permanently deletes ledger entries. Handoff state is preserved unless explicitly cleared.
- `session_compact_ledger`: Auto-compact old session ledger entries by rolling them up into AI-generated summaries. This prevents the ledger from growing indefinitely and keeps deep context loading fast. How it works: 1. Finds projects with more entries than the threshold 2. Summarizes old entries using Gemini (keeps recent entries intact) 3. Inserts a rollup entry and archives the originals (soft-delete) Use dry_run=true to preview what would be compacted without executing.
- `session_search_memory`: Search session history semantically (by meaning, not just keywords). Uses vector embeddings to find sessions with similar context, even when the exact wording differs. Requires pgvector extension in Supabase. Complements knowledge_search (keyword-based) — use this when keyword search returns no results or when the query is phrased differently from stored summaries.
- `memory_history`: View the timeline of past memory states for this project. Use this BEFORE memory_checkout to find the correct version to revert to. Shows version numbers, timestamps, and summaries of each saved state.
- `memory_checkout`: Time travel! Restores the project's memory to a specific past version. This overwrites the current handoff state with the historical snapshot, like a Git revert — the version number moves forward (no data is lost). Call memory_history first to find the correct target_version.
- `session_save_image`: Save a local image file into the project's permanent visual memory. Use this to remember UI states, diagrams, architecture graphs, or bug screenshots. The image is copied into Prism's media vault and indexed in the handoff metadata. On the next session_load_context, the agent will see a lightweight index of available images.
- `session_view_image`: Retrieve an image from visual memory using its ID. Returns the image as Base64 inline content for the LLM to analyze. Use session_load_context first to see available image IDs.
- `session_health_check`: Run integrity checks on the agent's memory (like fsck for filesystems). Scans for missing embeddings, duplicate entries, orphaned handoffs, and stale rollups. Checks performed: 1. **Missing embeddings** — entries that can't be found via semantic search 2. **Duplicate entries** — near-identical summaries wasting context tokens 3. **Orphaned handoffs** — handoff state with no backing ledger entries 4. **Stale rollups** — compaction artifacts with no archived originals Use auto_fix=true to automatically repair missing embeddings and clean up orphans.
- `session_backfill_embeddings`: Repair ledger entries that are missing vector embeddings. This can happen if the Gemini API was temporarily unavailable when the entry was saved. How it works: 1. Scans for active ledger entries where embedding IS NULL 2. Generates embeddings via Gemini text-embedding-004 3. Patches each row with the generated embedding Run this periodically or after known API outages to ensure full semantic search coverage.
- `session_forget_memory`: Forget (delete) a specific memory entry by its ID. Supports two modes: - **Soft delete** (default): Tombstones the entry — it stays in the database for audit trails but is excluded from all search results. Reversible. - **Hard delete**: Permanently removes the entry from the database. Irreversible. Use only when GDPR Article 17 requires complete erasure. ⚠️ Soft delete is recommended for most use cases. The entry can be restored in the future if needed.
- `knowledge_set_retention`: Set an automatic data retention policy (TTL) for a project's memory. Entries older than ttl_days will be soft-deleted (archived) automatically on every server startup and every 12 hours while running. **Use cases:** - Set `ttl_days: 90` to auto-expire sessions older than 3 months - Set `ttl_days: 0` to disable auto-expiry (default) **Note:** Rollup/compaction entries are never expired — only raw sessions.
- `session_save_experience`: Record a typed experience event. Unlike session_save_ledger (flat logs), this captures structured behavioral data for pattern detection. Event Types: - **correction**: Agent was corrected by user - **success**: Task completed successfully - **failure**: Task failed - **learning**: New knowledge acquired - **validation_result**: Verification sandbox passed or failed
- `knowledge_upvote`: Upvote a memory entry to increase its importance (graduation). Entries with importance >= 7 become 'graduated' insights that always surface in behavioral warnings.
- `knowledge_downvote`: Downvote a memory entry to decrease its importance. Importance cannot go below 0.
- `knowledge_sync_rules`: Auto-sync graduated insights (importance >= 7) into your project's IDE rules file (.cursorrules or .clauderules). This bridges behavioral memory with static IDE context — turning dynamic agent learnings into always-on rules. **How it works:** 1. Fetches graduated insights from the ledger 2. Formats them as markdown rules inside sentinel markers 3. Idempotently writes them into the target file at the project's configured repo_path **Requirements:** The project must have a repo_path configured in the dashboard. **Idempotency:** Uses `<!-- PRISM:AUTO-RULES:START -->` / `<!-- PRISM:AUTO-RULES:END -->` sentinel markers. Running this tool multiple times produces the same file. User-maintained content outside the sentinels is never touched.
- `deep_storage_purge`: v5.1 Deep Storage Mode: Purge high-precision float32 embedding vectors for entries that already have TurboQuant compressed blobs, reclaiming ~90% of vector storage. Only affects entries older than the specified threshold (default: 30 days, minimum: 7). Entries without compressed blobs are NEVER touched. Use dry_run=true to preview the impact before executing. **When to use:** After running TurboQuant backfill (session_backfill_embeddings), call this tool to reclaim disk space from legacy float32 vectors that are no longer needed for search. **Safety:** Tier-2 search (TurboQuant) maintains 95%+ accuracy with compressed blobs. Tier-3 (FTS5 keyword) search is completely unaffected.
- `session_export_memory`: Export all of a project's memory to a local file. Fulfills GDPR Article 20 (Right to Data Portability) and the 'local-first' portability promise. **What is exported:** - All session ledger entries (summaries, decisions, TODOs, file changes) - Current handoff state (live project context) - System settings (API keys are "**REDACTED**" for security) - Visual memory index (descriptions, captions, timestamps; not the raw files) **Formats:** - `json` — machine-readable, suitable for import into another Prism instance - `markdown` — human-readable, ideal for static archiving - `vault` — Prism-Port: exports a compressed `.zip` of interrelated Markdown files with proper Obsidian/Logseq YAML frontmatter and `[[Wikilinks]]` ⚠️ Output directory must exist and be writable. Filenames are auto-generated: `prism-export-<project>-<date>.(json|md|zip)`
- `session_backfill_links`: Retroactively create graph edges (memory links) for all existing entries in a project. This builds the associative memory graph from your existing session history. Three strategies are run: 1. **Temporal Chaining**: Links consecutive entries within the same conversation 2. **Keyword Overlap**: Links entries sharing ≥3 keywords (bidirectional) 3. **Provenance**: Links rollup summaries to their archived originals All strategies use INSERT OR IGNORE — safe to re-run multiple times. **When to use:** Run once after upgrading to v6.0 to populate the graph for existing memories. New entries are auto-linked on save (no manual action needed).
- `session_synthesize_edges`: Step 3A Edge Synthesis: Scans recent project entries with embeddings, finds high-similarity but currently disconnected entries, and creates inferred links as 'synthesized_from'. **On-Demand Graph Enrichment**: Use this tool periodically to discover semantic relationships between structurally disconnected memory nodes. It batch processes the newest active entries.
- `session_cognitive_route`: Resolve an HDC compositional state into a nearest semantic concept with policy-gated routing. Returns concept, confidence, distance, ambiguity, convergence steps, and route outcome. Use this for explainable cognitive recall decisions in v6.5.
- `session_detect_drift`: Detect whether the current agent session has semantically drifted from its original goal. Scores recent ledger entries against the goal using synalux's HRR embedding stack (GloVe → Gemini/Voyage → cosine similarity), then runs the rolling-window drift detector algorithm. **Triggers:** - `goal-drift` — cumulative alignment loss is high and monotonic (not random tangents) - `context-collapse` — average output quality has dropped below floor **Pre-warning:** - `quality-degrading` — quality slope steeply negative before collapse **Returns:** drifted, reason, warning, drift_score (0..1), goal_alignment, quality_avg, sample_count, adaptive_threshold, recommendation. Use alongside GATE 5 (60-minute drift check): call this tool instead of session_cognitive_route for goal-alignment drift detection.
- `verify_behavior`: Call BEFORE editing behavioral source files (API routes, ordering logic, billing, auth, migrations). Returns a domain-specific scenario you must answer to demonstrate understanding of the end-user impact. Example: editing a KDS route returns 'A cook has a 3-item ticket. One item is voided. What should the cook see?' Answer the scenario concretely before proceeding with the edit. If the MCP transport is unavailable, use the packaged `prism verify-behavior` CLI fallback; never fabricate a replacement scenario.
- `maintenance_vacuum`: Reclaim disk space after large purge operations by running VACUUM on the local SQLite database. Best called after `deep_storage_purge` removes many entries — SQLite reclaims page allocations only when explicitly vacuumed, so the file size stays the same until you call this tool. For remote (Supabase) backends, returns guidance on triggering maintenance via the dashboard. **Note:** On large databases this may take up to 60 seconds. The tool runs synchronously so you will know when it is safe to proceed.
- `onboarding_wizard`: Interactive setup wizard for new Prism users. Provides a step-by-step guided experience to get productive in under 3 minutes. **Actions:** - `start` (default when omitted) — Begin the wizard from step 1 - `next` — Advance past `step` (pass the step number you are on) - `status` — Check current wizard progress - `skip` — Skip to completion Each step returns instructions, code snippets, and progress percentage.
- `extract_entities`: Extract named entities from raw text using rule-based + optional LLM extraction. Automatically identifies technologies, file paths, decisions, TODOs, people, projects, and configuration values without explicit tagging. **Entity types:** PERSON, PROJECT, TECH, FILE, DECISION, TODO, CONFIG Use this to auto-enrich session context with structured metadata from raw conversation text.
- `api_analytics`: View API usage analytics per project or system-wide. Shows call counts, success rates, latency, token usage, top tools, and daily trends. **Scopes:** - `project` — Analytics for a specific project - `system` — System-wide aggregate analytics
- `backup_database`: Create, list, or restore SQLite database backups. **Actions:** - `create` — Create a new backup now - `list` — List available backups with sizes and ages - `restore` — Restore from a specific backup file - `configure` — Set backup schedule (hourly/daily/weekly) Backups are stored in ~/.prism/backups/ by default. Automatic retention pruning keeps only the configured maximum.
- `configure_notifications`: Configure real-time notifications for memory events via webhook, Slack, or email. **Actions:** - `status` — Show current notification configuration - `add_channel` — Add a notification channel (webhook/slack/email) - `remove_channel` — Remove a channel by URL - `test` — Send a test notification to all configured channels **Events:** health_degradation, compaction_complete, backup_complete, backup_failed, memory_threshold, new_graduated_insight, scheduler_error
- `query_memory_natural`: Query memories using natural language instead of structured tool syntax. Searches Prism memory first. When memory has no useful result, paid tiers automatically run one quick Synalux web search, preserve the raw sources, and synthesize a grounded answer through prism_infer. Reserved or uncertain content is cloud-or-refuse and never sent through the local web-grounded path. **Examples:** - "What did we decide about authentication?" - "What's still open on the billing project?" - "What files did we change last week?" - "Show me recent work on the API" Returns the parsed intent, search results, and optionally an LLM-synthesized answer.
- `knowledge_ingest`: Ingest source code or documentation into the knowledge graph. Feed your codebase to Prism so knowledge_search can retrieve it at inference time. Accepts raw source code, file paths, or a git repo URL. The content is chunked, Q&A pairs are generated, and stored in the knowledge graph. Use this when the user says 'learn this code', 'index my repo', or 'ingest this file'.
- `inference_metrics`: Returns local-model inference metrics — call count, local vs cloud split, token totals, per-model breakdown, and average latency. period: 'session' (default) reports this MCP process's prism_infer delegation only. period: 'all' imports the Synalux VS Code panel spool and reports persisted MCP + panel usage across restarts, including the panel local-serve rate. This does not include the host model's (Claude's) own token spend (use /cost for that).
- `local_savings`: Reports what prism's local serving displaced, in TOKENS: volume handled by a local model instead of the cloud, calls served locally vs routed, and a per-model breakdown. Reports tokens, never money — prism cannot know your host's current rates, which model a call would otherwise have used, or whether you are on a flat plan, so any dollar figure would be invented. period: 'all' (default, durable ledger), 'month'/'week' (trailing 30/7 days), or 'session' (this MCP process); 'days' sets a custom trailing window. Excludes refused calls and states its known undercounts inline.
- `sync_pull_handoff`: Pulls this account's synced handoff for a project from the E2E relay and opens it with THIS machine's device key. The relay stores ciphertext only; a handoff is readable here only if it was sealed to this device. Requires handoff sync enabled (prism handoff enable), a paid plan, and a signed-in account. Push happens automatically on session_save_handoff.
- `session_task_route`: Analyze a coding task and recommend whether it should be handled by the host cloud model or delegated to Prism's local memory-aware worker (Qwen3). The `claw` target value is retained for API compatibility. **How to use:** 1. Call this tool before delegating a bounded subtask 2. Read the `target` field in the response 3. If target is `claw`, call the returned `recommended_tool` (`prism_infer`) with `recommended_args` 4. If target is `host`, handle the task yourself Bounded high-complexity inference may still target `claw`; the forwarded 1-10 complexity selects 4B/9B/27B inside `prism_infer`. Architecture, security, host-tool workflows, and other reserved judgment remain on `host`. **v7.1.0/v7.2.0:** Uses deterministic keyword/scope heuristics. When a project is specified, routing is enhanced by analyzing past experience events (success/failure/correction) to adjust confidence scores based on historical outcomes.
- `session_start_pipeline`: Start an autonomous Dark Factory pipeline. The pipeline runs in the background and executes a PLAN → EXECUTE → VERIFY cycle up to `max_iterations` times. **Requires:** Dark Factory is enabled at startup (enabled by default; the dashboard setting applies when no explicit `PRISM_DARK_FACTORY_ENABLED=true|false` override is present). **How it works:** 1. Call this tool with an objective (what to accomplish) 2. The pipeline is queued and executes autonomously in the background 3. Use `session_check_pipeline_status` to poll for results **Safety:** - Pipelines are scoped to a `working_directory` — no filesystem escape - Strict iteration cap (default: 3) prevents infinite loops - Wall-clock timeout (default: 15min) prevents runaway execution - All operations are logged to the session ledger for audit
- `session_check_pipeline_status`: Check the status of a Dark Factory pipeline. Returns the current step, iteration count, and any error messages. **Statuses:** - `PENDING` — Queued, waiting for runner pickup - `RUNNING` — Currently executing a step - `COMPLETED` — Successfully finished all steps - `FAILED` — Encountered an error or exceeded limits - `ABORTED` — Manually cancelled
- `session_abort_pipeline`: Abort a running Dark Factory pipeline. The pipeline will be marked as ABORTED and the background runner will stop processing it on the next tick. **Note:** This is a 'kill switch' — the runner detects the status change via the storage status guard and gracefully stops execution.

## FAQ

### Does Prism Coder require an account or API key?

No. Prism runs locally without an account, API key, or cloud subscription; a paid Synalux subscription is optional for cloud sync and team features.

### Which AI clients does Prism Coder work with?

It configures Claude Code, Claude Desktop, Cursor, Gemini CLI, and Codex through the `prism connect` command.

### Does Prism Coder keep memory across sessions?

Yes, it provides session memory that survives restarts, letting you resume projects with handoff notes, recent work, and open TODOs.

### How do I see how many tokens local inference saved?

Run `prism savings` or call the `local_savings` tool to get the token volume served locally, with assumptions and undercounts printed inline.
