Skip to main content
MCP server CX Codex

sqlite-graph-memory — Claude Code MCP server: how to install

Gives coding agents associative long-term memory over markdown notes. It pairs dense vector retrieval with existing [[wikilinks]] using SQLite and zero external graph databases.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env BRAIN_INDEX_DIR=<BRAIN_INDEX_DIR> --env TURNSTATE_DB=<TURNSTATE_DB> --transport stdio sqlite-graph-memory -- uvx sqlite-graph-memory
Open on GitHub

What sqlite-graph-memory does

The server turns a folder of markdown files, such as an Obsidian vault, into an associative memory store for coding agents. A preprocessing tool called sgm-index splits text into chunks and generates e5-base embeddings. During query execution, the pipeline retrieves entry points via vector similarity, pulls linked notes using [[wikilinks]] syntax up to one hop away, and scores the final context with a cross-encoder.

Graph edges are not stored in dedicated graph infrastructure. The retrieval script inspects links directly from markdown files at query time, capping graph expansion at 40 neighbor documents. Derived turn state persists in a single local SQLite file via Python standard library drivers. The server will not start without setting BRAIN_INDEX_DIR to the location of the precomputed index directory.

It also captures session telemetry via an assistant turn hook. The script parses the end of the conversation transcript and appends summaries, file edits, and tool decisions into SQLite without spending extra model tokens.

What it helps with

  • recall context from personal markdown notes and Obsidian vaults
  • traverse [[wikilinks]] connections without running a graph database
  • rerank associative retrieval results using a local cross-encoder
  • record agent session summaries and tool execution logs into SQLite

Example prompts for the agent

  • Search my notes for project architecture details and linked design specs.
  • Look up Lanternfish in my Obsidian notes and retrieve connected project documents.
  • Check recent agent turn history in the database for decisions made on the schema.

How to install sqlite-graph-memory

Platform CLI

claude mcp add --env BRAIN_INDEX_DIR=<BRAIN_INDEX_DIR> --env TURNSTATE_DB=<TURNSTATE_DB> --transport stdio sqlite-graph-memory -- uvx sqlite-graph-memory

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sqlite-graph-memory <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about sqlite-graph-memory

How do I install sqlite-graph-memory in Claude Code?

Run claude mcp add sqlite-graph-memory -e BRAIN_INDEX_DIR=<BRAIN_INDEX_DIR> -- uvx sqlite-graph-memory. Replace <BRAIN_INDEX_DIR> with the folder path generated by sgm-index.

What does sqlite-graph-memory do?

It provides an associative memory layer over local markdown files. The tool locates entry notes via vector embeddings and pulls linked files through [[wikilinks]], ranking output with a cross-encoder.

Does sqlite-graph-memory require a separate graph database?

No, it operates without external graph services. Edges are parsed straight from note text during search, storing persistent state in a single local SQLite database.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor