CPersona

Official registry Data and databases

Persistent AI memory in one SQLite file: 3-layer hybrid search, confidence scoring, 29 tools.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package cpersona
Claude Code
claude mcp add cpersona -e 'CPERSONA_DB_PATH=data/cpersona.db' -e 'CPERSONA_EMBEDDING_MODE=none' -e 'CPERSONA_EMBEDDING_URL=<CPERSONA_EMBEDDING_URL>' -e 'CPERSONA_RECALL_MODE=rrf' -- uvx cpersona==2.5.3
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "cpersona": {
            "command": "uvx",
            "args": [
                "cpersona==2.5.3"
            ],
            "env": {
                "CPERSONA_DB_PATH": "data/cpersona.db",
                "CPERSONA_EMBEDDING_MODE": "none",
                "CPERSONA_EMBEDDING_URL": "<CPERSONA_EMBEDDING_URL>",
                "CPERSONA_RECALL_MODE": "rrf"
            }
        }
    }
}

Environment variables

  • CPERSONA_DB_PATH SQLite database path. Defaults to data/cpersona.db, which follows the client's working directory — set it to an absolute path to keep one memory across sessions.
  • CPERSONA_EMBEDDING_MODE Embedding mode: 'http' to use an embedding server for vector search, 'none' for lexical layers only.
  • CPERSONA_EMBEDDING_URL Embedding server endpoint, e.g. http://127.0.0.1:8401/embed. Required when CPERSONA_EMBEDDING_MODE=http.
  • CPERSONA_RECALL_MODE Recall fusion strategy: 'rrf' (default), 'rsf', or 'cascade'.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. CPersona
  2. The Problem
  3. Quick Start
  4. What You Get
  5. Benchmarks
  6. Documentation
  7. Quality Assurance
  8. Support
  9. Sponsorship
  10. License

CPersona

MCP Memory Server

Persistent memory for AI agents, over MCP. One SQLite file you own. No LLM in the loop. Honest when recall degrades. Ask your agent to save a project's design decisions and their reasons, then recall them in a later coding session (setup and verification). Use reconstruct to read recalled items with quotes from the stored records (traceable recall). In this project's own run on OmniMemEval's pipeline: 89.6% on LongMemEval-S, tied for first with MemOS within sampling error (88.75% on the 400 questions not used in development), and 84.0% on LoCoMo (benchmarks).

Documentation · Getting Started · Architecture · Tools · PyPI · Zenn Book (JP)


Standalone repository — This is the standalone version for use with Claude Desktop, Claude Code, Codex CLI, Cursor, VS Code, and any other MCP client (registration table). If you are a ClotoCore user, install CPersona from the in-app marketplace (ClotoHub) instead — it distributes this same repository.

Project status — 2.4.x is Stable; 2.6.x is Current, where all fixes land, pending production-soak certification. Its first final, 2.6.0, migrates the schema from version 13 to 17 on its first start and changes some tool behaviour, so take a 2.5 store across with Upgrading from 2.5 to 2.6. 2.5.x is Candidate: no longer the newest line and not yet certified, reachable by exact version. Which version to run, and how long each line keeps receiving fixes: SUPPORT.md. Where the lines are heading: the roadmap.

Upgrading from 2.5.2 or earlier? Two things need a decision from you. v2.5.3 will not start the HTTP transport without CPERSONA_AUTH_TOKEN, wherever it binds — set one, or opt out with CPERSONA_ALLOW_UNAUTHENTICATED_HTTP=true (why; stdio is unaffected). v2.5.2 changed tool response shapes — branch on ok is false, and treat any response carrying error as a failure whether or not ok is present (contract §10).

The Problem

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. It runs against any MCP-compatible host — Claude Desktop, Claude Code, ClotoCore (the AI agent platform where cpersona originated, and whose memory layer it is), or a client of your own.

Quick Start

Already running CPersona, or updating it as an agent? Since 2.6.12a1 the hooks and the agent skill ship as a plugin (below), and any 2.6 server works with it. If CPersona's hooks were registered by hand (for example a copy of the old examples/claude-code-hooks/prompt_hook.py) or the skill was copied into ~/.claude/skills/ or ~/.codex/skills/, install the plugin and remove those copies, or keep them and turn the plugin's matching hooks off with CPERSONA_HOOKS_DISABLE. Running both gives the agent every note twice. Before any upgrade, read the When you upgrade section of that release's notes.

Setting this up as an AI agent? Read the Agent Skill — plugin/skills/cpersona-memory/SKILL.md in a clone of this repository — and follow it end to end. It is the complete procedure: install, embedding server, registration, and the two steps a quick start tends to skip — verifying from a new session, and persisting the memory policy so the next session knows which agent_id holds the memories.

Using Claude Code or Codex yourself? Install the agent plugin, which carries the same skill and hooks that remind the agent to look in memory before it acts, to store as it goes, and to restore the task after the conversation is compacted. Then say "Set up CPersona." The server itself is connected in step 3.

