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.
  • typescript

81

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "spences10-mcp-memory-libsql": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-memory-libsql"
      ],
      "env": {
        "LIBSQL_URL": "file:/path/to/your/database.db",
        "LIBSQL_AUTH_TOKEN": "your-auth-token"
      }
    }
  }
}

You run an MCP server that stores and queries entities, their observations, and relationships in a fast, searchable graph. It uses libSQL for persistent storage and offers flexible text search optimized for context used by large language models, along with secure remote access when needed.

How to use

You connect to the MCP memory libsql server from an MCP client to manage entities and relations, perform text searches with relevance ranking, and explore contextual links between items. You can run the server locally with a file-based database or point it at a remote libSQL database for centralized storage. Use an MCP-compatible client to create, update, delete, and search entities and relations, and to query related items. If you are using a remote database, you’ll authenticate with a token to access the remote instance.

Typical usage patterns include: creating entities with observations, linking entities via relations, performing text searches to retrieve relevant entities, and navigating the knowledge graph to understand how items relate. For local development, you run the server with a local database file. For production or shared work, you configure a remote libSQL endpoint and provide authentication tokens as needed.

How to install

Prerequisites: you need Node.js installed on your machine. You may also use a package manager such as npm or pnpm. If you plan to run the server inside Windows Subsystem for Linux (WSL), follow the WSL-specific setup to ensure file paths use the Linux filesystem.

Install and run the MCP server using the npm/npx workflow shown in the examples. The server can run with a local SQLite database or connect to a remote libSQL database.

If you prefer a local, file-based database, you can start the server with a local path to the database file.

Step-by-step commands you can run in your project directory to start the server are provided in the configuration examples below. Choose the path that matches your environment.

Configuration and environment

The server supports both local SQLite databases and remote libSQL databases. You set the database location using LIBSQL_URL. If you don’t provide a URL, it defaults to a memory-backed database file named memory-tool.db in your current directory.

To run with a local SQLite database, set LIBSQL_URL to a file path.

To run with a remote libSQL database (for example Turso), set LIBSQL_URL to the remote URL and provide LIBSQL_AUTH_TOKEN for authentication.

Examples and configurations

{
	"mcpServers": {
		"mcp-memory-libsql": {
			"command": "npx",
			"args": ["-y", "mcp-memory-libsql"],
			"env": {
				"LIBSQL_URL": "file:/path/to/your/database.db"
			}
		}
	}
}
{
	"mcpServers": {
		"mcp-memory-libsql": {
			"command": "wsl.exe",
			"args": [
				"bash",
				"-c",
				"source ~/.nvm/nvm.sh && LIBSQL_URL=file:/path/to/database.db /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-memory-libsql"
			]
		}
	}
}
{
	"env": {
		"LIBSQL_URL": "file:/path/to/database.db"
	}
}
{
	"env": {
		"LIBSQL_URL": "libsql://your-database.turso.io",
		"LIBSQL_AUTH_TOKEN": "your-auth-token"
	}
}

Available tools

entityManagement

Create, update, delete, and search entities; manage observations and explore entity relationships.

relationManagement

Create and delete relations between entities; query related entities.

textSearch

Perform text searches with relevance ranking to quickly locate entities based on name, type, or observations.

knowledgeGraph

Manage a knowledge graph of entities and relations to understand context and connections.

remoteAuth

Support secure token-based authentication for remote libSQL databases.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational