MCP Memory LibSQL

by joleyline

Integrations

  • Supports local SQLite databases for persistent storage of entities, relations, and vector embeddings

  • Supports remote libSQL databases like Turso for persistent storage of entities, relations, and vector embeddings

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 changeset
  1. Version the package (updates version and CHANGELOG):
pnpm changeset version
  1. 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

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A high-performance, persistent memory system for the Model Context Protocol (MCP) providing vector search capabilities and efficient knowledge storage using libSQL as the backing store.

  1. Features
    1. Configuration
      1. Cline Configuration
      2. Claude Desktop with WSL Configuration
      3. Database Configuration
    2. API
      1. Architecture
        1. Development
          1. Publishing
        2. Contributing
          1. License
            1. Acknowledgments

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A high-performance MCP server utilizing libSQL for persistent memory and vector search capabilities, enabling efficient entity management and semantic knowledge storage.
                Last updated -
                6
                64
                51
                TypeScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server providing vector database capabilities through Chroma, enabling semantic document search, metadata filtering, and document management with persistent storage.
                Last updated -
                17
                Python
                MIT License
                • Apple
                • Linux
              • -
                security
                F
                license
                -
                quality
                Enables efficient vector database operations for embedding storage and similarity search through a Model Context Protocol interface.
                Last updated -
                3
                Python
              • -
                security
                F
                license
                -
                quality
                Model Context Protocol (MCP) server implementation for semantic search and memory management using TxtAI. This server provides a robust API for storing, retrieving, and managing text-based memories with semantic search capabilities. You can use Claude and Cline AI Also
                Last updated -
                4
                Python
                • Apple

              View all related MCP servers

              ID: x61nj65niz