Skip to main content
Glama
mcp-memory-libsql

mcp-memory-libsql

by spences10

mcp-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

Related MCP server: dragon-brain

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:

  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

Available Tools

6 tools
create_entitiesB

Create new entities with observations and optional embeddings

Inputs: entities (required).

create_relationsC

Create relations between entities

Inputs: relations (required).

delete_entityA

Delete an entity and all its associated data (observations and relations)

Inputs: name (required).

delete_relationC

Delete a specific relation between entities

Inputs: source (required), target (required), type (required).

read_graphB

Get recent entities and their relations

Inputs: no named parameters.

search_nodesC

Search for entities and their relations using text or vector similarity

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose: create_entities and create_relations handle creation of different data types, delete_entity and delete_relation handle deletion of different data types, read_graph retrieves recent data, and search_nodes performs searches. There is no overlap or ambiguity between these functions.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern using snake_case: create_entities, create_relations, delete_entity, delete_relation, read_graph, and search_nodes. The naming is predictable and uniform throughout the set.

    Tool Count5/5

    With 6 tools, this server is well-scoped for a memory/graph database system. Each tool serves a clear and necessary function (create, delete, read, search) without being too sparse or bloated, fitting typical expectations for such a domain.

    Completeness4/5

    The toolset covers core CRUD operations for entities and relations (create, delete, read, search), but lacks explicit update tools for modifying existing entities or relations. Agents can work around this by deleting and recreating, but it's a minor gap in lifecycle coverage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An advanced MCP server providing RAG-enabled memory through a knowledge graph with vector search capabilities, enabling intelligent information storage, semantic retrieval, and document processing.
      41 npm
      47
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Open-source MCP server that gives any LLM long-term memory using a knowledge graph and vector search hybrid. It stores entities, observations, and relationships, enabling semantic recall across sessions with automatic clustering and fail-loud infrastructure.
      51
      MIT