A high-performance, persistent memory system for the Model Context Protocol (MCP) powered by libSQL. This server provides vector search capabilities and efficient knowledge storage using libSQL as the backing store.
- π High-performance vector search using libSQL
- πΎ Persistent storage of entities and relations
- π Semantic search capabilities
- π Knowledge graph management
- π Compatible with local and remote libSQL databases
- π Secure token-based authentication for remote databases
This server is designed to be used as part of an MCP configuration. Here are examples for different environments:
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"
}
}
}
}
For a detailed guide on setting up this server with Claude Desktop in
WSL, see
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"
]
}
}
}
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.
The server implements the standard MCP memory interface with additional vector search capabilities:
- Entity Management
- Create/Update entities with embeddings
- Delete entities
- Search entities by similarity
- Relation Management
- Create relations between entities
- Delete relations
- Query related entities
The server uses a libSQL database with the following schema:
- Entities table: Stores entity information and embeddings
- Relations table: Stores relationships between entities
- Vector search capabilities implemented using libSQL's built-in vector operations
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
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
MIT License - see the LICENSE file for details.
- Built on the Model Context Protocol
- Powered by libSQL