swafra is leiden-chunked, graph-linked semantic memory as an MCP server — for Claude, Codex, and any MCP-compatible AI. fully local: no cloud, no gpu, no api keys. 94.7% recall on LongMemEval, the standard benchmark for long-term memory in AI assistants.
install, attach to your client, restart. the tools appear automatically and your agent starts remembering.
{
"mcpServers": {
"swafra": { "command": "swafra" }
}
}
{
"servers": {
"swafra": { "command": "swafra" }
}
}
pip install swafra, attach it to Claude Desktop, Claude Code, or VS Code, and the tools appear automatically.
text is split into sentences, a hybrid graph is built, and the leiden algorithm finds topically coherent communities — each one becomes a chunk.
fastembed (onnx, no cloud) with bge-small-en-v1.5. nothing you store ever leaves your machine.
chunks connect with sequential, similarity, and community edges. graph-walk retrieval traverses them for broader context.
json files on disk. no database required. six tools — add_knowledge to get_context — cover the whole loop.