Persistent AI memory in one SQLite file: 3-layer hybrid search, confidence scoring, 29 tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Give Claude persistent memory across sessions. Single SQLite file. 29 tools. Zero LLM dependency.
Quick Start Β· Features Β· Architecture Β· All Tools Β· PyPI Β· Zenn Book (JP)
Standalone repository β This is the standalone version for use with Claude Desktop, Claude Code, and any MCP client. If you are a ClotoCore user, install CPersona from the in-app marketplace (ClotoHub) instead β it distributes this same repository.
Project status (July 2026) β The 2.4 series is the Stable line (latest: v2.4.40, gated by three comprehensive audit rounds β see Quality Assurance). The 2.5 series is the Current line (latest: v2.5.3) β an internal stabilization line that has passed the full release gate and is where all fixes land, pending production-soak certification; the DB schema is preserved across the line, and feature development resumes in 2.6. v2.5.3 refuses to start the HTTP transport when
CPERSONA_AUTH_TOKENis unset, wherever it binds β earlier versions allowed an unauthenticated loopback bind, which a tunnel or reverse proxy silently turns into public exposure (bug-198, HIGH; see Remote HTTP transport). A deployment that deliberately runs without authentication must now say so withCPERSONA_ALLOW_UNAUTHENTICATED_HTTP=true; the stdio transport is unaffected. v2.5.2 changes three things about MCP tool responses βstorereports its outcome inresult(stored / skipped / rejected) instead of an always-trueok,check_healthreports the singlestatusverdict without thehealthyboolean, and every tool-level failure a handler returns now carriesok: false(most used to returnerroralone, with nookto branch on; the explanation still travels inerror, except onstore, which puts it inreason). Two shapes stay outside that rule and always did: the outermost MCP dispatch answers an unknown tool name, or an exception escaping a handler, with a bareerrorand nookβ that layer is vendored from a library shared with the other Cloto servers, so correcting it is an upstream change rather than a local edit β and a successful read (get_contents,list_memories,list_episodes,get_profile) returns its payload with nookeither. Branch onok is false, and treat a response carryingerroras a failure whether or notokis present. Tiers and support windows: Release Channels & Support.
Claude forgets everything between sessions. Every conversation starts from zero β no context about your project, your preferences, or what you discussed yesterday.
cpersona fixes this. It's an MCP server that stores memories in a local SQLite file and retrieves them through hybrid search. Claude remembers you.
Prerequisites: Python 3.11+ (and uv for the one-command path).
Claude Code? Let the agent do the setup. This repo ships an Agent Skill that walks Claude through the whole installation β cpersona, the embedding server, MCP registration, and a store/recall smoke test β and, more importantly, teaches it when to store, recall, and archive memories afterwards:
Then just tell Claude Code: "Set up CPersona β I want persistent memory." The manual steps below are for Claude Desktop users and anyone who prefers to configure things by hand.
Run it with python -m cpersona (or python server.py).
cpersona's hybrid search works best with an embedding server for vector similarity. cpersona is embedding-server-agnostic: point CPERSONA_EMBEDDING_URL (see step 3) at any HTTP endpoint that implements the following minimal contract.
Contract requirements (2.5.0b1 clarifications):
api mode and all
CEmbedding providers) already normalizes.check_health(fix=true) repairs NULLed rows) and
calibrate_threshold.The reference server is CEmbedding (MIT) β it runs jina-v5-nano on-device (CPU) and exposes exactly this endpoint:
cpersona ships with defaults tuned against jina-v5-nano (768d). Any other server that satisfies the contract above works too β see Benchmarks for models with published measurements.
Without an embedding server, cpersona falls back to FTS5 + keyword search only. Vector search (the strongest retrieval layer) will be disabled.
Claude Desktop β add to claude_desktop_config.json:
The embedding server from step 2 is a plain HTTP process, not an MCP server β run it however you run background services (a terminal, launchd/systemd, etc.); cpersona only needs its URL.
Windows: use
C:/Users/you/.claude/cpersona.dbfor the DB path. No embedding server yet? Drop the twoEMBEDDING_*lines (or setEMBEDDING_MODE=none) β cpersona runs on FTS5 + keyword and tells you when it's degraded.
Claude Code:
That's it. Claude now has persistent memory. Ask it to store something and recall it in a later session.
Hybrid Search β Three independent retrieval strategies run in parallel and merge results via Reciprocal Rank Fusion (RRF):
| Layer | Method | Strength |
|---|---|---|
| Vector | Cosine similarity (jina-v5-nano, 768d) | Semantic meaning |
| FTS5 | SQLite full-text search with trigram tokenizer | Exact terms, names, IDs |
| Keyword | Fallback pattern matching | Edge cases, partial matches |
Memory Types:
storearchive_episodeupdate_profileConfidence Scoring β Each recalled memory gets a confidence score combining:
Zero LLM Dependency β cpersona is a pure data server. It never calls an LLM internally. All summarization and extraction is performed by the calling agent. This means zero API costs from cpersona itself, deterministic behavior, and no hidden latency.
Additional capabilities:
critical/warn/info) and auto-repair (contamination, duplicates, FTS integrity, embedding dimension drift, schema objects, isolation-axis hygiene, stale tasks, invalid data), plus a python -m cpersona.checkup CLI for CI gatingRecall flow (RRF mode):
Measured on LMEB (Long-horizon Memory Embedding Benchmark, arXiv:2603.12572) β 22 datasets subsuming LoCoMo and LongMemEval, measured here as 22 retrieval tasks. The metric is Mean NDCG@10 across all 22 tasks.
Two tracks isolate the pipeline's contribution:
store/recall code paths: SQLite + FTS5 + RRF fusion + per-agent auto-calibration (cpersona v2.4.40, full-ranking regime).| Embedding Model | Params | Dim | Track A (raw) | Track B (cpersona) | Ξ |
|---|---|---|---|---|---|
| all-MiniLM-L6-v2 | 22M | 384 | 43.67 | 50.10 | +6.43 |
| bge-m3 | 568M | 1024 | 56.83 | 57.66 | +0.83 |
cpersona's hybrid pipeline outranks the raw embedding on both models (Track B > Track A) β the fusion layers add signal rather than merely persisting vectors. The weaker the embedding, the larger the pipeline's contribution: the FTS5/keyword layers rescue queries the vector search alone misses. Methodology, the measurement harness, and the reproduction regime live in benchmarks/.
| Tool | Description |
|---|---|
store | Store a message in agent memory |
recall | Recall relevant memories (vector + FTS5 + keyword, RRF merge) |
recall_with_context | Recall with external conversation context (auto-dedup) |
get_contents | Expand recall preview refs (mem:<id> / ep:<id>) to full content |
get_profile | Get current agent profile |
update_profile | Save pre-computed agent profile |
get_operating_context | Read the operator-owned operating context served to every client (read-only; edited on the filesystem) |
archive_episode | Archive conversation episode with summary and keywords |
list_memories | List recent memories |
list_episodes | List archived episodes |
update_memory | Update memory content (rejects if locked) |
lock_memory | Lock memory to prevent deletion/editing |
unlock_memory | Unlock memory to allow deletion/editing |
delete_memory | Delete a single memory (ownership enforced) |
delete_episode | Delete a single episode (ownership enforced) |
delete_agent_data | Delete all data for an agent |
calibrate_threshold | Auto-calibrate vector search threshold via z-score |
set_recall_precision | Set an agent's recall precision (knob 3) and recalibrate its gate |
get_recall_precision | Read an agent's effective recall precision (knob 3) |
pause_persistence | Turn writes into no-ops for an opt-in TTL window |
resume_persistence | Re-enable persistence immediately |
persistence_status | Report whether persistence is paused and the TTL remaining |
migrate_channel_axis | Re-channel bridge-type memories to their concrete channel |
export_memories | Export to JSONL (memories, episodes, profiles) |
import_memories | Import from JSONL (idempotent via msg_id dedup) |
merge_memories | Merge one agent's data into another (atomic, with dedup) |
get_queue_status | Background task queue status |
check_health | Registry-driven health check (severity-tagged issues) with auto-repair |
deep_check | Deep semantic data quality analysis with auto-repair |
All settings via environment variables with sensible defaults:
| Variable | Default | Description |
|---|---|---|
CPERSONA_DB_PATH | data/cpersona.db | SQLite database path, relative to the client's working directory β set it to an absolute path to keep one memory across sessions |
CPERSONA_EMBEDDING_MODE | none | Embedding mode (http or none) |
CPERSONA_EMBEDDING_URL | (unset) | Embedding server URL, e.g. http://127.0.0.1:8401/embed |
CPERSONA_VECTOR_SEARCH_MODE | local | Vector search execution (local in-process cosine, or remote offload) |
CPERSONA_RECALL_MODE | rrf | Recall fusion strategy (rrf, rsf, or cascade) |
CPERSONA_RECALL_PREVIEW_CHARS | 500 | Preview tier: max content chars returned by the recall tools (0 disables; full_content=true / get_contents fetch full text) |
CPERSONA_RRF_K | 60 | RRF smoothing parameter |
CPERSONA_MAX_CONTENT_LENGTH | 2000 | Max characters per stored memory and per profile. Longer writes are truncated; check_health(fix=true) also cuts existing rows above the cap, so lowering it shortens data that was already stored |
CPERSONA_CONFIDENCE_ENABLED | false | Include confidence metadata in results |
CPERSONA_AUTO_CALIBRATE | false | Auto-calibrate on startup |
CPERSONA_TASK_QUEUE_ENABLED | true | Background task queue (DB-persisted, crash-recoverable) |
CPERSONA_RECENT_RECALL_PENALTY | 0.7 | Penalty for recently recalled memories |
CPERSONA_RECENT_RECALL_WINDOW_MIN | 5 | Window (minutes) for recent recall penalty |
The generic aliases EMBEDDING_MODE / EMBEDDING_HTTP_URL / EMBEDDING_MODEL
are also accepted (the CPERSONA_-prefixed form wins when both are set) β the
marketplace catalog and the Quick Start use the generic names.
The default transport is stdio, where the MCP client owns the process and no
network is involved. Set CPERSONA_TRANSPORT=streamable-http to serve over HTTP
instead β one server, several clients, reachable over a network.
| Variable | Default | Description |
|---|---|---|
CPERSONA_TRANSPORT | stdio | stdio, or streamable-http to serve over HTTP |
CPERSONA_HTTP_HOST | 127.0.0.1 | Bind address |
CPERSONA_HTTP_PORT | 8402 | Bind port |
CPERSONA_AUTH_TOKEN | (unset) | Bearer token required on every request |
CPERSONA_ALLOW_UNAUTHENTICATED_HTTP | false | Run the HTTP transport with no authentication at all |
A loopback bind is not a security boundary. Tunnels (cloudflared, ngrok),
reverse proxies, kubectl port-forward and published container ports all forward
to 127.0.0.1, so binding there says nothing about who can reach the port. Every
tool is exposed to whoever can β including delete_agent_data and the
file-reading/writing export_memories / import_memories. Set
CPERSONA_AUTH_TOKEN whenever the process is not something only you can talk to.
Since v2.5.3 the server enforces that: with CPERSONA_TRANSPORT=streamable-http
and no CPERSONA_AUTH_TOKEN, it refuses to start. If you are upgrading from
2.5.2 or earlier and run the HTTP transport without a token, it will not start
β set CPERSONA_AUTH_TOKEN, or set CPERSONA_ALLOW_UNAUTHENTICATED_HTTP=true to
state that you really do want no authentication (local development only).
Earlier versions allowed an unauthenticated loopback bind and logged that it was
"bound to loopback only", which read as an all-clear and was not one.
CPERSONA_RECALL_MODE)rrf (default) β Reciprocal Rank Fusion: merges the vector + FTS channels by
rank only. Robust and scale-free, but discards score magnitude.rsf β Relative Score Fusion: per-query min-max-normalizes each channel's raw
score (cosine for vector, bm25 for keyword) and sums them, so the keyword channel's
bm25 magnitude survives the merge. Recommended for topic-drift-prone or space-less
language (e.g. Japanese) contexts, where that magnitude is the discriminating
signal rrf flattens away (β Weaviate's relativeScoreFusion; see the ClotoCore
RECALL_CONTAMINATION_AB_2026-06-14 report Β§10β12). Caveat: min-max normalization
can over-cut small, closely-scored result sets when autocut is enabled β rrf
remains the default until that interaction is hardened.cascade β Sequential channel fill (legacy).cpersona is an MCP server β it works with any MCP-compatible host:
cpersona is the memory layer of ClotoCore, an open-source AI agent platform written in Rust. While cpersona is fully standalone (MIT license), it was designed to give AI agents persistent, searchable memory within the ClotoCore ecosystem.
Every release is gated by a machine-verifiable quality process:
qa/issue-registry.json with a machine-checkable
code pattern; scripts/verify-issues.sh verifies
that every fix marker is still present (and every removed defect stays
removed), so a regression or a silently-reverted fix fails loudly.check_health performs no embedding network I/O
while holding the write lock.docs/RELEASE_LIFECYCLE_STANDARD.md
(v1.0), piloted in this repository as the reference implementation for
Cloto-family projects.Releases follow a three-tier model β Stable (production-certified, critical fixes only), Current (newest release line, all fixes land here), and Experimental (alpha/beta pre-releases, opt-in). When a new line is certified Stable, the previous one keeps critical-fix support for 30 more days, then reaches EOL. Current status: 2.4.x is the Stable line (latest v2.4.40) and 2.5.x is the Current line (latest v2.5.3), where all fixes land while it awaits production-soak certification.
Known issue: v2.4.39 and earlier under-scan vector recall on corpora beyond a few hundred rows (bug-085; v2.4.38βv2.4.39 are the most affected β the limit clamp closed the only workaround). Fixed in v2.4.40; upgrading is strongly recommended. See SUPPORT.md Β§ Known issues.
Known issue (Stable line): the 2.4.x line starts the HTTP transport unauthenticated when
CPERSONA_AUTH_TOKENis unset and the bind is a loopback address (bug-198, HIGH). A loopback bind does not bound reachability β tunnels, reverse proxies,kubectl port-forwardand published container ports all forward to127.0.0.1. If you serve 2.4.x over HTTP, setCPERSONA_AUTH_TOKEN. The startup enforcement that makes a missing token refuse to boot wherever it binds is in the Current line (v2.5.3); the Stable line only warns.
Full policy: SUPPORT.md Β· specification: RELEASE_LIFECYCLE_STANDARD.md Β· security reports: SECURITY.md.
Open an issue β bug report or feature request.
Reports are welcome even when you are not certain it is a bug. If it turns out to be a configuration problem, that is still useful signal β it means the documentation was unclear, which is a defect of its own. Security vulnerabilities are the one exception: please report those privately via SECURITY.md rather than in a public issue.
/clear β recall workflowMIT β free to use from any MCP host without restriction.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/cpersona)<a href="https://allmcps.com/mcp/cpersona"><img src="https://allmcps.com/api/badge/cpersona?style=directory" alt="CPersona on AllMCPs" /></a>