persistent-kb-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@persistent-kb-mcpRecall the key points about authentication"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
persistent-kb-mcp
A Model Context Protocol (MCP) server that gives any MCP-capable AI agent a persistent, searchable knowledge base stored locally in a single SQLite file. Survives session restarts, context compaction, and machine reboots.
What it does
Exposes 5 MCP tools for interacting with a local SQLite knowledge base:
Tool | Purpose |
| Save a fact, lesson, decision, or reference (with title, kind, tags) |
| Full-text search via SQLite FTS5 |
| Fetch a single entry's full content + metadata |
| Browse entries, filter by kind / tag / date |
| Add or remove tags on an existing entry |
Storage default: ~/.persistent-kb/kb.sqlite (override via KB_DB).
Related MCP server: server-memory
Why
AI coding agents lose everything between sessions. This server lets your agent save and recall facts across sessions — without sending data to a cloud service.
Install
Requires Python 3.10+.
pip install canola-persistent-kb-mcpOr from source:
pip install git+https://github.com/0x67108864/persistent-kb-mcp.gitConfigure your agent
Claude Code
Add to your ~/.claude/mcp.json (or the project-local equivalent):
{
"mcpServers": {
"persistent-kb": {
"command": "persistent-kb-mcp"
}
}
}Restart Claude Code and the 5 kb_* tools become available.
Codex CLI / Cursor / other MCP-capable runtimes
Each runtime has its own way of registering MCP servers; the command is always persistent-kb-mcp. Refer to your runtime's MCP configuration documentation.
Quickstart
Once configured, try these in your agent:
"Remember that Stripe's standard payout schedule in Japan is 7 days,
domestic card fee is 3.6% + ¥40."
→ agent calls kb_add(title=..., kind="reference", tags="stripe,japan", content=...)
(later, in a new session)
"What did we learn about Stripe payouts in Japan?"
→ agent calls kb_search(query="stripe payout japan")
→ retrieves the saved reference and uses itConfiguration
Env var | Default | Purpose |
|
| DB file location |
Why not Letta / mem0 / OpenAI memory?
Concern | This server | Cloud memory |
Network required | ❌ | ✅ |
API key required | ❌ | ✅ |
Data leaves your machine | ❌ | ✅ |
Vendor lock-in | None (SQLite) | Service-specific |
Cost | Free | Per-token / per-call |
Use this when local-first matters. Use cloud memory when you actually want cross-device sync.
Development
git clone https://github.com/0x67108864/persistent-kb-mcp.git
cd persistent-kb-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e .
python -m persistent_kb_mcp # runs the server on stdioSchema
The SQLite schema is created automatically on first use. It defines:
entries— primary table (id, title, kind, content, timestamps, optionalsuperseded_by)tags— many-to-many between entries and tag stringsentries_fts— FTS5 virtual table for keyword searchrelations— typed links between entries
See src/persistent_kb_mcp/db.py for the DDL.
Roadmap
v0.2 — optional vector embedding for semantic search
v0.3 — export/import for cross-machine sync
v0.4 — time-decay scoring for relevance
Related
The original SKILL.md format version:
canola_oil/skills/persistent-kb— instruction-based, drop-in folder for agentskills.io runtimesAgent Skills standard: agentskills.io
Model Context Protocol: modelcontextprotocol.io
License
MIT — see LICENSE.
Author
canola_oil — https://0x67108864.github.io/
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
- KogniteOAuthdev.kognite
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Persistent memory for AI agents — log and recall conversation context over MCP.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.1 npm1Apache 2.0
- AlicenseAqualityCmaintenanceA local-first MCP server for durable agent memory using SQLite and FTS5, enabling knowledge graph storage, search, and recall for AI agents.201MIT
- AlicenseAqualityCmaintenancePersistent memory MCP server for AI agents, using SQLite with hybrid keyword and semantic search for long-term memory storage.5Do What The F*ck You Want To Public
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives agents persistent memory with namespaced facts, tags, full-text search, and TTL expiry, all running locally on SQLite with zero external dependencies.3MIT