Episteme MCP (episteme-mcp)
Zero-infrastructure epistemic memory & living knowledge MCP server (100% CPU, Python stdlib + NumPy, Lazy SQLite WAL + FTS5, pure-stdlib MCP stdio server — no Docker, no ChromaDB, no Neo4j, no vector database required).
Unlike flat RAG or verbatim vector logs — which treat outdated specs, active rules, and scoped exceptions as equally valid chunks — Episteme MCP separates an immutable verbatim Cold Lab Notebook (ColdStore) from an epistemic Hot Map (MentalPalace) with explicit boundary conditions, evidence-gated belief revision (supersession/falsification without erasure), Dual-Layer Epistemic PPR, opt-in Hybrid FTS5 + Dense RRF, and offline Sleep-Time Compute (EvoSCM Phases 1–3).
Where it shines (honest positioning): Living knowledge bases where facts evolve over time, versions replace earlier defaults while scoped exceptions and evergreen rules remain valid (ADRs, engineering specs, product policies, Obsidian vaults, scientific literature, and long-horizon active-learning agents).
Verified Empirical Results
1. Living KB Benchmark — Zero-Touch Auto-Extraction (--extract-with-llm, 20 versioned docs, 24 Qs)
Running on google/gemini-3.8-flash (Vertex AI) with zero manual curation (7/7 deprecated docs automatically superseded, 0/13 false positives) against modern 2026 RAG baselines (nomic-embed-text):
| System | Fact Recall | Net Score | Total Traps | superseded_rule |
scoped_coexistence |
evergreen |
multi_hop |
|---|---|---|---|---|---|---|---|
B4_dense_rag_k5 (nomic-embed-text) |
0.927 |
0.844 |
8 |
0.708 |
0.875 |
1.000 |
0.792 |
B5_hybrid_rrf_k5 (BM25 + Dense RRF) |
0.919 |
0.867 |
5 |
0.875 |
0.833 |
1.000 |
0.758 |
B3_recency_rag_k5 |
0.912 |
0.902 |
1 |
1.000 |
0.833 |
0.917 |
0.858 |
B6_hybrid_rerank_k5 (Hybrid + LLM Reranker) |
0.952 |
0.910 |
4 |
0.917 |
0.875 |
1.000 |
0.850 |
P_balanced_10k (auto-extracted) |
0.933 |
0.933 |
0 |
1.000 |
0.833 |
1.000 |
0.900 |
P_full_cloud (auto-extracted) |
0.952 |
0.952 |
0 |
1.000 |
0.917 |
0.958 |
0.933 |
(On local qwen2.5:3b zero-touch auto-extraction, P_full_cloud = 0.899 (0 traps) and P_balanced_7b = 0.888 (0 traps) also beat every RAG baseline: BM25 = 0.838, Recency = 0.835, Dense = 0.817.)
2. Multi-Document Scientific Interference (Exp 1 — 12 real 2026 papers, 303 chunks + superseded 2022 prior)
- Asymmetric Architecture (
qwen2.5:3blocal indexer →google/gemini-3.8-flashfull_cloudQA):Mental Palace = 0.838vsFlat RAG = 0.792(+4.6 ppoverall;belief_revision:0.854vs0.604(+25.0 pp);factual:0.854vs0.792(+6.2 pp)).
- Local
qwen2.5:3b(compact_3b):0.617vs0.583(0/20vs8/20superseded-prior pollution;0.000degradation from 1 to 12 documents).
3. Active Scientific Discovery & Executable World Models (Exp 2 & Exp 3 — Blind --anonymize, Zero Leakage)
- Exp 2 (15 blind seeds across
qwen2.5:3b,qwen2.5:7b,olmo2:7b): Mental Palace + EvoSCM + Active Curiosity (A3) beat Flat-Log (A1) 15/15 (100%), averaging+31.1 ppon unseen compositional hold-out scenarios. - Exp 3 (WorldCoder + SCL Promotion Gate):
qwen2.5:3b(10 seeds): gate rejected10/10underfit programs (0%false promotions,0regressions vsA3_neural).google/gemini-3.8-flash(3 blind seeds):1.000 ± 0.000exact hold-out accuracy inA3_neuraland1.000 ± 0.000inA4_worldcoder_gated(100%promoted on attempt1/3), compiling discovered rules into a sandboxed Python simulator ($0/<1 msper counterfactual query).
4. External Benchmark: LongMemEval (knowledge-update, xiaowu0162/longmemeval-cleaned, N=15)
Evaluated on google/gemini-3.8-flash + nomic-embed-text (~40 real multi-turn chat sessions per question, zero oracle hints):
| System | Judge Accuracy | Latest Recall@5 | Stale Rate@5 | Avg Chars |
|---|---|---|---|---|
B2_dense_k5 (nomic-embed-text) |
0.733 (11/15) |
0.800 |
0.800 |
7755 |
B4_hybrid_rerank_k5 (Hybrid + LLM Reranker) |
0.800 (12/15) |
1.000 |
0.933 |
7800 |
B1_bm25_k5 |
0.867 (13/15) |
0.933 |
0.933 |
7852 |
B3_hybrid_rrf_k5 |
0.933 (14/15) |
0.933 |
0.800 |
7751 |
P_palace_hybrid_evoscm (opt-in Hybrid RRF + EvoSCM) |
0.933 (14/15) |
0.933 |
0.800 |
7777 |
(Honest note: on casual multi-topic chat logs, document-level EvoSCM stayed conservative with 0 false-positive supersessions while opt-in Hybrid RRF tied #1 at 0.933, outperforming BM25 +6.6 pp, Hybrid+Reranker +13.3 pp, and Dense +20.0 pp. Sub-session conversational fact updates are planned for v0.5.)
5. Scale, Low-RAM Lazy SQLite & Concurrency (v0.5.0)
- Lazy LRU
ColdStore(2,101chunks / 150 docs):2.15 msload (0chunk texts preloaded in RAM),2.47 msincremental+1 docwrite viaBEGIN IMMEDIATE+ incrementalUPSERT(multi-agent safe). - 7,500 chunks / 500 docs:
14.3 msFTS5 BM25 |28.7 msend-to-endpalace.query(). - Token & Write Efficiency: Hot/Cold deduplication trims redundant
full_cloudprose (-6.1%chars on Living KB with1.000recall); batched document extraction packs up to 5 chunks/call (~4–5×fewer write calls); EvoSCM Phase 3 adds sub-session atomic fact supersession ([SUPERSEDED FACT]guardrails).
Quick Start
Run via uvx (zero setup)
# Ingest a local docs/, ADR folder, or Obsidian vault (incremental sha256 + auto-supersession on file edits)
uvx episteme-mcp ingest ./docs --palace-dir ./palace_data
# Query directly from the terminal
uvx episteme-mcp query "What is the current production auth standard?" --palace-dir ./palace_data
# Launch the zero-dependency MCP stdio server (for Cursor, Claude Desktop, Antigravity)
uvx episteme-mcp --palace-dir ./palace_data --default-profile full_cloud
(Add --embed-model nomic-embed-text for opt-in Hybrid FTS5 + Dense RRF retrieval. Or install locally with pip install -e ".[dev]" and run pytest -q tests/.)
Exposes 2 primary high-level tools (palace_remember, palace_recall), 7 low-level primitives (palace_ingest_document, palace_propose_claim, palace_revise_belief, palace_query, palace_dereference_chunks, palace_sleep_consolidate, palace_curiosity_frontier), and 3 resources (palace://stats, palace://revision-log, palace://curiosity-frontier).
See docs/MCP_SETUP.md for copy-paste configs for Antigravity, Claude Desktop, and Cursor.
Repository Structure
src/palace/— Core runtime:cli.py,cold_store.py(with opt-inHttpEmbeddingClient&search_hybrid),mental_palace.py(Dual-Layer Epistemic PPR + EvoSCM Phases 1–3),sqlite_store.py(Lazy LRU + WALBEGIN IMMEDIATE+ FTS5),schema.py,llm_client.py,baselines.py,mcp_server.py.experiments/exp0_bacterial_confinement/— Single-paper contamination-free QA benchmark (Nature Comms July 2026).experiments/exp1_multi_doc_interference/— 12-paper (303 chunks) multi-doc interference & belief revision benchmark.experiments/exp2_blackbox_lab/— Zero-leakage black-box active-curiosity virtual lab (Real & Blind--anonymize).experiments/exp3_worldcoder/— Sandboxed executable WorldCoder synthesis + SCL Promotion Gate.experiments/exp_living_kb/— Versioned technical docs benchmark (Helios Cloud Platform) with TF-IDF, BM25, Recency, Dense, Hybrid RRF, and Hybrid + LLM Reranker baselines.experiments/exp_longmemeval/— External LongMemEval (knowledge-update) public benchmark runner.docs/— FOUNDATIONS_AND_MATHEMATICS.md, MCP_SETUP.md, HANDOFF_STATE.md.tests/— 58 deterministic CPU unit & integration tests.
License
Metadata
Release files for episteme-mcp 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| episteme_mcp-0.5.0.tar.gz | 104.2 kB | With provenance | Details for episteme_mcp-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| episteme_mcp-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for episteme_mcp-0.5.0-py3-none-any.whl |
Total release size: 175.9 kB
Release files / episteme_mcp-0.5.0.tar.gz
| Download URL | episteme_mcp-0.5.0.tar.gz |
|---|---|
| Size | 104.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c56f84030af14dc4d8d208980585b97ef8475dc153172d14539ff8a8a1d3b70a
|
|
BLAKE2b-256 checksum How to use checksums |
15b77c3f759b295f816721cd18e37fbbd32b3ddcd0cbfd795fd7d31e021a87c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / episteme_mcp-0.5.0-py3-none-any.whl
| Download URL | episteme_mcp-0.5.0-py3-none-any.whl |
|---|---|
| Size | 71.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdfefe091742d056050da626632063610c1c497564edc4610e435a36df19cacd
|
|
BLAKE2b-256 checksum How to use checksums |
6ba3488cfc49b6d5b9da74bdc8fd20f87230a091822b12e0b27eecce46fa6636
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for episteme-mcp 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for episteme_mcp-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.