一键导入
swafra
Local-first knowledge graph memory for Claude. Store, search, and retrieve knowledge across sessions using swafra's Leiden-chunked graph. Trigger: /swafra
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Local-first knowledge graph memory for Claude. Store, search, and retrieve knowledge across sessions using swafra's Leiden-chunked graph. Trigger: /swafra
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | swafra |
| description | Local-first knowledge graph memory for Claude. Store, search, and retrieve knowledge across sessions using swafra's Leiden-chunked graph. Trigger: /swafra |
swafra gives Claude persistent, searchable memory using a local knowledge graph. No cloud, no GPU, no API keys.
GitHub: https://github.com/kunal12203/swafra Benchmark: 94.7% recall_all@10 on LongMemEval-S (beats Supermemory 95% end-to-end QA on retrieval)
git clone https://github.com/kunal12203/swafra
cd swafra
pnpm install && pnpm build
pip install fastembed numpy # optional — falls back to local embedder without it
Add to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"swafra": {
"command": "node",
"args": ["/absolute/path/to/swafra/dist/index.js"]
}
}
}
Add to Claude Code (.claude/settings.json):
{
"mcpServers": {
"swafra": {
"command": "node",
"args": ["/absolute/path/to/swafra/dist/index.js"]
}
}
}
Restart Claude after adding the config.
| Tool | When to use |
|---|---|
add_knowledge | Store a document, note, or any text into memory |
search_knowledge | Find relevant chunks by natural language query |
get_context | Best for retrieval — search + graph walk combined |
graph_walk | Explore context around a specific chunk |
list_sources | See what's been stored |
delete_source | Remove a source from memory |
When the user types /swafra, read their request and do ONE of:
If the user wants to remember/store something:
add_knowledge(text="<the content>", title="<short label>")
Confirm: "Stored as '' — searchable now."
If the user asks a question or wants to find something:
get_context(query="<their question>", k=10)
Use the returned chunks to answer. If nothing relevant comes back, say so clearly — don't hallucinate.
list_sources()
Show the list cleanly.
delete_source(title="<title>")
Confirm deletion.
/swafra store this meeting transcript: [paste text]
/swafra what did we decide about the API design?
/swafra what do you know about the auth system?
/swafra list everything stored
/swafra forget the meeting from last Tuesday
Storage: ~/.swafra/ JSON files. No database required.