Get the FREE Ultimate OpenClaw Setup Guide →

mcp-memory-sqlite

SQLite-based MCP memory server with WAL mode for concurrent access. Drop-in replacement for @modelcontextprotocol/server-memory

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio daichi-kudo-mcp-memory-sqlite npx @pepk/mcp-memory-sqlite \
  --env MEMORY_DB_PATH="./memory.db"

How to use

This MCP server provides a drop-in replacement memory store built on SQLite with WAL mode to enable thread-safe concurrent access for MCP-based applications. It exposes the standard Knowledge Graph API used by the MCP ecosystem, including tools to create and manage entities, observations, relations, and to perform queries over the memory graph. Start it via npx (or install globally) and point the server to a local SQLite file using MEMORY_DB_PATH. Once running, you can interact with the server using the provided tools such as create_entities, add_observations, create_relations, open_nodes, read_graph, and search_nodes to build and query a knowledge graph shared across agents or sessions.

Available capabilities include:

  • Entity management: create_entities, delete_entities, open_nodes
  • Observation management: add_observations, delete_observations
  • Relation management: create_relations, delete_relations
  • Query operations: read_graph, search_nodes These tools let you build a knowledge graph with entities, their observations, and the relations between them, and to retrieve or search the graph efficiently. The server uses SQLite with WAL to support high-concurrency reads and safe writes, making it suitable for multi-agent workflows and Claude-based environments.

How to install

Prerequisites:

  • Node.js v20 or newer installed on your system
  • npm (comes with Node.js) or pnpm/yarn as preferred

Installation steps:

  1. Ensure Node.js is installed
    • Verify: node -v
  2. Install the MCP memory SQLite package (local install) or use npx to run directly without installation
    • Local installation (optional): npm install @pepk/mcp-memory-sqlite
    • Global/npx approach (recommended for quick start): npx @pepk/mcp-memory-sqlite
  3. Run the server with the MCP configuration
    • If using the provided mcp_config, start by invoking the command specified (npx @pepk/mcp-memory-sqlite) and ensure MEMORY_DB_PATH points to your desired SQLite file.

Additional tips:

  • You can customize MEMORY_DB_PATH via environment variables to store the database outside the project directory.
  • If you modify the configuration, ensure the environment variables and paths are accessible to the process that launches the server.

Additional notes

Tips and common considerations:

  • MEMORY_DB_PATH controls where the SQLite database is stored. Ensure the directory is writable by the running process.
  • WAL mode enables concurrent reads; writes are protected by 5-second timeouts with automatic retries as described in the documentation. If you encounter a database locked error, verify no other process is holding the lock and that MEMORY_DB_PATH is local and accessible.
  • The package is a drop-in replacement for server-memory; APIs and tools are designed to be API-compatible with existing MCP memory servers.
  • If you’re deploying in a multi-user or multi-agent environment, ensure proper file permissions and consider a dedicated directory for the database to avoid permission issues.

Related MCP Servers

Sponsor this space

Reach thousands of developers