Skip to content
MCP server

sqlite-graph-memory

Search your markdown notes by meaning and by their [[wikilinks]], all in local SQLite

Runs locallyActively maintained

The repository was last updated yesterday and is published under MIT.

sqlite-graph-memory is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, macOS, Linux
Runs
Locally
GitHub stars
18
Last commit
Language
Python

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add sqlite-graph-memory --env BRAIN_INDEX_DIR='<BRAIN_INDEX_DIR>' -- uvx sqlite-graph-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-graph-memory": {
      "command": "uvx",
      "args": [
        "sqlite-graph-memory"
      ],
      "env": {
        "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "sqlite-graph-memory": {
      "command": "uvx",
      "args": [
        "sqlite-graph-memory"
      ],
      "env": {
        "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
      }
    }
  }
}

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

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "sqlite-graph-memory": {
      "command": "uvx",
      "args": [
        "sqlite-graph-memory"
      ],
      "env": {
        "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
      }
    }
  }
}

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

Cursor setup guide

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

{
  "mcpServers": {
    "sqlite-graph-memory": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sqlite-graph-memory"
      ],
      "env": {
        "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
      }
    }
  }
}

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-graph-memory --env BRAIN_INDEX_DIR='<BRAIN_INDEX_DIR>' -- uvx sqlite-graph-memory

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.sqlite-graph-memory]
command = "uvx"
args = ["sqlite-graph-memory"]
env = { BRAIN_INDEX_DIR = "<BRAIN_INDEX_DIR>" }

Codex setup guide

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

{
  "mcpServers": {
    "sqlite-graph-memory": {
      "command": "uvx",
      "args": [
        "sqlite-graph-memory"
      ],
      "env": {
        "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "sqlite-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e BRAIN_INDEX_DIR='<BRAIN_INDEX_DIR>' sqlite-graph-memory uvx -- sqlite-graph-memory

    Antigravity

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

    {
      "mcpServers": {
        "sqlite-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

    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-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

    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-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

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

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "sqlite-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

    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-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

    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-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

    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-graph-memory": {
          "command": "uvx",
          "args": [
            "sqlite-graph-memory"
          ],
          "env": {
            "BRAIN_INDEX_DIR": "<BRAIN_INDEX_DIR>"
          }
        }
      }
    }

    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

  • BRAIN_INDEX_DIRDirectory holding the index. Build it once with `sgm-index /path/to/notes`.Required
  • TURNSTATE_DBSQLite file for recall telemetry.

About sqlite-graph-memory

This server gives a coding assistant recall over a folder of markdown notes, such as an Obsidian vault. Search combines vector similarity with the links between notes, so a question that never names a note can still reach it through a [[wikilink]]. The ask command prints two lists, direct memory and associative memory, and marks notes found only through a link.

You build an index once with sgm-index, which downloads about 1.1 GB of search models on first use and re-embeds only new or changed notes afterward. The [lite] install uses ONNX Runtime instead of PyTorch, and no account, API key or token is needed. The index folder is set with BRAIN_INDEX_DIR.

The README warns that recalled fragments become part of the chat and so reach your client's model provider, and it includes a section written for an AI agent to perform setup with the human's approval. Optional settings cover recall timeout, reranking and a turn-ledger SQLite file.

What it does

Link-aware recall
Follows [[wikilinks]] to find related notes that a plain similarity search misses.
Direct and associative lists
sgm-ask --ab prints both result lists and flags link-only finds.
Incremental indexing
Re-running sgm-index embeds only new or changed notes; --full forces a rebuild.
Lightweight install
The [lite] option avoids PyTorch; a GPU option exists.
No account needed
Runs locally with no API key or token.
Doctor command
sgm-doctor checks the setup and ends with All good when healthy.

Good for

  • Give Claude Code memory of an Obsidian vault
  • Surface a related note through a link when the question doesn't name it
  • Search personal project notes from Cursor or Codex
  • Compare plain and link-based recall with the A/B mode

Pricing

Open source

Free to install from PyPI; no account needed

More servers for the same service

sqlite-graph-memory FAQ

What does setup need?

Python 3.12 is the tested choice, plus about 1.3 GB of disk: roughly 155 MB of software and 1.1 GB of models.

Does sqlite-graph-memory need an API key?

No account, API key or token is needed.

Is there a privacy caveat?

Yes. Recalled fragments become part of the chat, so they reach your client's model provider.

Which clients are documented?

Claude Code, Codex, Cursor, Claude Desktop, Zed, Windsurf and VS Code.

Which environment variable is required?

BRAIN_INDEX_DIR, the absolute path of the folder sgm-index wrote.

Is sqlite-graph-memory free?

Yes. sqlite-graph-memory is open source, so you can use and self-host it for free.

How do I add sqlite-graph-memory to Claude Code?

Run this command in your terminal: claude mcp add sqlite-graph-memory --env BRAIN_INDEX_DIR='<BRAIN_INDEX_DIR>' -- uvx sqlite-graph-memory

What are the best alternatives to sqlite-graph-memory?

The closest alternatives to sqlite-graph-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