MCP Memory LibSQL
mcp-memory-libsql
libSQLを搭載した、モデルコンテキストプロトコル(MCP)用の高性能永続メモリシステムです。このサーバーは、libSQLをバックエンドストアとして使用し、ベクトル検索機能と効率的な知識ストレージを提供します。
特徴
🚀 libSQL を使用した高性能ベクトル検索
💾 エンティティとリレーションの永続的な保存
🔍 セマンティック検索機能
🔄 ナレッジグラフ管理
🌐 ローカルおよびリモートの libSQL データベースと互換性があります
🔒 リモートデータベース向けの安全なトークンベースの認証
Related MCP server: MCP Memory LibSQL Go
構成
このサーバーはMCP構成の一部として使用するように設計されています。以下に、さまざまな環境における例を示します。
傾斜構成
Cline MCP 設定に以下を追加します:
{
"mcpServers": {
"mcp-memory-libsql": {
"command": "npx",
"args": ["-y", "mcp-memory-libsql"],
"env": {
"LIBSQL_URL": "file:/path/to/your/database.db"
}
}
}
}WSL 構成の Claude デスクトップ
WSL で Claude Desktop を使用してこのサーバーをセットアップする方法の詳細については、 「WSL で Claude Desktop を使用して MCP サーバーを動作させる」を参照してください。
WSL 環境の Claude Desktop 構成にこれを追加します。
{
"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"
]
}
}
}データベース構成
サーバーは、LIBSQL_URL 環境変数を通じて、ローカル SQLite データベースとリモート libSQL データベースの両方をサポートします。
ローカル SQLite データベースの場合:
{
"env": {
"LIBSQL_URL": "file:/path/to/database.db"
}
}リモート libSQL データベース (例: Turso) の場合:
{
"env": {
"LIBSQL_URL": "libsql://your-database.turso.io",
"LIBSQL_AUTH_TOKEN": "your-auth-token"
}
}注: WSL を使用する場合は、データベース パスで Windows 形式ではなく Linux ファイルシステム形式 (例: /home/username/... ) が使用されていることを確認してください。
デフォルトでは、URL が指定されていない場合は、現在のディレクトリのfile:/memory-tool.dbが使用されます。
API
サーバーは、追加のベクトル検索機能を備えた標準の MCP メモリ インターフェイスを実装します。
エンティティ管理
埋め込みによるエンティティの作成/更新
エンティティを削除する
類似性によるエンティティの検索
関係管理
エンティティ間の関係を作成する
関係を削除する
クエリ関連エンティティ
建築
サーバーは、次のスキーマを持つ libSQL データベースを使用します。
エンティティテーブル: エンティティ情報と埋め込みを保存します
リレーションテーブル: エンティティ間の関係を保存します
libSQL の組み込みベクトル演算を使用して実装されたベクトル検索機能
発達
出版
npm 2FA の要件により、公開は手動で行う必要があります。
変更セットを作成します(変更内容を文書化します)。
pnpm changesetパッケージのバージョン管理 (バージョンと CHANGELOG を更新)
pnpm changeset versionnpm に公開します (2FA コードの入力を求められます):
pnpm release貢献
貢献を歓迎します!プルリクエストを送信する前に、貢献ガイドラインをお読みください。
ライセンス
MIT ライセンス - 詳細についてはLICENSEファイルを参照してください。
謝辞
モデルコンテキストプロトコルに基づいて構築
libSQLを搭載
Available Tools
6 toolscreate_entitiesC
Create new entities with observations and optional embeddings
| Name | Required | Description | Default |
|---|---|---|---|
| entities | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| relations | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Create relations' which implies a write/mutation operation, but doesn't specify permissions needed, whether it's idempotent, error handling, or what happens on success/failure. It lacks details on rate limits, side effects, or response format, leaving significant gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with a single sentence 'Create relations between entities'. It's front-loaded and wastes no words, though this brevity contributes to underspecification in other dimensions. Every word serves a purpose, making it efficient in structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (mutation operation with 1 parameter involving nested objects), lack of annotations, 0% schema description coverage, and no output schema, the description is incomplete. It doesn't cover behavioral aspects, parameter meanings, or expected outcomes, making it inadequate for safe and effective use by an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter semantics beyond the input schema. With 0% schema description coverage and 1 parameter ('relations' array of objects with source, target, type), the description doesn't explain what these fields mean, valid values for 'type', or examples. It fails to compensate for the schema's lack of descriptions, leaving parameters poorly documented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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 resource (relations between entities), but it's vague about what 'entities' refers to and doesn't distinguish from sibling tools like 'create_entities' or 'delete_relation'. It provides basic purpose but lacks specificity about the domain or system context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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., entities must exist first), exclusions, or comparisons to siblings like 'create_entities' (for creating entities) or 'delete_relation' (for removing relations). Usage context is implied but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_entityA
Delete an entity and all its associated data (observations and relations)
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the entity to delete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses the destructive nature ('Delete... and all its associated data'), which is crucial behavioral context. However, it lacks details on permissions needed, error conditions, or what happens if the entity doesn't exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action and scope. Every word contributes meaning without redundancy, making it appropriately sized for a one-parameter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive mutation tool with no annotations and no output schema, the description adequately covers the basic action and scope. However, it lacks important context about permissions, confirmation requirements, or return values, leaving gaps for safe agent operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, providing a clear parameter description. The tool description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline for high schema coverage without compensating value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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 target resource ('an entity and all its associated data'), with explicit mention of what gets deleted ('observations and relations'). It distinguishes from sibling tools like 'delete_relation' by specifying broader scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives is provided. While the description implies destructive deletion, it doesn't specify prerequisites, warn about irreversible changes, or mention when to choose 'delete_entity' over 'delete_relation' or other 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
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Source entity name | |
| target | Yes | Target entity name | |
| type | Yes | Type of relation |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states 'Delete', implying a destructive mutation, but doesn't disclose behavioral traits such as whether deletion is permanent, requires specific permissions, has side effects (e.g., cascading deletions), or what happens on success/failure. This is a significant gap for a mutation tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, clearly stating the core action without unnecessary elaboration, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a destructive operation with no annotations and no output schema, the description is incomplete. It lacks crucial context like what 'delete' entails (e.g., irreversible), expected outcomes, error handling, or how it differs from sibling tools. For a mutation tool, this minimal description is inadequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters (source, target, type) with basic descriptions. The description adds no additional meaning beyond what the schema provides, such as examples of relation types or how entities are identified. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Delete') and the 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 tool unique for relation deletion versus entity deletion or relation creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 'delete_entity' and 'create_relations', it's unclear if this is for removing existing relations only, or if there are prerequisites (e.g., the relation must exist). No explicit when/when-not or alternative tools are mentioned.
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
| Name | Required | Description | Default |
|---|---|---|---|
| includeEmbeddings | No | Whether to include embeddings in the returned entities (default: false) |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| includeEmbeddings | No | Whether to include embeddings in the returned entities (default: false) | |
| query | Yes |
TDQS
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.
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.
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.
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.
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.
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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.0- First observed
create_entities - First observed
create_relations - First observed
delete_entity - First observed
delete_relation - First observed
read_graph - First observed
search_nodes
TDQS
Scored across 6 tools
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.
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.
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.
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
Related MCP Connectors
- memnodeOAuthdev.memnode
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent memory for AI agents — log and recall conversation context over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Related MCP Servers
- AlicenseBqualityBmaintenanceA high-performance MCP server utilizing libSQL for persistent memory and vector search capabilities, enabling efficient entity management and semantic knowledge storage.660 npm88MIT
- AlicenseNot gradedqualityCmaintenance🧠 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.7MIT
- AlicenseNot gradedqualityAmaintenanceA knowledge-graph-based persistent memory server for the Model Context Protocol, storing entities, observations, and relations in SQLite with semantic vector search and temporal versioning.13 npmMIT
- AlicenseNot gradedqualityBmaintenancePersistent memory for AI agents over the Model Context Protocol (MCP).MIT