spences10

mcp-memory-libsql

Community spences10
Updated

LibSQL-based persistent memory tool for MCP

6 tools
Name Description
create_entities Create new entities with observations and optional embeddings
search_nodes Search for entities and their relations using text or vector similarity
read_graph Get recent entities and their relations
create_relations Create relations between entities
delete_entity Delete an entity and all its associated data (observations and relations)
delete_relation Delete a specific relation between entities

mcp-memory-libsql

A high-performance, persistent memory system for the Model ContextProtocol (MCP) powered by libSQL. This server provides vector searchcapabilities and efficient knowledge storage using libSQL as thebacking 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 inWSL, seeGetting 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 databasesthrough 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 Linuxfilesystem format (e.g., /home/username/...) rather than Windowsformat.

By default, if no URL is provided, it will use file:/memory-tool.dbin the current directory.

API

The server implements the standard MCP memory interface withadditional 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-invector 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 guidelinesbefore submitting pull requests.

License

MIT License - see the LICENSE file for details.

Acknowledgments

MCP Server ยท Populars

MCP Server ยท New

    chatmcp

    mcpso

    directory for Awesome MCP Servers

    Community chatmcp
    TBXark

    MCP Proxy Server

    An MCP proxy server that aggregates and serves multiple MCP resource servers through a single HTTP server.

    Community TBXark
    ttommyth

    interactive-mcp

    Ask users questions from your LLM! interactive-mcp: Local, cross-platform MCP server for interactive prompts, chat & notifications.

    Community ttommyth
    lpigeon

    ros-mcp-server

    The ROS MCP Server is designed to support robots in performing complex tasks and adapting effectively to various environments by providing a set of functions that transform natural language commands, entered by a user through an LLM, into ROS commands for robot control.

    Community lpigeon
    emicklei

    melrose-mcp

    interactive programming of melodies, producing MIDI

    Community emicklei