Skip to content
MCP server

SQLite Local AI Memory

Local SQLite memory for AI assistants with hybrid search and automatic cleanup

Runs locally

SQLite Local AI Memory is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, macOS
Runs
Locally
Version
1.5.3
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add sqlite-local-ai-memory --env GEMINI_API_KEY='<GEMINI_API_KEY>' -- npx -y sqlite-local-ai-memory

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "sqlite-local-ai-memory": {
      "command": "npx",
      "args": [
        "-y",
        "sqlite-local-ai-memory"
      ],
      "env": {
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "sqlite-local-ai-memory": {
      "command": "npx",
      "args": [
        "-y",
        "sqlite-local-ai-memory"
      ],
      "env": {
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "sqlite-local-ai-memory": {
      "command": "npx",
      "args": [
        "-y",
        "sqlite-local-ai-memory"
      ],
      "env": {
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "sqlite-local-ai-memory": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sqlite-local-ai-memory"
      ],
      "env": {
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add sqlite-local-ai-memory --env GEMINI_API_KEY='<GEMINI_API_KEY>' -- npx -y sqlite-local-ai-memory

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.sqlite-local-ai-memory]
command = "npx"
args = ["-y", "sqlite-local-ai-memory"]
env = { GEMINI_API_KEY = "<GEMINI_API_KEY>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "sqlite-local-ai-memory": {
      "command": "npx",
      "args": [
        "-y",
        "sqlite-local-ai-memory"
      ],
      "env": {
        "GEMINI_API_KEY": "<GEMINI_API_KEY>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e GEMINI_API_KEY='<GEMINI_API_KEY>' sqlite-local-ai-memory npx -- -y sqlite-local-ai-memory

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "sqlite-local-ai-memory": {
          "command": "npx",
          "args": [
            "-y",
            "sqlite-local-ai-memory"
          ],
          "env": {
            "GEMINI_API_KEY": "<GEMINI_API_KEY>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • GEMINI_API_KEYGoogle Gemini API key for Out-of-the-Box cloud cognitive agents and embeddings (gemini-2.5-flash-lite & gemini-embedding-001).
  • SQLITE_MEM_PATHOptional custom path to the SQLite database file (defaults to ~/.local-ai-memory/memoria.db).

About SQLite Local AI Memory

Instead of an external vector service, this server keeps an assistant's long-term memory in one SQLite file on your machine, by default ~/.local-ai-memory/memoria.db, with a SQLITE_MEM_PATH variable to move it. It uses full-text search together with int8 vectors, and blends exact keyword matches with semantic results. The README quotes sub-millisecond lookups for active notes.

The design has an active notepad for current work, a knowledge vault for lasting facts, and an AutoDream pass that merges duplicates and archives unresolved cases. A contradiction arbiter marks an old fact as superseded when a newer one conflicts, such as a changed server IP, and a two-layer filter drops small talk before a model is called.

Storage stays local, but the reasoning layer needs a model. The default is the Google Gemini API using a GEMINI_API_KEY, and it can run offline with Ollama instead. With neither, it falls back to plain keyword storage, which the README says loses most of the intelligent features. It can also be used as a Node.js library.

What it does

Single-file memory
All notes and indexes live in one local SQLite database.
Hybrid search
Combines FTS5 keyword search with vector search using reciprocal rank scoring.
AutoDream cleanup
Merges duplicates and archives unresolved cases for later.
Contradiction arbiter
Archives outdated facts when a newer fact conflicts.
Noise filter
Drops casual chatter before invoking larger models.
Gemini or Ollama
Cloud-assisted with Gemini, or fully offline with Ollama.
Offline fallback
Keyword-only storage when no model is available.

Good for

  • Remember project decisions across chat sessions
  • Keep server settings and preferences as updatable facts
  • Resume debugging an unresolved issue weeks later
  • Add persistent memory to a custom Node.js agent

Pricing

Open source

Free to run; Gemini API usage is billed separately if used

More servers for the same service

SQLite Local AI Memory FAQ

Where is my data stored?

In a local SQLite file, by default ~/.local-ai-memory/memoria.db.

Does SQLite Local AI Memory need an API key?

Not strictly; Gemini is the default, Ollama works offline, and without either it falls back to keyword search.

Which clients can use SQLite Local AI Memory?

Any stdio MCP client such as Claude Desktop, Cursor or VS Code.

Is SQLite Local AI Memory free?

Yes. SQLite Local AI Memory is open source, so you can use and self-host it for free.

How do I add SQLite Local AI Memory to Claude Code?

Run this command in your terminal: claude mcp add sqlite-local-ai-memory --env GEMINI_API_KEY='<GEMINI_API_KEY>' -- npx -y sqlite-local-ai-memory

What are the best alternatives to SQLite Local AI Memory?

The closest alternatives to SQLite Local AI Memory are Codebase Memory, XERJ, MCP Toolbox for Databases, Claude Code Ultimate Guide and IWE (iwe.md).

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers