MCP for SQLite: The 5 Best Options in 2026
2026-08-18 · by bixzell
MCP for SQLite: The 5 Best Options in 2026
SQLite is the quiet backbone of the MCP ecosystem — but it appears in two main roles: code indexes and agent memory stores. The right MCP for SQLite depends entirely on which role you need.
Before the list, a finding from the data: in the current MCP snapshot, the servers that store data in SQLite (code indexes, agent memory) are mature and heavily starred, while MCP servers that query a live SQLite database are still rare. That gap is real — and it shapes the recommendations below.
The 5 best options
1. DeusData/codebase-memory-mcp — SQLite as a code knowledge graph
The highest-starred MCP server in the ecosystem uses SQLite under the hood. It indexes your codebase into a persistent knowledge graph — 158 languages, symbol-level answers in sub-ms, 99% fewer tokens than dumping files into context — shipped as a single static binary with zero dependencies.
- Stars: 39,291⭐
- Role: code index stored locally in SQLite
- Best for: agents that need to understand large unfamiliar codebases
See the setup guide or the alternatives page.
2. Cranot/roam-code — local code intelligence on SQL
Roam-code is a local codebase intelligence CLI plus MCP server for coding agents, built around a SQL-backed code graph. It’s a leaner, more inspectable option than the heavyweight knowledge-graph servers — you get fast local indexing and queries with fewer moving parts.
- Stars: 508⭐
- Role: code index stored in SQL
- Best for: single-developer repos where you want transparency into the index
3. buildingjoshbetter/TrueMemory — everything in one SQLite file
TrueMemory is a memory layer that runs fully local on a single SQLite file — zero cloud, one file. It does automatic capture and automatic recall, and works with Claude Code, Cursor, Codex, and Gemini CLI. For a no-frills, portable “memory that just lives in one file,” this is the cleanest option.
- Stars: 373⭐
- Role: agent memory stored in one SQLite file
- Best for: privacy-first, portable, zero-cloud memory
4. Lyellr88/marm-memory — three memory types fused in SQLite
Marm-memory is a local-first 3-in-1 memory layer and MCP server that fuses session history, codebase indexing, and concept graphs — all in SQLite. It’s the most feature-dense option here, and supports multi-agent swarms across Claude Code, Codex, Grok, Gemini, VS Code, and Cursor.
- Stars: 334⭐
- Role: fused memory layer on SQLite
- Best for: wanting code + chat + concept memory in one system
5. oleksiijko/pmb — BM25 + SQLite memory for coding agents
Pmb is a local-first persistent memory layer for coding agents — Claude Code, Cursor, and more — pairing SQLite storage with BM25 full-text retrieval. It slots in as the lightweight option when you want fast recall of what you’ve worked on without the feature weight of a full graph memory system.
- Stars: 289⭐
- Role: BM25 + SQLite agent memory
- Best for: fast full-text recall with minimal setup
Why MCP for live SQLite querying is still wide open
All five options use SQLite as a storage layer for code indexes and agent memory. If what you actually want is “let my agent run SQL against my SQLite database,” the pickings are thin — the direct-query direction has almost no mature players in the snapshot, which is exactly why it’s a worthwhile gap to watch (or fill).
If you’re thinking of building your own, the path is shorter than you think: write an MCP server in Python, wrap your SQLite connection with a couple of query tools, and you have a server that none of the big directories cover. Start from the FastMCP review if you want the least boilerplate.
The decision tree
- Your agent can’t navigate your codebase → codebase-memory-mcp or roam-code
- Your agent forgets context between sessions → TrueMemory, marm-memory, or pmb
- You want the agent to query a live SQLite database → build your own (the gap is real, see above)
- Everything must live in one local file, zero cloud → TrueMemory
If you’re comparing SQLite-based memory servers against the broader agent-memory space, our best MCP servers for RAG guide covers the memory category in full.