mcpmem is an MCP server with a persistent knowledge graph, code intelligence and semantic search. One binary, one file, no database to run, no telemetry.
Each is a category of MCP tools you switch on with a flag. Compile only what you need.
Entities, directed relations and timestamped observations. Key-value attributes on both nodes and edges. FTS5 search, paths, neighbours, subgraphs, merge and rename.
Point it at a repo. tree-sitter parses 11 languages into symbols and outlines, so a coding agent navigates by name instead of reading whole files.
The server embeds entities, observations, relations and the contents of files attached to nodes, then fuses vector similarity with full-text relevance and graph centrality. Semantic, hybrid and MMR retrieval.
A single binary speaks MCP over stdio for local agents or over HTTP with OAuth 2.1 for remote connectors. Everything lives in one embedded SQLite file per workspace, so backup is a copy and migration is a move.
A built-in web viewer: force-directed graph, node and relation inspector, direct and semantic search, files on nodes with their contents indexed, and an admin panel for principals, scopes, webhooks and workspaces.
Remote clients authorize through your identity provider and get only the scopes you tick: graph-read, graph-write, vectors, code, admin.
Each graph has an owner, a visibility and reader or writer grants. A private workspace you cannot access looks exactly like one that does not exist.
No telemetry, no cloud dependency. Webhooks are signed and opt-in; the worker runs empty unless you configure it.