surreal-memoryBLOCK
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://pypi.org/project/surreal-memory/) [](https://github.com/acidkill/surreal-memory/actions) [](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](https://surrealdb.com/)
Persistent graph memory for AI agents, powered by SurrealDB.
All features are free and open source. No license keys. No paywalls. No embedding API required for basic usage.
pip install surreal-memory[surrealdb] smem init --full
Restart your AI tool. Your agent now remembers.
What's new in 3.12.0
- Consolidation now advances through bounded, durable work units. Interrupted
runs can resume from committed checkpoints, including semantic-link discovery, deduplication, fiber censuses, compression, and lifecycle work.
- Semantic-link discovery limits candidate memory and records source revisions
so stale or repeatedly changing source data can be detected and recovered safely instead of replaying unbounded work.
- Pruning and retention resume between committed substeps after errors, and
indexed keyset scans keep large graph operations bounded.
- The schema migration carries compatible unfinished v3.11 checkpoints
forward while preserving their phase data and 3.11.0:checkpoint-v1 compatibility marker. Package-version bumps do not invalidate this v1 checkpoint epoch; incompatible formats, schema state, or run parameters remain fenced off from resume.
- Reranker requests that exceed context limits are split without losing
candidate scores, and OpenAI-compatible embedding credentials are isolated from unrelated provider requests.
See CHANGELOG.md for migration d
000ceea71883OBSERVED · 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 surrealmemory --env API_KEY=${API_KEY} --env AWS_CREDENTIAL=${AWS_CREDENTIAL} --env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} --env BGE_M3_API_KEY=${BGE_M3_API_KEY} -- npx -y [email protected]{
"mcpServers": {
"surrealmemory": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"API_KEY": "${API_KEY}",
"AWS_CREDENTIAL": "${AWS_CREDENTIAL}",
"AWS_SECRET_ACCESS_KEY": "${AWS_SECRET_ACCESS_KEY}",
"BGE_M3_API_KEY": "${BGE_M3_API_KEY}"
}
}
}
}Exposed tools (8)
8 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
Surreal-Memory | read | Brain-inspired persistent memory for AI agents — neurons, synapses, and fibers |
memory_get | read | Get a memory by ID (legacy alias for smem_recall). |
memory_search | read | Search memories (legacy alias for smem_recall). |
smem_context | read | Get recent context from Surreal-Memory. |
smem_health | read | Get brain health diagnostics including grade and recommendations. |
smem_recall | read | Query memories from Surreal-Memory. Use this to recall past information, |
smem_remember | read | Store a memory in Surreal-Memory. Use this to remember facts, decisions, |
smem_stats | read | Get brain statistics including memory counts and freshness. |
Trust audit
BLOCKgrade F · trust 37/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- declared (11 observation(s))
- Shell
- declared (5 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
atob( ... ,eval(
: v !== v && u === u ? ${i} : `}var NW={operator:(e,t)=>lu(e,["_"],t.code),parameter:(e,t)=>lu(e,["datum","_"],t.code),event:(e,t)=>lu(e,["event"],t.code),handler:(e,t)=>{const n=`var datum=event.itemshould_verify = False
should_verify = False
importlib.import_module(module_name)
importlib.import_module(dep)
importlib.import_module(module_name)
importlib.import_module(module_name)
api_key="nmk_roundtrip123456789012345678",
.pre-commit-config.yaml
.mocharc.yml
.vscodeignore
module = importlib.import_module(module_path)
MemoryType.BOUNDARY: "Never use eval() in production",
"Never use eval() in production code",
assert suggest_memory_type("Never use eval() in production") == MemoryType.BOUNDARYreturn "tp_" + hashlib.md5(transcript_path.encode("utf-8")).hexdigest()[:16]return hashlib.md5(norm.encode("utf-8")).hexdigest()return hashlib.md5(key.encode()).hexdigest()
return hashlib.md5(raw.encode()).hexdigest()
digest = hashlib.md5(shingle.encode("utf-8", errors="surrogatepass")).digest()encryptor.encrypt("data", "../../../etc/passwd")introspector._extract_path("sqlite:///../../etc/passwd", "sqlite")get_surface_path("../../etc/passwd", global_only=True)import { SurrealMemoryClient } from "../../server/client";Gates applied: critical_finding, no_behavioural_pass.
000ceea71883full audit observations/trust-audit/mcp-server/acidkill__surreal-memory.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 | 000ceea71883 | BLOCK | F | 37 | first audit |
Questions
What tools does surreal-memory expose?
8 in total: 8 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is surreal-memory safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (37/100) and found 4 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does surreal-memory need?
It reads API_KEY, AWS_CREDENTIAL, AWS_SECRET_ACCESS_KEY, BGE_M3_API_KEY, COGNEE_API_KEY, DASHSCOPE_API_KEY, DATABASE_PASSWORD, GEMINI_API_KEY, GITHUB_TOKEN, GOOGLE_API_KEY, LLM_API_KEY and MEM0_API_KEY 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 surreal-memory run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as surrealmemory at 3.12.0.
How current is this page?
The grade is for one exact copy of the source (000ceea71883), read on 2026-10-10. The repository is watched and re-audited when it changes.