supermem
OfficialEnables using Turso as the storage backend for a persistent memory graph, allowing MCP tools to store and query entities, relationships, and observations in a Turso database.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Supermem
A personal super-memory graph that acts as a shared execution layer: it stores everything you're building — projects, tools, decisions, people, files — as a graph, and exposes it over MCP so any tool or agent (and you) can query and grow the same context in natural language.
Backend: Turso (managed libSQL / SQLite) — free, low-maintenance, network-addressable, native vector search, and portable (it's just a SQLite file). Dev runs against a local
file:DB with no account.Retrieval: hybrid — graph edges for exact traversal, vector search as the natural-language front door, and FTS5 keyword search as an exact-term complement.
Embeddings: local, free, offline via
@huggingface/transformers(Xenova/all-MiniLM-L6-v2, 384-dim). No API keys, no cost.
Quick start
npm install
cp .env.example .env # defaults to a local file: DB — no account needed
npm run migrate # create the schema
npm run seed # optional: a small example graph about Supermem itself
npm run verify # end-to-end checks (embedding → recall → traversal)
npm run mcp:smoke # live MCP client↔server checkFirst run downloads the ~22 MB embedding model once, then works offline.
Related MCP server: dejaview-mcp
Use it from Claude Code
Register the stdio server (use the absolute path to this repo):
claude mcp add supermem -- npx tsx /ABSOLUTE/PATH/TO/supermem/src/mcp/stdio.tsThen, in any session, the agent can call these tools:
Tool | Purpose |
| Store a fact in natural language (optionally about a named entity). |
| Create/update an entity |
| Connect two entities with a typed edge ( |
| Attach an embedded fact to a specific entity. |
| Primary query — hybrid search → relevant entities + facts + neighbors. |
| Full detail for one entity: attrs, all facts, connections. |
| Traverse the graph from an entity, up to N hops. |
| List entities, optionally by type. |
| Delete an observation or an entire entity. |
Reachable over HTTP (Phase 2)
The same server also speaks the MCP Streamable HTTP transport, so agents and people can reach one shared memory remotely. It runs statelessly (a fresh server per request), which suits serverless and horizontal scaling.
Run it locally or on any always-on host:
export SUPERMEM_AUTH_TOKEN=$(openssl rand -hex 32) # required before exposing publicly
npm run http # → http://localhost:3000/mcp
npm run http:smoke # verifies auth + remember/recall over HTTPGET /health— liveness (no auth).POST /mcp— MCP endpoint; requiresAuthorization: Bearer $SUPERMEM_AUTH_TOKENwhenever the token is set. If it's unset, auth is disabled (local dev only) and the server warns.
Register the remote server with Claude Code:
claude mcp add --transport http supermem-remote https://YOUR_HOST/mcp \
--header "Authorization: Bearer $SUPERMEM_AUTH_TOKEN"Deploy to Vercel
api/index.ts exports the Express app and vercel.json routes all traffic to it, so:
vercel # preview
vercel --prod # production
vercel env add SUPERMEM_AUTH_TOKEN # and TURSO_DATABASE_URL / TURSO_AUTH_TOKENEmbeddings caveat. The default embedder (transformers.js/onnxruntime) is a heavy native dependency for serverless functions (bundle size + cold starts). For a smooth reachable deploy today, either run
npm run httpon a small always-on host (Railway/Fly/Render/VPS), or swap the embedder insrc/embed/embedder.tsfor a hosted embedding endpoint. Phase 2's HTTP transport + auth work identically in all of these.
Point at Turso (reachable deployment)
Create a free Turso DB, then set in .env:
TURSO_DATABASE_URL=libsql://your-db.turso.io
TURSO_AUTH_TOKEN=...npm run migrate and everything else behave identically — the schema and code are
backend-agnostic.
Data model
nodes(id, type, name, attrs, …)— entities, unique on(type, name).edges(id, src_id, dst_id, type, attrs, …)— typed, directed relationships.observations(id, node_id, text, source, embedding F32_BLOB(384), …)— atomic facts, embedded on write; mirrored into an FTS5 index and a libSQL vector index.
Roadmap
Phase 1 (done): core memory graph over stdio MCP, Turso-ready.
Phase 2 (done): Streamable-HTTP MCP transport + bearer-token auth + Vercel/self-host deploy path so agents and people reach it remotely. ← you are here
Phase 3: auto dev-activity ingestion (scan git repos/commits/files → same write tools).
Phase 4: integrations (Gmail/Drive/…) and a thin REST + web UI for non-agent users.
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared long-term memory for AI agents: save and recall context as a searchable knowledge graph.
Persistent knowledge graph for AI agents. Remember, recall, and forget facts.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Related MCP Servers
AlicenseAqualityDmaintenanceProvides persistent long-term memory for AI agents through semantic search and automated knowledge graph extraction. It enables agents to store, recall, and reason over facts, preferences, and relationships across multiple conversations and sessions.1415 npmMIT- AlicenseNot gradedqualityDmaintenanceProvides persistent knowledge graph memory for AI agents, enabling them to store, recall, and query facts about people, projects, and relationships across sessions.MIT
- FlicenseNot gradedqualityCmaintenanceProvides AI agents with persistent, local cross-session shared memory by combining vector semantic retrieval with knowledge graph relationships, and supports short/long-term memory management and local backups.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store, search, and link typed knowledge entities such as memories, people, projects, tasks, and documents over a Streamable HTTP MCP endpoint. Combines hybrid BM25 and vector search with a knowledge graph, and separates short-lived session context from durable memory that future agents can trust.10AGPL 3.0