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.
Documentation
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:
{
"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
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):
pnpm changeset2. Version the package (updates version and CHANGELOG):
pnpm changeset version3. Publish to npm (will prompt for 2FA code):
pnpm releaseContributing
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
- Powered by libSQL
Frequently asked questions
What is mcp-memory-libsql?
mcp-memory-libsql is ๐ง 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.
How do I install mcp-memory-libsql?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-memory-libsql open source?
Yes โ it is hosted on GitHub at https://github.com/joleyline/mcp-memory-libsql and has 19 stars.
Related MCP tools
๐ Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, ...
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
๐ฆ Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
AI Agents & MCPs & AI Workflow Automation โข (~400 MCP servers for AI agents) โข AI Automation / AI Agent with MCPs โข AI Workflows & AI Agents โข MCPs for AI Ag...
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP