# @pepk/mcp-memory-sqlite [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/Daichi-Kudo/mcp-memory-sqlite  
**GitHub Stars:** 4  
**npm Downloads (last month):** 682  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pepk-mcp-memory-sqlite

## Description
Production-ready MCP memory server with SQLite WAL for thread-safe concurrent access. Drop-in replacement for @modelcontextprotocol/server-memory. Prevents race conditions and data loss in multi-session AI agent environments. ACID-compliant knowledge grap

## Tools
Capabilities this server exposes over MCP:

- **create_entities** — Create multiple new entities in the knowledge graph
- **create_relations** — Create multiple new relations between entities in the knowledge graph. Relations should be in active voice
- **add_observations** — Add new observations to existing entities in the knowledge graph
- **delete_entities** — Delete multiple entities and their associated relations from the knowledge graph
- **delete_observations** — Delete specific observations from entities in the knowledge graph
- **delete_relations** — Delete multiple relations from the knowledge graph
- **read_graph** — Read the entire knowledge graph
- **search_nodes** — Search for nodes in the knowledge graph based on a query
- **open_nodes** — Open specific nodes in the knowledge graph by their names

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-memory-sqlite": {
    "command": "npx",
    "args": ["-y","@pepk/mcp-memory-sqlite"],
    "env": {
      "MEMORY_DB_PATH": ""
    }
  }
}
```

**Requires environment variables:** `MEMORY_DB_PATH` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What @pepk/mcp-memory-sqlite does

@pepk/mcp-memory-sqlite stores structured memory in a SQLite database and exposes it through the Model Context Protocol. Its data model is a knowledge graph made up of entities, observations attached to entities, and directed relations between entities.

The package is intended as a drop-in replacement for `@modelcontextprotocol/server-memory`. It is suitable for shared project context, conversation preferences, agent notes, and other facts that need to persist across sessions. SQLite provides indexed queries and transactional updates instead of relying on an unlocked JSONL file.

## How it works

The server uses SQLite in Write-Ahead Logging mode. WAL permits reads while a write is in progress and supports multiple processes accessing the same database. SQLite transactions protect updates, while a five-second busy timeout retries lock contention before reporting an error.

Start the package as an MCP stdio process with `npx`, or install it locally or globally and invoke the installed command. The configured database path determines where memory is persisted. If no path is configured, the server uses `./memory.db` in the package directory.

## Setup and configuration

Install the package with npm:

```bash
npm install @pepk/mcp-memory-sqlite
```

For a one-off launch, use:

```bash
npx @pepk/mcp-memory-sqlite
```

Set `MEMORY_DB_PATH` to the SQLite file that should contain the graph. A Claude Desktop configuration can launch the server like this:

```json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["@pepk/mcp-memory-sqlite"],
      "env": {
        "MEMORY_DB_PATH": "/path/to/your/memory.db"
      }
    }
  }
}
```

Claude Code uses the same command and environment setting, with the server entry placed in `~/.claude.json`. The package requires Node.js 20 or newer.

## Tools and capabilities

Entity operations include `create_entities`, `delete_entities`, and `open_nodes`. Entities have a unique name, an `entityType`, and a list of observations.

Observation tools are `add_observations` and `delete_observations`, allowing facts to be appended to or removed from existing entities. Relations can be created and removed with `create_relations` and `delete_relations`; each relation identifies a source, destination, and relation type.

For retrieval, `read_graph` returns the complete graph and `search_nodes` searches entity names, types, and observation content. These operations support use cases such as looking up project components, retrieving user preferences, or finding facts related to a topic.

## Limitations and notes

The database is not encrypted at rest. Avoid storing API keys, passwords, or personally identifiable information that requires encryption. Protect the SQLite file and its containing directory with restrictive filesystem permissions.

Use a local filesystem for `MEMORY_DB_PATH`; network drives can cause locking problems. If a process holds a write lock longer than the five-second timeout, the server can report a database-locked error. Multiple Claude Desktop windows can share one database, with WAL handling concurrent access.

_Full upstream README: https://allmcps.com/mcp/pepk-mcp-memory-sqlite/readme_

