prism-mcp-server

data-ai MCP Server

Persistent session memory for AI coding agents — local-first, with on-device inference, associative recall, and drift detection. Works with Claude Code, Cursor, and Codex.

VerifiedFreshInstall Ready
data-aidata-ai
4 views157 stars27 forksv20.21.14Apache-2.0

Why This Matters

Discovered via smithery and last synced Today.

VerifiedFreshInstall Ready
Source
smithery
Stars
157
Last synced
Today
Install
Instructions detected

Install

1. Install the package

npx prism-mcp-server

2. Add to claude_desktop_config.json

{
  "mcpServers": {
    "prism-mcp-server": {
      "command": "npx",
      "args": [
        "prism-mcp-server"
      ]
    }
  }
}

Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows)

187
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (187)

Platform

Package

File

Contents

knowledge_forget

Prune outdated or incorrect memories (4 modes + dry_run)

session_save_experience

Record corrections, successes, failures, learnings

brave_local_search

Location-based POI discovery

agent_register

Announce yourself to the team

Resource

Link

edge_case

8

session_cognitive_route

HDC compositional state resolution with policy-gated routing

OPENAI_API_KEY

No

PRISM_SCHEDULER_ENABLED

No

OpenAI

53.96%

gemini_research_paper_analysis

Academic paper analysis via Gemini

brave_web_search

Real-time internet search

PRISM_STORAGE

`local` / `synalux` / `supabase` / `auto`

Layer

What

Community

Email

IQR

0.009

Exact

+Regex, Symbol

knowledge_search

Semantic + keyword search over all memories

session_compact_ledger

Auto-compact old entries via Gemini summarization

knowledge_sync_rules

Sync graduated insights to `.cursorrules` / `.clauderules`

session_plan_get_active

Retrieve active plan state and current verification gating position

VOYAGE_API_KEY

No

PRISM_DASHBOARD_PORT

No

PRISM_TASK_ROUTER_MAX_CLAW_COMPLEXITY

No

PRISM_JWKS_URI

No

natural_phrasing

15

GitLab

Bitbucket

xAI

50.7%

Basic

Basic

TAVILY_API_KEY

No

Anthropic

~58%

5

50

session_load_context

Explicit project reload or older-server startup fallback

knowledge_set_retention

Set per-project TTL retention policy

knowledge_upvote

Increase entry importance (+1)

knowledge_downvote

Decrease entry importance (-1)

brave_local_search_code_mode

JS extraction over local search results

brave_web_search_code_mode

JS extraction over web search results

agent_heartbeat

Pulse every ~5 min to stay visible

session_plan_decompose

Decompose natural language goals into an execution plan that references verification requirements

GOOGLE_API_KEY

No

PRISM_INSTANCE

No

PRISM_CAPTURE_PORTS

No

PRISM_TASK_ROUTER_ENABLED

No

PRISM_ACTR_ACCESS_LOG_RETENTION_DAYS

No

Free

~0.8s

Consumer

What it uses from Prism

Model

Routing accuracy

pending

≥90%

QwQ-32B

2,000 req

Mean

0.1855

Category

Tests

SWE-bench

Cost

deep_storage_purge

Reclaim ~90% vector storage (v5.1)

Component

What It Prevents

valence

