Store, search, and manage persistent agent memories via knol-local MCP (npx)
How do I give an AI agent persistent, searchable memory that survives across sessions — without requiring any external service, API key, or cloud database? The memory should support full-text search, tagging, importance scoring, and CRUD operations. Ideal for agents that need to remember user preferences, project context, and decisions across conversations.
knol-local — local SQLite+FTS5 memory for AI agents
Package: knol-local v0.4.10 on npm Transport: stdio Requires: Node.js 22+ (uses node:sqlite built-in) Auth: None Install: npm install --ignore-scripts knol-local @modelcontextprotocol/sdk (the postinstall patches Claude/Cursor configs — skip with --ignore-scripts for server-only use)
What it does
knol-local gives your agent a local SQLite database with FTS5 full-text search for persistent memory. Unlike @modelcontextprotocol/server-memory (which uses a knowledge graph with entities and relations), knol-local stores flat text memories with tags, importance scores, and full-text search — closer to how humans actually remember things.
7 tools
| Tool | Purpose |
|---|---|
remember | Store text with optional tags (string[]) and importance (0–1) |
recall | Full-text search across all memories, ranked by relevance × importance |
forget | Delete a memory by UUID |
update_memory | Edit content, tags, or importance of existing memory |
list_memories | List recent memories, optionally filtered by tags |
memory_stats | Total count, oldest/newest timestamps |
capture_session | Extract and store key facts from a conversation summary (LLM-assisted if API key set, else stores as-is) |
Setup
{
"mcpServers": {
"knol-local": {
"command": "npx",
"args": ["-y", "knol-local"],
"env": {
"KNOL_LOCAL_DB": "/path/to/custom.db"
}
}
}
}KNOL_LOCAL_DB is optional — defaults to a platform-appropriate app-data directory.
Recipe: store a fact, search for it, check stats
Step 1 — remember:
{"method":"tools/call","params":{"name":"remember","arguments":{"content":"The tani.ai registry uses D1 (Cloudflare) as its primary database and ranks MCP surfaces by computed invocation trust.","tags":["tani","architecture","database"],"importance":0.9}}}Returns the memory UUID and full record.
Step 2 — recall (full-text search):
{"method":"tools/call","params":{"name":"recall","arguments":{"query":"tani database architecture"}}}Returns ranked results with relevance scores.
Step 3 — memory_stats:
{"method":"tools/call","params":{"name":"memory_stats","arguments":{}}}Returns total count and date range.
Key differences from @modelcontextprotocol/server-memory
- Flat text vs entity-relation graph — simpler mental model, no dangling-edge bugs
- FTS5 full-text search — real relevance ranking, not just string matching
- Importance scores — agent can prioritize critical facts
- Tags — lightweight categorization without rigid schema
- Session capture — bulk-extract memories from a conversation summary
- SQLite-backed — single file, zero config, survives restarts
Gotchas
- Node.js 22+ required — uses
node:sqlite(built-in). On Node < 22.5, the postinstall script auto-installsbetter-sqlite3as fallback. - Recall scores can be negative — FTS5 BM25 scores are inverted (more negative = more relevant). Don't filter on
score > 0. - No encryption — memories are stored in plaintext SQLite. Don't store secrets.
- capture_session is best-effort — without an LLM API key, it stores the raw summary as a single memory instead of extracting structured facts.
{ "server": "knol-local v0.4.10", "transport": "stdio", "node_version": "v22.22.3", "handshake": { "initialize": { "request": { "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "pathfinder", "version": "1.0.0" } } }, "response": { "protocolVersion": "2024-11-05", "capabilities": { "tools": {}, "resources": {}, "prompts": {} }, "serverInfo": { "name": "knol-local", "version": "0.4.10" } } } }, "tools_count": 7, "tool_calls": [ { "step": "remember", "request": { "name": "remember", "arguments": { "content": "The tani.ai registry uses D1 (Cloudflare) as its primary database and ranks MCP surfaces by computed invocation trust.", "tags": ["tani", "architecture", "database"], "importance": 0.9 } }, "response": { "stored": true, "id": "680b3c8c-7994-4562-8cbe-c813328d5525", "memory": { "id": "680b3c8c-7994-4562-8cbe-c813328d5525", "content": "The tani.ai registry uses D1 (Cloudflare) as its primary database and ranks MCP surfaces by computed invocation trust.", "tags": ["tani", "architecture", "database"], "importance": 0.9, "created_at": 1781230511594, "updated_at": 1781230511594, "metadata": {} } } }, { "step": "recall", "request": { "name": "recall", "arguments": { "query": "tani database architecture" } }, "response": { "found": 1, "memories": [ { "id": "680b3c8c-7994-4562-8cbe-c813328d5525", "content": "The tani.ai registry uses D1 (Cloudflare) as its primary database and ranks MCP surfaces by computed invocation trust.", "tags": ["tani", "architecture", "database"], "importance": 0.9, "created_at": 1781230511594, "updated_at": 1781230511594, "metadata": {}, "score": -0.0000037499999999999997 } ] } }, { "step": "memory_stats", "request": { "name": "memory_stats", "arguments": {} }, "response": { "total_memories": 1, "oldest": "2026-06-12T02:15:11.594Z", "newest": "2026-06-12T02:15:11.594Z" } } ], "all_calls_succeeded": true, "executed_at": "2026-06-12T02:15:11Z" }