Get the FREE Ultimate OpenClaw Setup Guide →

mcp-memory-libsql

đź§  High-performance persistent memory system for Model Context Protocol (MCP) powered by libSQL. Features vector search, semantic knowledge storage, and efficient relationship management - perfect for AI agents and knowledge graph applications.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio spences10-mcp-memory-libsql npx -y mcp-memory-libsql \
  --env LIBSQL_URL="file:/path/to/database.db" \
  --env LIBSQL_AUTH_TOKEN="<your-auth-token-if-using-remote-libsql>"

How to use

The mcp-memory-libsql server provides a high-performance, persistent memory store backed by libSQL with optimized text search for efficient retrieval of entities, observations, and relationships. It implements the standard MCP memory interface, enabling you to create, update, delete, and search for entities and their observations, as well as manage relations between entities. The server supports both local SQLite databases and remote libSQL endpoints via the LIBSQL_URL environment variable, giving you flexibility for on-disk or remote, scalable storage. To use it, configure an MCP environment to reference this server entry (for example via a configuration like the included JSON snippets) and provide the LIBSQL_URL (and LIBSQL_AUTH_TOKEN for remote databases) as needed. The server exposes capabilities for entity management (create/update, delete, text search with relevance ranking), relation management (create/delete relations, query related entities), and graph exploration, all optimized for LLM-context efficiency.

How to install

Prerequisites:

  • Node.js (recommended LTS) and npm or pnpm installed on your system
  • Access to the internet to fetch npm packages

Installation and setup steps:

  1. Ensure Node.js is installed. Verify: node -v npm -v

  2. Install and run the MCP server using npx (as shown in the configuration example): npx -y mcp-memory-libsql

    This will install the package and start the server with default settings. If you prefer to pass environment variables directly, you can prepend them, e.g.: LIBSQL_URL=file:/path/to/database.db npx -y mcp-memory-libsql

  3. Alternatively, if you maintain a dedicated configuration file (as per the MCP standard), place the following in your MCP config under mcpServers.mcp-memory-libsql: { "command": "npx", "args": ["-y", "mcp-memory-libsql"], "env": { "LIBSQL_URL": "file:/path/to/database.db", "LIBSQL_AUTH_TOKEN": "<token>" } }

  4. If you’re using WSL or a remote environment, ensure paths and shell commands are compatible with your setup (see README’s Claude Desktop/WSL configuration as guidance).

  5. Start your MCP configuration and verify the server comes up and responds to MCP memory interface calls.

Additional notes

Tips and notes:

  • The LIBSQL_URL environment variable controls the database location. For local development, you can use file:/path/to/database.db. For remote libSQL services (e.g., Turso), use libsql://<host> and provide LIBSQL_AUTH_TOKEN.
  • If no LIBSQL_URL is provided, the server defaults to an in-memory database at ./memory-tool.db.
  • When using WSL, prefer Linux-style paths for database files (e.g., /home/username/...).
  • This server exposes typical MCP memory operations: create/update/delete/search entities and observations, and create/delete/explore relations with relevance-ranked text search.
  • If you’re integrating with Claude Desktop or other tools, you can mirror the configuration approaches shown for WSL in the README to ensure compatibility.
  • For publishing and versioning, this project follows npm-based publishing with 2FA (pnpm changeset, etc.).

Related MCP Servers

Sponsor this space

Reach thousands of developers ↗