memory-libsql MCP server
Commit Nov 11, 2026Stores persistent entities, relations, and observations in a local or remote libSQL database and lets an AI client search them by relevance.
Also known as spences10/mcp-memory-libsql
- Stars
- 87
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 11, 2026
- License
- MIT
What is memory-libsql MCP?
memory-libsql stores persistent entities, relations, and observations in a local or remote libSQL database and lets an AI client search them by relevance.
Summary generated from the project's README
About memory-libsql MCP server
Keeping a knowledge graph of entities, relations and observations available to an AI client across sessions is the job mcp-memory-libsql handles. It implements the standard MCP memory interface on top of a libSQL database, storing entities with their observations and the relations between them, and letting the client search that stored material by text with relevance ranking. Results are ranked by where the match falls, with name weighted above type and above observation, and fuzzy matching is supported. The project describes itself as context-optimized for LLM efficiency.
It runs as a local process launched through an MCP configuration, for example with npx and the mcp-memory-libsql package. The database location comes from the LIBSQL_URL environment variable, which can point at a local file path or at a remote libSQL database such as Turso; remote databases also take a LIBSQL_AUTH_TOKEN for token-based authentication. With no URL set it falls back to file:/memory-tool.db in the current directory. Setup examples cover Cline and Claude Desktop running under WSL, where the path must use the Linux filesystem format.
Through the memory interface a client can create or update entities with observations, delete entities, search by text, explore entity relationships, create and delete relations, and query related entities. Data is held in entities, observations and relations tables with timestamps.
What you can do with it
- 1Recall prior project decisionsHave the assistant search stored entities to bring back observations recorded about a project in an earlier session.
- 2Store and link conceptsAsk the client to record a new entity with observations and connect it to existing entities through relations.
- 3Trace a relationship graphQuery the client for entities related to a given one when working out how stored concepts connect.
- 4Find entries by fuzzy matchLook up a remembered item by an approximate name and rely on ranked results when exact spelling is uncertain.
- 5Share memory across machinesPoint the server at a remote libSQL database with an auth token so more than one setup reads the same memory store.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
LIBSQL_AUTH_TOKENLIBSQL_URL
| Name | Description | |
|---|---|---|
| LIBSQL_AUTH_TOKEN | — | |
| LIBSQL_URL | — |
Automated checks
Ran Nov 13, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablespences10/mcp-memory-libsql is public and reachablegithub.com/spences10/mcp-memory-libsql ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-11github.com/spences10/mcp-memory-libsql ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubmcp-memory-libsql
A high-performance, persistent memory system for the Model Context Protocol (MCP) powered by libSQL with optimized text search for LLM context efficiency.
Features
- 🚀 High-performance text search with relevance ranking
- 💾 Persistent storage of entities and relations
- 🔍 Flexible text search with fuzzy matching
- 🎯 Context-optimized for LLM efficiency
- 🔄 Knowledge graph management
- 🌐 Compatible with local and remote libSQL databases
- 🔒 Secure token-based authentication for remote databases
Configuration
This server is designed to be used as part of an MCP configuration. Here are examples for different environments:
Cline Configuration
Add this to your Cline MCP settings:
{
"mcpServers": {
"mcp-memory-libsql": {
"command": "npx",
"args": ["-y", "mcp-memory-libsql"],
"env": {
"LIBSQL_URL": "file:/path/to/your/database.db"
}
}
}
}
Claude Desktop with WSL Configuration
For a detailed guide on setting up this server with Claude Desktop in WSL, see Getting MCP Server Working with Claude Desktop in WSL.
Add this to your Claude Desktop configuration for WSL environments:
{
"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"
]
}
}
}
Database Configuration
The server supports both local SQLite and remote libSQL databases through the LIBSQL_URL environment variable:
For local SQLite databases:
{
"env": {
"LIBSQL_URL": "file:/path/to/database.db"
}
}
For remote libSQL databases (e.g., Turso):
{
"env": {
"LIBSQL_URL": "libsql://your-database.turso.io",
"LIBSQL_AUTH_TOKEN": "your-auth-token"
}
}
Note: When using WSL, ensure the database path uses the Linux
filesystem format (e.g., /home/username/...) rather than Windows
format.
By default, if no URL is provided, it will use file:/memory-tool.db
in the current directory.
API
The server implements the standard MCP memory interface with optimized text search:
- Entity Management
- Create/Update entities with observations
- Delete entities
- Search entities by text with relevance ranking
- Explore entity relationships
- Relation Management
- Create relations between entities
- Delete relations
- Query related entities
Architecture
The server uses a libSQL database with the following schema:
- Entities table: Stores entity information with timestamps
- Observations table: Stores entity observations
- Relations table: Stores relationships between entities
- Text search with relevance ranking (name > type > observation)
Development
Publishing
Due to npm 2FA requirements, publishing needs to be done manually:
- Create a changeset (documents your changes):
pnpm changeset
- Version the package (updates version and CHANGELOG):
pnpm changeset version
- Publish to npm (will prompt for 2FA code):
pnpm release
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
License
MIT License - see the LICENSE file for details.
Acknowledgments
- Built on the Model Context Protocol
- Powered by libSQL
memory-libsql MCP questions
Where does mcp-memory-libsql store its data?
It stores data in a libSQL database, which can be a local SQLite file or a remote libSQL/Turso database. By default it uses file:/memory-tool.db in the current directory.
How do I connect to a remote Turso database?
Set LIBSQL_URL to your libsql:// URL and provide LIBSQL_AUTH_TOKEN with your auth token.
What environment variable configures the database URL?
The LIBSQL_URL environment variable sets the database location for local or remote libSQL databases.
What operations does the server support on entities and relations?
It can create, update, delete, and search entities, manage observations, and create, delete, or query relations between entities.
How does text search rank results?
Search results are ranked by relevance with entity name ranked above type and observations, and fuzzy matching is supported.