memory libsql.com
memory libsql.com logo

Memory LibSQL

High-performance persistent memory system for Model Context Protocol (MCP) powered by libSQL

Created byApr 23, 2025

mcp-memory-libsql

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.

Features

  • 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

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:

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](https://scottspence.com/posts/getting-mcp-server-working-with-claude-desktop-in-wsl).
Add this to your Claude Desktop configuration for WSL environments:

Database Configuration

The server supports both local SQLite and remote libSQL databases through the LIBSQL_URL environment variable:
For local SQLite databases:
For remote libSQL databases (e.g., Turso):
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 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

Architecture

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

Development

Publishing

Due to npm 2FA requirements, publishing needs to be done manually:
  1. Create a changeset (documents your changes):
  1. Version the package (updates version and CHANGELOG):
  1. Publish to npm (will prompt for 2FA code):

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

License

MIT License - see the [LICENSE](LICENSE) file for details.

Acknowledgments

  • Built on the [Model Context Protocol](https://github.com/modelcontextprotocol)
  • Powered by [libSQL](https://github.com/tursodatabase/libsql)