/plugin install cpersona --marketplace Cloto-dev/cpersona

That is Claude Code 2.1.275 or later. For Codex, run codex plugin marketplace add Cloto-dev/cpersona and codex plugin add cpersona@cpersona, then trust the hooks in /hooks. The getting started guide lists what each hook adds, and how to copy the skill alone from the wheel.

1. Install — Python 3.11+, and uv for the one-command path.

uvx cpersona          # run directly, no install step
pip install cpersona  # or install it

2. Run an embedding server — strongly recommended; it powers the vector layer

uvx --from "cembedding[onnx]" cembedding-download-model --model jina-v5-nano
EMBEDDING_PROVIDER=onnx_jina_v5_nano uvx --from "cembedding[onnx]" cembedding   # serves http://127.0.0.1:8401/embed

The reference server's lifetime is bound to its stdin. Started with stdin closed — by a service manager, by nohup … </dev/null, or from an agent's background shell — it binds the port and exits within the same second with status 0. Give it a stdin that stays open (sleep infinity | cembedding); Getting Started has the details.

Any endpoint implementing the embedding contract works and is equally recommended; CEmbedding is the reference implementation. The choice of backend is yours — the recommendation is to connect one, not to connect that one.

Without a backend, cpersona still runs — FTS5 + keyword search, and it says on every recall that it is degraded rather than quietly returning less. That is a supported fallback, not a recommended way to run: recall then matches on shared words, so a memory phrased differently from your question can be missed, and so can an older one.

3. Register it with your MCP client

For Codex, Cursor, VS Code, or Claude Desktop, follow the client registration table. The command below is for Claude Code.

claude mcp add-json cpersona '{"type":"stdio","command":"uvx","args":["cpersona"],"env":{"CPERSONA_DB_PATH":"/home/you/.claude/cpersona.db","EMBEDDING_MODE":"http","EMBEDDING_HTTP_URL":"http://127.0.0.1:8401/embed"}}' -s user

4. Verify from a new session — ask the agent to store something, then recall it in a fresh session. Surviving the session boundary is the whole point.

5. Make it stick — registration gives the agent the tools. It does not tell the next session to use them, or which agent_id holds the memories: recall is scoped to an exact agent_id, so a session that guesses the wrong one gets nothing back. Persist the short policy block into the file your client loads every session (~/.claude/CLAUDE.md, AGENTS.md, …) — Getting Started §5.

At startup the server asks pypi.org whether a newer release exists and tells the calling agent through recall; set CPERSONA_UPDATE_CHECK=false to turn that off. Updating is never automatic.

Claude Desktop config, Windows paths, installing from source and the full walkthrough: Getting Started.

What You Get

  • Hybrid search — vector (the layer an embedding server powers), FTS5 (trigram, so it works on Japanese and other space-less scripts) and keyword, fused by rank or relative score. The FTS and keyword layers rescue what vectors miss: identifiers, error strings, exact names.
  • Evidence you can trace — reconstruct, the recommended way to answer from memory, returns items that quote the stored rows behind them, within a character budget. Text past a long record's embedding window stays reachable (block reach, on by default).
  • Three memory types — facts, session summaries and an accumulated profile.
  • Zero LLM dependency — cpersona never calls a generative model; your agent summarizes and hands over the result. Recall is deterministic given a calibrated gate, but the gate is sampled, so two installs on identical data can settle differently.
  • Single-file SQLite — no external database; sqlite3 .backup copies the corpus (the calibration sidecar beside it needs copying too, and so does the alias ledger when an ACL row sets per_subject).
  • Operable — auto-calibrated thresholds, a health check with auto-repair, an advisory when the embedding layer dies, JSONL export/import, agent-to-agent merge.
  • Isolation — agent_id, project_id and channel let several agents and projects share one database without bleeding into each other.

How it fits together: Architecture · what the tools do: Tools · what you may rely on: Behavior Contracts.

Benchmarks

Measured on OmniMemEval's LongMemEval-S pipeline: the 500 questions of the cleaned LongMemEval-S, answered by gpt-4.1-mini and judged by gpt-4o-mini, through the same harness, prompts and models as the memory backends OmniMemEval reproduces. Accuracy is the share of questions judged correct; Context Tokens is the average number of tokens sent to the answer model per question, its prompt included.

BackendDeploymentSS-UserSS-AsstSS-PrefTemp. ReasMulti-SKnow. UpdOverallContext Tokens
CPersona 2.6.11 (pro mode)local97.1494.6496.6786.4785.7188.4689.604,262.5
CPersona 2.6.11 (lite mode)local95.7183.9390.0080.4574.4482.0582.20993.3
MemOScloud100.00100.00100.0089.4778.9584.6289.204,151