`) significantly boosts the memory's ranking score. Extreme failures and extreme successes surface to the top. * **UX Warnings:** If an agent retrieves memories that are historically negative, Prism intercepts the prompt injection: `⚠️ Caution: This topic is strongly correlated with historical failures. Review past decisions before proceeding.` Your AI now has a "gut feeling" about bad code. ### The Paradigm Shift

disambiguation

8

Metric

Local 27B

Property

What it means

multi_intent

4

DeepSeek

56.73%

Single

Single

Statistic

Value

session_export_memory

Full export (JSON, Markdown, or Obsidian vault `.zip` with `[[Wikilinks]]`)

code_mode_transform

Universal post-processing with 8 built-in templates

agent_list_team

See all active teammates

PRISM_ENABLE_HIVEMIND

No

memory_checkout

Revert to any previous version (non-destructive)

brave_answers

AI-grounded answers from Brave

session_task_route

Scores task complexity and recommends host vs. local Claw delegation (`claw_run_task` when delegable; host fallback when executor/tooling is unavailable)

PRISM_DEBUG_LOGGING

No

PRISM_ACTR_WEIGHT_ACTIVATION

No

Release

Headline

adversarial_trap

15

PRISM_AUTO_CAPTURE

No

PRISM_SCHOLAR_TOPICS

No

PRISM_ACTR_DECAY

No

session_forget_memory

GDPR-compliant deletion (soft/hard + Art. 17 reason)

PRISM_USER_ID

No

PRISM_SCHOLAR_INTERVAL_MS

No

PRISM_ACTR_ENABLED

No

PRISM_JWT_ISSUER

No

session_abort_pipeline

Emergency kill switch to halt a running background pipeline

SUPABASE_KEY

If cloud

PRISM_SCHOLAR_ENABLED

No

PRISM_HDC_EXPLAINABILITY_ENABLED

No

PRISM_JWT_AUDIENCE

No

Variable

Required

PRISM_TASK_ROUTER_CONFIDENCE_THRESHOLD

No

Google

72.51%

Enterprise

~2–3s

session_health_check

Brain integrity scan + auto-repair (`fsck`)

memory_history

Browse all historical versions of a project's handoff state

session_plan_step_update

Atomically update step status/result with verification context

PRISM_SCHOLAR_MAX_ARTICLES_PER_RUN

No

PRISM_ACTR_WEIGHT_SIMILARITY

No

Phase

Feature

latest

—

Feature

Details

session_start_pipeline

Create and enqueue a background autonomous pipeline

BRAVE_API_KEY

No

BRAVE_ANSWERS_API_KEY

No

PRISM_DARK_FACTORY_ENABLED

No

tool_call

> format · disambiguation │ │ rules for similar tool pairs │ ├──────────────────────────────────────────────────────────────┤ │ Layer 2: SFT TRAINING (244 examples, 4 rounds × 500 iters) │ │ 142 tool examples + 102 reasoning/abstention examples │ │ 21 keyword-aware Chain-of-Thought templates │ ├──────────────────────────────────────────────────────────────┤ │ Layer 3: INFERENCE-TIME VALIDATION │ │ Post-inference regex filter rejects false positive tool │ │ calls when prompt matches general programming patterns │ │ (context manager, LSTM, Express.js) without Prism intent │ └──────────────────────────────────────────────────────────────┘ ``` <details> <summary><strong>Source: Layer 3 Inference-Time Validator</strong></summary> ```python # General programming patterns — NOT Prism tools GENERAL_PROGRAMMING_PATTERNS = [ r'\bcontext\s+manager\b', r'\bcontextlib\b', r'\b__enter__\b', r'\bforget\s+gate\b', r'\blstm\b', r'\bcatastrophic\s+forgetting\b', r'\bexpress\.js\b', r'\bdjango\b', r'\bflask\b', r'\bgarbage\s+collection\b', r'\bload\s+balanc', ] # Prism-specific intent (overrides rejection) PRISM_INTENT_PATTERNS = [ r'\bprism\b', r'\bsession\s*ledger\b', r'\bhandoff\b', r'\bknowledge\s+base\b', r'\bproject\b', r'\bledger\b', r'\bsave.*(?:session

session_search_memory

Vector similarity search across all sessions

session_check_pipeline_status

Poll the current step, iteration, and status of a pipeline

FIRECRAWL_API_KEY

No

SUPABASE_URL

If cloud

PRISM_SCHEDULER_INTERVAL_MS

No

PRISM_HDC_ENABLED

No

Cloud

100%

extract_entities

Pull people / projects / decisions from text

Compact

Know srch

2

OS Web Speech API

Plan

Cloud model

Yes

**No**

session_save_ledger

Append an immutable session log entry

Source

What it measures

Email

Resend

HIPAA

Requires BAA

session_save_handoff

Save live state for the next session

DuckDuckGo

**TTS (Text-to-Speech)**

Video

LiveKit

Tier

Latency

0

> **Methodology**: 102-case pool across 12 categories. Scores are 3-seed mean (seeds 2027/2028/2029, zero variance across all seeds). All fine-tuned models use the Qwen3 nothink template with keyword-trigger routing prompts and `-> respond directly (no tool)` for the no-tool class. Full runner: [`tests/benchmarks/prism-routing-100/benchmark.py`](tests/benchmarks/prism-routing-100/benchmark.py) · Cascade runner: [`tests/benchmarks/cascade-14b-32b-opus/cascade_eval.py`](tests/benchmarks/cascade-14b-32b-opus/cascade_eval.py). > > **These are NOT general-purpose LLM benchmarks.** This eval measures routing precision on 6 specific MCP tools. The prism-coder models are specialists trained on this exact task — they match or exceed Claude on routing while Claude dominates on general reasoning, coding, and open-domain QA. The value is **offline reliability at zero cost**, not replacing cloud AI. **iOS deployment:** On-device inference via **llama.cpp Swift SPM**. Auto-selects by device RAM: 14B on iPad Pro 16GB (100% routing), 8B on iPhone/iPad 8GB (100%, OOM fallback to 1.7B at 100%). CoreML not viable — coremltools doesn't support Qwen3 attention ops. Integration: `LLMEngine.swift` → `prismNativeBridge.askAI()` → token stream. WiFi fallback: Mac Ollama (`OLLAMA_HOST=0.0.0.0`). ### Benchmarks — run them yourself All benchmarks are open-source. Reproduce every number in this README: ```bash git clone https://github.com/dcostenco/prism-coder cd prism-coder pip install anthropic requests # Per-model solo eval (102 cases, 3 seeds) python3 tests/benchmarks/prism-routing-100/benchmark.py --models 14b 8b 32b 1b7 opus # Cascade eval — 14B → 32B → Opus (Claude Opus as etalon) export ANTHROPIC_API_KEY=sk-ant-... ollama pull dcostenco/prism-coder:14b dcostenco/prism-coder:32b python3 tests/benchmarks/cascade-14b-32b-opus/cascade_eval.py ``` **Not a general function-calling benchmark.** This measures routing precision on 6 specific MCP tools. We don't claim to beat Claude on general capabilities. We match or exceed Claude on the ONE task that matters for offline AAC: correct tool routing, every time, under 2 seconds, with zero cloud.

