Skip to main content
Glama

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

Related MCP server: MCP Memory LibSQL Go

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

Available Tools

6 tools
create_entitiesC

Create new entities with observations and optional embeddings

ParametersJSON Schema
NameRequiredDescriptionDefault
entitiesYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a creation operation, implying mutation, but doesn't cover critical aspects like permissions needed, whether it's idempotent, error handling, or rate limits. The mention of 'optional embeddings' hints at functionality but lacks depth on behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Create new entities') and adds key details ('with observations and optional embeddings'). There is no wasted wording, making it easy to parse quickly while conveying essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (1 parameter with nested objects, no annotations, no output schema), the description is insufficient. It doesn't explain the return values, error conditions, or the full scope of parameters (e.g., 'relations'). For a creation tool with rich input structure, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'observations and optional embeddings', which partially maps to the schema's 'observations' and 'embedding' fields, but omits 'relations' and details on 'entityType' or 'name'. This adds some meaning but doesn't fully explain the single parameter's structure or all nested fields, leaving gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new entities'), specifying they include 'observations and optional embeddings'. This distinguishes it from siblings like 'create_relations' (which creates relationships) and 'delete_entity' (which removes entities). However, it doesn't explicitly mention the 'relations' parameter shown in the schema, leaving the purpose slightly incomplete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., when entities should be created vs. updated), contrast with siblings like 'read_graph' or 'search_nodes', or specify scenarios where embeddings or relations are appropriate. This leaves the agent without contextual usage cues.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_relationsC

Create relations between entities

ParametersJSON Schema
NameRequiredDescriptionDefault
relationsYes

TDQS

C2.4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states the action ('create') without any information about permissions needed, whether this is a mutation or read-only operation, potential side effects, error conditions, or what happens if relations already exist. This is inadequate for a tool that appears to perform write operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just three words, with zero wasted language. It's front-loaded with the core action and target. While it's under-specified for a tool with parameters, it earns full marks for conciseness as every word contributes meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 1 parameter (though complex with nested objects), 0% schema coverage, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, error handling, or provide enough context about the 'entities' and 'relations' concepts to use the tool effectively without external knowledge.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter documentation. The description mentions 'relations between entities' which hints at the 'relations' parameter, but doesn't explain what 'source', 'target', and 'type' mean, their expected formats, or provide any examples. The description adds minimal value beyond the parameter name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create relations between entities' clearly states the action (create) and target (relations between entities), avoiding tautology. However, it lacks specificity about what 'entities' and 'relations' mean in this context, and doesn't differentiate from sibling tools like 'create_entities' or 'delete_relation' beyond the basic verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (e.g., entities must exist first), when not to use it, or how it differs from sibling tools like 'create_entities' or 'delete_relation' in practical scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_entityB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName of the entity to delete

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that deletion includes 'all its associated data', which is valuable behavioral context. However, it lacks critical details like whether deletion is irreversible, permission requirements, error conditions, or response format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with the core action, zero waste. Every word earns its place by specifying the resource and scope of deletion efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is incomplete. It mentions data deletion scope but omits critical behavioral details like irreversibility, permissions, or error handling, leaving significant gaps for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'name' documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Delete') and resource ('an entity and all its associated data'), with explicit mention of what gets removed ('observations and relations'). It distinguishes itself from sibling tools like 'delete_relation' by specifying broader deletion scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like 'delete_relation' or 'create_entities'. The description implies usage for deleting entities with associated data, but lacks context on prerequisites, exclusions, or comparison to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_relationC

Delete a specific relation between entities

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesSource entity name
targetYesTarget entity name
typeYesType of relation

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states the action ('Delete') without disclosing behavioral traits. It doesn't cover permissions needed, whether deletion is reversible, side effects, or error handling, which are critical for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, making it easy to parse and front-loaded. It directly conveys the core action without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, outcomes, or error cases, failing to compensate for the missing structured data, which could lead to misuse by an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are documented in the schema. The description adds no meaning beyond the schema, such as explaining how 'source', 'target', and 'type' interact or providing examples, but the baseline is 3 since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('a specific relation between entities'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'delete_entity' or 'create_relations', which would require specifying what makes this deletion unique (e.g., relation-specific vs. entity deletion).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, when not to use it (e.g., for deleting entities instead), or refer to siblings like 'delete_entity' or 'create_relations' for context, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_graphC

