mnemosyne-sqlite — Architecture
The @mnemosyne/sqlite package is a stdio-launched MCP server providing project-local knowledge storage backed by SQLite. It implements the persistent KV + vector tiers consulted by @mnemosyne/core.
Responsibilities
- Expose a Model Context Protocol (stdio) server with memory store/search/recall tools
- Persist knowledge items to a local SQLite database file (default
./mnemosyne-knowledge.db) - Provide the vector store + persistence layer used by the persistent tier of
@mnemosyne/core
Key Components
| File | Role |
|---|---|
src/index.ts | Process entrypoint — boots the MCP server over stdio |
src/server.ts | MCP server definition + tool handlers (list_tools, call_tool) |
src/sqlite-persistence-layer.ts | SQLite-backed KV persistence for knowledge items |
src/sqlite-vector-store.ts | SQLite-backed vector store for semantic recall |
Dependencies
@modelcontextprotocol/sdkbetter-sqlite3(or equivalent SQLite driver)
Data Flow
agent loop (loop-host) ↓ MCP stdio → mnemosyne-sqlite server ↓ tools: store_memory / search_memory / recall_memory ↓ SQLite DB file (local to the host)The DB path is configurable via MNEMOSYNE_DB_PATH.