mnemeSAFE
Persistent long-term memory for Claude Code agents — SQLite + FTS5 + sqlite-vec + RRF hybrid recall over MCP, with Chinese tokenization. Local-first, graceful degradation.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Save 80-90% memory-related token costs. Persistent long-term memory for AI agents via MCP — on-demand recall instead of always-inject. Works with any MCP-compatible agent: Claude Code, Cursor, Windsurf, Cline, Continue, and more.
English · 中文
The Problem: Memory Costs Tokens
AI agents are stateless. The common fix is injecting a context file on every prompt — but that means you pay token costs on every single message, even when the agent already knows the answer.
How much does this waste?
Most prompts don't need historical memory. mneme lets the agent decide when to look things up — saving 80-90% of memory-related token costs.
What's New in v2.0
Memory Transfer Learning
Inspired by research on cross-context memory reuse (arxiv 2604.14004), memories now have 3 abstraction tiers:
Key insight: Concrete traces have low cross-context reuse value and can cause negative transfer. The system automatically weights meta-knowledge higher during recall, so distilled patterns surface above raw event logs.
sqlite-vec Hybrid Search (FTS5 + KNN + RRF)
When configured with an embedding API, mneme now runs dual-path retrieval:
- FTS5 path: Keyword/lexical matching (fast, exact)
- Vector path: Semantic matc
020655234254OBSERVED · 2026-10-10Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mneme --env EMBEDDING_API_KEY=${EMBEDDING_API_KEY} --env ENTITY_LLM_API_KEY=${ENTITY_LLM_API_KEY} --env MNEME_AUTH=${MNEME_AUTH} --env MNEME_HOST_TOKEN=${MNEME_HOST_TOKEN} -- npx -y [email protected]{
"mcpServers": {
"mneme": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"EMBEDDING_API_KEY": "${EMBEDDING_API_KEY}",
"ENTITY_LLM_API_KEY": "${ENTITY_LLM_API_KEY}",
"MNEME_AUTH": "${MNEME_AUTH}",
"MNEME_HOST_TOKEN": "${MNEME_HOST_TOKEN}"
}
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
echo | read | Echo a value |
hang | read | Hang past the proxy timeout |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (7 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
const SERVER_URL = process.env.MNEME_HTTP_URL || 'http://127.0.0.1:18792/mcp'
obj.uuid || `cc-${sessionId}-${ts}-${role}-${createHash('md5').update(text).digest('hex').slice(0, 8)}`假设 mneme 已经装在你机器上、跑在 `http://127.0.0.1:18792/mcp`。
MNEME_HTTP_URL = "http://127.0.0.1:18792/mcp"
| `MNEME_HTTP_URL` | `http://127.0.0.1:18792/mcp` | 真 mneme HTTP endpoint |
MNEME_HTTP_URL: `http://127.0.0.1:${port}/mcp`,@modelcontextprotocol/sdk, better-sqlite3, zod
Gates applied: no_behavioural_pass.
020655234254full audit observations/trust-audit/mcp-server/agentgamelab__mneme.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-10 | 020655234254 | SAFE | B | 89 | first audit |
Questions
What is the mneme MCP server?
Persistent long-term memory for Claude Code agents — SQLite + FTS5 + sqlite-vec + RRF hybrid recall over MCP, with Chinese tokenization. Local-first, graceful degradation.
What tools does mneme expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is mneme safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does mneme need?
It reads EMBEDDING_API_KEY, ENTITY_LLM_API_KEY, MNEME_AUTH, MNEME_HOST_TOKEN, MNEME_HOST_TOKENS, MNEME_TOKEN_CODEX, TOKENMEM_COMPACT_SESSION, TOKENMEM_COMPACT_SUMMARY and TOKENMEM_DB_PATH from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does mneme run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as mneme at 2.11.1.
How current is this page?
The grade is for one exact copy of the source (020655234254), read on 2026-10-10. The repository is watched and re-audited when it changes.