Tied for first: 89.60% at 4,262.5 tokens a question, in this project's own run. Of the 12 backends OmniMemEval reproduces through the same pipeline, MemOS is level with it (89.20% at 4,151 tokens) and every other one scores at least 9 points lower. CPersona's modes were tuned on 100 of these 500 questions, and the other 400 served its release checks; on those 400, pro answers 88.75%, still level with MemOS. ("Level" means within the 95% sampling error of two independent runs.) Lite mode, the smaller response, answers 82.20% at 993.3 tokens: below MemOS, level with EverOS, Zep / Graphiti, mem9 and Letta, with a quarter or less of the tokens any of them sends. On LoCoMo (1,540 questions, same models) pro answers 84.03% at 4,441 tokens: below MemOS (88.83%), level with Cognee, EverOS and Hindsight, with fewer tokens than any of them. CPersona stores each conversation as it is and calls no generative model to store or recall.

Against OpenViking 0.5.0, run by this project without its recommended rerank: 84.03% against 59.09% on LoCoMo, and on the Open Agent Memory Benchmark's 60-question LongMemEval screen, 52 against 51 correct with a quarter of the evidence tokens and no generative-model tokens at write time (OpenViking's model used 37 million, input and output). Not every cost favours CPersona: on LoCoMo its context was 0.58 of OpenViking's, and at 2.6.11 its pro mode searched slower (72.7 against 50.0 ms median). 2.6.12 returns the same contexts faster: a later run of both put pro at 48.2 against 50.6 ms.

One run each, by this project, at the 2.6.11 release. OmniMemEval lists the rows of both benchmarks among its published reference results, after its maintainers recomputed them from the saved records against the datasets; that check is not an independent rerun. Setups, registered rules and every departure from a clean run: results; earlier runs: 2.6.3a1 and 2.6.4a1; retrieval-only measurements on LMEB: benchmarks/.

Documentation

**cloto-dev.github.io/CPersona** is canonical — when this README disagrees with it, the site wins.

Getting StartedInstall, embedding server, client registration, verification
Behavior ContractsWhat you may rely on: recall ordering, dedup, scan window, response shapes
ToolsEvery tool, grouped by what you reach for it for
ArchitectureStorage, the retrieval pipeline, isolation axes
RoadmapWhat each release line is for and may break; planned retrieval features and the scale ladder
Operations RunbookBackup, degradation detection, tuning, CJK guidance, corpus sync
ConfigurationEvery environment variable and its default
Quality AssuranceHow a release is gated: audits, the bug ledger, structural and mutation gates
FAQShort answers to the questions operators actually ask

Japanese translations are in the language selector (English is canonical) and agents can read llms.txt. Longer reads in Japanese: a book on the design and setup, and an article on the token economics of session-end → /clear → recall.

Quality Assurance

Every release is gated by a machine-verifiable process: multi-agent audit rounds with adversarial verification, a bug ledger that fails CI if a fix marker disappears or a removed defect returns, structural gates for invariants a plain test cannot express, a mutation proof that those gates go red when the invariant is broken, and gates holding the documented counts, defaults and version claims to the source that defines them.

Behind it: ~3,865 test functions across ~297 test modules (~5,612 cases parametrised, more test code than server code), on Schema v21 — how a release is gated.

Support

Three tiers — Stable (production-certified, critical fixes only), Current (newest line, all fixes land here) and Experimental (opt-in pre-releases). A superseded line keeps critical-fix support for 30 more days. Read SUPPORT.md § Known issues before pinning a version — some of them change what you should run.

Found a bug, or something the docs do not explain? Open a bug report or feature request, even when you are not certain — a configuration problem mistaken for a bug means the documentation was unclear, which is a defect of its own. Report security vulnerabilities privately via SECURITY.md.

Sponsorship

CPersona is MIT-licensed and stays fully usable whether or not anyone sponsors it. Sponsorship buys no feature, no release tier and no position in the issue queue — issues are triaged by impact, reproducibility and safety, and that does not change for anyone.

If CPersona has earned a place in your workflow and you would like the work to continue, you can sponsor Cloto-dev on GitHub. The same page covers CPersona, ClotoCore and the other projects published under that account; sponsorship goes toward development time, testing and infrastructure, documentation and maintenance.

Money is not the only thing that helps, and it is not the thing this project needs most. Starring the repository, saying which part of the setup was confusing, filing a reproducible issue, or correcting a sentence in the documentation all move it forward.

License

MIT — free to use from any MCP host without restriction.

Frequently asked questions

What is CPersona?

Persistent AI memory in one SQLite file: 3-layer hybrid search, confidence scoring, 29 tools.

How do I install CPersona?

It runs on your machine. In Claude Code: claude mcp add cpersona -e 'CPERSONA_DB_PATH=data/cpersona.db' -e 'CPERSONA_EMBEDDING_MODE=none' -e 'CPERSONA_EMBEDDING_URL=<CPERSONA_EMBEDDING_URL>' -e 'CPERSONA_RECALL_MODE=rrf' -- uvx cpersona==2.5.3. For other clients, paste the JSON configuration from this page into their MCP settings.

Does CPersona need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is CPersona open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains CPersona?

It is published by Cloto-dev. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.