Edge

Avg lat

Service

Provider

Translate

No-tool

Surface

Primary

3

WASM espeak-ng

unlimited

+ HIPAA BAA + custom fine-tuning

Engine

Offline

SMS

Twilio

Latency

What happened

query_memory_natural

Memory-first Q&A with a grounded live-source fallback on paid tiers

Save

Srch mem

1

Inworld TTS-2 (cloud)

Translation

Offline dictionary (1,261 × 20 langs)

Firecrawl

—

Payments

Stripe

Tool

What it does

session_synthesize_edges

Auto-link related memories into a graph

limited

unlimited

Mode

Think

Passed

21s

Inference

Local Ollama models

Role

Automatic routing tier

Verifier

Free

Task

used_cloud

Cost

$0

loop_detected

55s

Custom

--- ## Plans All on-device models are free to run locally via Ollama on every tier. A subscription gates **cloud** features, higher model ceilings, and increased limits. Local model ceilings are advisory — on-device models run on your Ollama regardless of plan; the ceiling gates cloud inference and `prism_infer` routing.

200

2,000

session_detect_drift

Detect when a session has drifted from its goal

Hook

What it checks

Product

License

verify_behavior

Pre-edit scenario challenge — catch bad changes before they happen

pre-commit

Dead code, orphan services, scaffold code, missing auth

prism_infer

Local-first inference (route/chat/code modes, thinking, cloud escalation)

Purpose

Default

inference_metrics

Session delegation or persisted MCP + VS Code panel local/cloud stats

route

Off (fast) — except a tier that reasons better, e.g. 9B

LOCAL_LLM_URL

Ollama endpoint

chat

Per tier: on for 9B, off for 4B/2B

PRISM_FORCE_LOCAL

Force local SQLite regardless of credentials

code

Per tier: on for 9B, off for 4B/2B

TELEMETRY_WRITE_TOKEN

Portal analytics token (optional — metrics display works without it)

PRISM_SYNALUX_API_KEY

Paid-tier portal key (`synalux_sk_...`)

Host

Managed containment

local

synalux

Skills

All skills available locally (run `sync-skills.sh` to populate)

Seats

1

Codex

`features.multi_agent=false`; a 2-thread, depth-1 Terra/low fallback profile is retained for explicit re-enable

Cursor

Amazon Q Developer

None

Network latency

Nothing

Memory text, file paths, search queries, and inference prompts/drafts when their cloud feature is used, sent to the portal over TLS. Cloud memory writes are PHI-redacted; inference and route requests are transient.

Vision

Routing accuracy¹

Capability

Prism Coder

Mem0

Zep

512

1,024

session_bootstrap

Hook-free first-turn greeting and dashboard-configured context

knowledge_ingest

Teach Prism a codebase or document

local_savings

Token volume local serving kept off your cloud model, all time / 30 days / session

month

week

off

Default mode is `advisory` (warn but allow). Set `*_MODE=block` for hard enforcement. Hooks look for full audit scripts in the repo first (`hooks/lib/`), then `~/.claude/hooks/` fallback, then minimal inline checks. --- ## Self-hosting (Enterprise) Run the full model stack on your own hardware — no cloud, full data sovereignty. **Requirements:** Mac M2 Pro+ (48 GB recommended) or Linux + NVIDIA GPU, plus [Ollama](https://ollama.com). ```bash ollama pull dcostenco/prism-coder:9b # default router export LOCAL_LLM_URL=http://localhost:11434 ``` Self-hosted routing stays local: `9b → 4b` on desktop/server and `2b` on mobile/iPhone, with 27B available when installed and RAM-safe. Synalux-hosted paid tiers can use Gemini 3.6 Flash as the cloud fallback. For iOS or another machine on the same network, run `OLLAMA_HOST=0.0.0.0 ollama serve` and point `LOCAL_LLM_URL` at the host's IP. --- ## Configuration reference