Get recent entities and their relations

ParametersJSON Schema
NameRequiredDescriptionDefault
includeEmbeddingsNoWhether to include embeddings in the returned entities (default: false)

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions 'recent' but doesn't clarify how recency is determined (e.g., time-based, count-based). It also doesn't describe what 'entities and their relations' includes (e.g., format, structure, pagination) or any limitations (e.g., rate limits, authentication needs). The description is too minimal for a tool with potential complexity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action ('Get recent entities and their relations'). However, it could be more structured by explicitly separating purpose from constraints, but given its brevity, it's appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that reads graph data. It doesn't explain what 'recent' entails, the format of returned entities/relations, or any behavioral aspects like error handling. For a tool with potential complexity in graph operations, this minimal description leaves significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 100% description coverage, so the schema fully documents 'includeEmbeddings'. The description adds no parameter information beyond what the schema provides. Since schema coverage is high, the baseline score is 3, as the description doesn't need to compensate but also adds no extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Get recent entities and their relations', which provides a basic verb+resource combination. However, it's vague about what 'recent' means (timeframe, recency criteria) and doesn't distinguish this tool from sibling tools like 'search_nodes' or 'create_entities' that also involve entities. The purpose is understandable but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'search_nodes' (which might filter entities) and 'create_entities' (which creates rather than reads), there's no indication of when 'read_graph' is appropriate versus these other tools. No exclusions, prerequisites, or alternative suggestions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_nodesC

Search for entities and their relations using text or vector similarity

ParametersJSON Schema
NameRequiredDescriptionDefault
includeEmbeddingsNoWhether to include embeddings in the returned entities (default: false)
queryYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the search functionality but lacks details on permissions, rate limits, response format, or potential side effects (e.g., whether it's read-only or has other impacts). This is inadequate for a search tool with no structured safety hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. It directly communicates the tool's function and method, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a search tool with no annotations, no output schema, and incomplete parameter coverage, the description is insufficient. It lacks details on return values, error handling, or behavioral traits, leaving significant gaps for an AI agent to operate effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (one of two parameters has a description). The description adds value by explaining the query parameter supports 'text or vector similarity,' which clarifies the oneOf schema, but it doesn't address the includeEmbeddings parameter or provide additional semantic context beyond the schema's basic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Search for entities and their relations using text or vector similarity,' which specifies the verb (search), resource (entities and their relations), and method (text or vector similarity). However, it doesn't explicitly differentiate from sibling tools like 'read_graph,' which might also involve reading/searching operations, leaving room for ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions the search methods (text or vector similarity) but doesn't specify scenarios, prerequisites, or exclusions compared to siblings like 'read_graph,' leaving the agent without clear usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: create_entities and create_relations handle creation of different object types, delete_entity and delete_relation handle deletion of different object types, read_graph retrieves recent data, and search_nodes performs searches. No ambiguity exists between these operations.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case naming: create_entities, create_relations, delete_entity, delete_relation, read_graph, and search_nodes. The naming is perfectly 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 earns its place by covering essential CRUD operations (create, delete, read/search) for both entities and relations, without being overly complex or insufficient.

Completeness4/5

The tool set provides strong coverage for core graph operations: creation and deletion of entities/relations, reading recent data, and searching. A minor gap exists in update operations (e.g., update_entity or update_relation), but agents can work around this by deleting and recreating as needed.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    A high-performance MCP server utilizing libSQL for persistent memory and vector search capabilities, enabling efficient entity management and semantic knowledge storage.
    6
    110
    88
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    🧠 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.
    7
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.
    5
    1
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joleyline/mcp-memory-libsql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server