SQLite Local AI Memory logo

SQLite Local AI Memory

Local stdio memory for AI agents using SQLite, hybrid search, fact versioning, and background consolidation.

Install SQLite Local AI Memory

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "sqlite-local-ai-memory": {
      "command": "npx",
      "args": [
        "-y",
        "sqlite-local-ai-memory"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_VALUE_HERE",
        "ORCHESTRATOR_MODEL": "YOUR_VALUE_HERE",
        "OLLAMA_HOST": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y sqlite-local-ai-memory

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked Today.

Overview

SQLite Local AI Memory gives AI assistants persistent memory in a local SQLite file accessed through a stdio MCP server. It stores facts, tracks superseded versions, and searches memories with parallel FTS5 keyword and Int8 vector retrieval, including point-in-time queries. Use it when an agent needs durable project context without a hosted database. Gemini, Ollama, or bare SQLite FTS5 provide different levels of reasoning and search capability.

Use cases

  • Persist project decisions across AI coding sessions
  • Search exact error codes and related technical concepts
  • Track changing configuration values with version history
  • Resume unresolved debugging investigations
  • Consolidate daily work into durable memory

Key features

  • Local SQLite file storage
  • Hybrid FTS5 BM25 and Int8 vector search
  • Fact contradiction auditing and lineage
  • Point-in-time memory queries
  • Active work dashboard and case incubator
  • Gemini, Ollama, and no-model fallback modes

Tools5

What SQLite Local AI Memory lets your agent do. Expand a tool for its parameters.

Self-reported~124 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · sqlite-local-ai-memory (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads1.5kPackage downloads in the last 30 days.
Last commit6d agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed5Callable tools this server registers over MCP.

How SQLite Local AI Memory works

What SQLite Local AI Memory does

SQLite Local AI Memory provides persistent memory for AI assistants through a local stdio MCP server. Memories, indexes, and notes are stored in a SQLite file on the user's computer rather than in a hosted vector database. The system separates immediate working context from longer-lived facts and maintains history when facts change.

Its memory model supports active tasks, decisions, and next steps, alongside durable information such as configuration details and preferences. Fact updates can preserve previous values and record why they were superseded. An incubator holds ongoing investigations so unresolved work can be retained for later consolidation.

How it works

Memory retrieval combines SQLite FTS5 BM25 keyword search with Int8 vector search. Keyword search is suited to exact identifiers, addresses, variable names, and error codes; vector search is intended to find related concepts expressed with different wording. Results are combined with reciprocal-rank scoring. Search also supports retrospective, point-in-time queries.

The consolidate operation runs the AutoDream maintenance cycle. It synthesizes daily progress, organizes active work, and can preserve unresolved investigations with an [UNRESOLVED_CASE] tag. Contradiction handling can archive an older fact and mark a newer value as active, while lineage retrieval exposes the fact's version history and supersede reasons.

The reasoning layer has three operating modes. Gemini can provide cloud-assisted organization and structured reasoning. Ollama can run the model and embedding components locally with qwen2.5-coder and nomic-embed-text. Without either option, the system falls back to local SQLite FTS5 storage and keyword search, but loses model-dependent filtering, contradiction arbitration, entity extraction, semantic search, and AutoDream consolidation.

Setup and configuration

The MCP configuration can launch the package with npx and pass environment variables through the client configuration:

config.json
{
  "mcpServers": {
    "sqlite-memory": {
      "command": "npx",
      "args": ["-y", "sqlite-local-ai-memory"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

For an Ollama-backed setup, configure ORCHESTRATOR_MODEL with an Ollama model such as ollama/qwen2.5:1.5b and set OLLAMA_HOST to the Ollama service address. The server can also operate without API keys or Ollama, using its bare SQLite fallback.

Tools and capabilities

  • save_fact stores an atomic fact and performs collision or contradiction auditing.
  • search_memory runs hybrid FTS5 BM25 and Int8 vector retrieval, with point-in-time queries.
  • get_fact_lineage reconstructs a fact's versions, changes, and supersede reasons.
  • get_current_state reads the live working-memory dashboard and active incubator cases.
  • consolidate performs background memory maintenance and daily progress synthesis.
  • Local storage keeps the database, notes, and indexes in one SQLite file.

Limitations and notes

Model-dependent features require Gemini or Ollama. The no-model fallback remains usable for direct fact storage and local keyword search, but it does not provide the intelligent organization and semantic retrieval available with a model. Cloud-assisted mode sends reasoning work to Gemini, while Ollama supports an offline operating mode on local hardware.

The server is intended for local stdio use. Its documented MCP examples target Claude Desktop, Cursor, and VS Code. A client instruction set is recommended so an agent knows when to load current state, search before claiming it has forgotten information, save important decisions, and consolidate at session end.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about SQLite Local AI Memory

SQLite Local AI Memory is an MCP server that connects AI assistants to a local SQLite memory file through stdio. Its main tools save facts, search memories with keyword and vector retrieval, inspect fact lineage, read current working state, and consolidate ongoing work. It supports Gemini, Ollama, and a local FTS5 fallback.

Launch it with npx in your MCP client's server configuration, using the package name `sqlite-local-ai-memory` as the command argument. Add `GEMINI_API_KEY` for Gemini-backed operation, or configure the Ollama variables for local model execution.

Yes, the documented MCP setup includes Cursor. Add the server to `.cursor/mcp.json`, launch it with `npx`, and provide the model configuration you want to use.

Yes, it can fall back to SQLite FTS5 keyword storage when no API key is supplied and Ollama is unavailable. Model-dependent features such as semantic vector search, contradiction arbitration, intelligent filtering, and AutoDream consolidation are then unavailable.

Yes, Ollama provides a local operating mode. Configure an Ollama orchestrator model and `OLLAMA_HOST`; the documented setup uses `qwen2.5-coder` with `nomic-embed-text` for local reasoning and embeddings.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSQLite Local AI Memory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sqlite-local-ai-memory?style=directory)](https://allmcps.com/mcp/sqlite-local-ai-memory)
HTML Embed
<a href="https://allmcps.com/mcp/sqlite-local-ai-memory"><img src="https://allmcps.com/api/badge/sqlite-local-ai-memory?style=directory" alt="SQLite Local AI Memory on AllMCPs" /></a>