Skip to main content
Glama
adamkwhite

Claude Conversation Memory System

by adamkwhite

质量门禁状态 错误 漏洞 代码异味 覆盖率 重复行 (%)

Claude Memory MCP — 通用 AI 会话记忆

一个模型上下文协议 (MCP) 服务器,提供跨多个 AI 平台的持久化、可搜索的会话记忆。通过 SQLite FTS5 支持的亚毫秒级全文搜索,存储、搜索和检索会话历史记录。

功能特性

  • 🔍 亚毫秒级全文搜索:通过 SQLite FTS5 实现,支持相关性排序

  • 🏷️ 自动主题提取:在 2,000 多条关联中提取 574+ 个唯一主题

  • 📊 每周摘要:包含见解和模式分析

  • 🗃️ 有组织的文档存储:按日期和主题分类

  • 🤖 多平台支持:Claude、ChatGPT、Cursor AI 及自定义格式

  • 🔌 MCP 集成:适用于 Claude Desktop 和 Claude Code

Related MCP server: Claude Memory MCP

快速入门

前置要求

  • Python 3.11+ (已在 3.11.12 版本测试)

  • 推荐 Ubuntu/WSL 环境

  • Claude Desktop (用于 MCP 集成)

安装

选项 1:使用 Claude Code 安装 (推荐)

快速安装 - 将此内容复制并粘贴到 Claude Code 中:

claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/Code/claude-memory-mcp && python3 src/server_fastmcp.py"

重要提示:将 $HOME/Code/claude-memory-mcp 替换为您克隆此仓库的实际路径。

不同位置的示例:

# If cloned to ~/Code/claude-memory-mcp (default)
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/Code/claude-memory-mcp && python3 src/server_fastmcp.py"

# If cloned to ~/projects/claude-memory-mcp
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/projects/claude-memory-mcp && python3 src/server_fastmcp.py"

# If cloned to ~/dev/claude-memory-mcp
claude mcp add --transport stdio claude-memory -- sh -c "cd $HOME/dev/claude-memory-mcp && python3 src/server_fastmcp.py"

此操作的作用:

  • --transport stdio:为本地进程使用标准输入/输出

  • claude-memory:服务器标识符名称

  • --:将 Claude CLI 标志与服务器命令分隔开

  • sh -c "cd ... && python3 ...":在运行服务器前切换到项目目录

这将自动把 MCP 服务器添加到您的 Claude Desktop 配置中。

文档:https://code.claude.com/docs/en/mcp

选项 2:手动安装

  1. 克隆仓库:

    git clone https://github.com/yourusername/claude-memory-mcp.git
    cd claude-memory-mcp
  2. 设置虚拟环境:

    python3 -m venv .venv
    source .venv/bin/activate
  3. 安装依赖:

    pip install -e .

    这将以可编辑模式安装包以及所有必需的依赖项:

    • mcp[cli]>=1.9.2 - 模型上下文协议

    • jsonschema>=4.0.0 - JSON 模式验证

    • aiofiles>=24.1.0 - 异步文件操作

  4. 测试系统:

    python3 tests/validate_system.py

基本用法

独立测试

# Test core functionality
python3 tests/standalone_test.py

MCP 服务器模式

# Run as MCP server (from project root)
python3 src/server_fastmcp.py

# Or from src directory
cd src && python3 server_fastmcp.py

批量导入

# Import conversations from JSON export
python3 scripts/bulk_import_enhanced.py your_conversations.json

MCP 工具

search_conversations(query, limit=5)

对所有存储的会话进行全文搜索,并按相关性排序。

search_by_topic(topic, limit=10)

查找标记有特定主题的会话。

add_conversation(content, title, date)

存储带有自动主题提取和 FTS 索引的新会话。

generate_weekly_summary(week_offset=0)

从最近的会话中生成见解和模式。

get_search_stats()

查看搜索引擎统计信息 — 索引大小、主题数量和引擎状态。

架构

~/claude-memory/
├── conversations/
│   ├── 2025/
│   │   └── 06-june/
│   │       └── 2025-06-01_topic-name.md
│   ├── index.json          # Search index
│   └── topics.json         # Topic frequency
└── summaries/
    └── weekly/
        └── week-2025-06-01.md

配置

Claude Desktop 集成

添加到您的 Claude Desktop MCP 配置中:

{
  "mcpServers": {
    "claude-memory": {
      "command": "python",
      "args": ["/path/to/claude-memory-mcp/server_fastmcp.py"]
    }
  }
}

存储位置

默认存储:~/claude-memory/

通过环境变量覆盖:

export CLAUDE_MEMORY_PATH="/custom/path"

日志配置

日志格式

在人类可读的文本日志(默认)和用于生产环境的结构化 JSON 日志之间切换:

# JSON format (for production log aggregation)
export CLAUDE_MCP_LOG_FORMAT=json

# Text format (default, for development)
export CLAUDE_MCP_LOG_FORMAT=text

JSON 日志示例:

{
  "timestamp": "2025-01-15T10:30:45",
  "level": "INFO",
  "logger": "claude_memory_mcp",
  "function": "add_conversation",
  "line": 145,
  "message": "Added conversation successfully",
  "context": {
    "type": "performance",
    "duration_seconds": 0.045,
    "conversation_id": "conv_abc123"
  }
}

JSON 日志非常适合:

  • 带有日志聚合(Datadog、ELK、CloudWatch)的生产部署

  • 自动化监控和警报

  • 结构化日志分析和查询

  • 性能跟踪和调试

详细的 JSON 日志文档请参阅 docs/json-logging.md。

文件结构

claude-memory-mcp/
├── src/
│   ├── server_fastmcp.py       # Main MCP server
│   ├── conversation_memory.py  # Core memory engine + SQLite FTS5
│   ├── format_detector.py      # Auto-detect AI platform format
│   ├── validators.py           # Input validation
│   ├── logging_config.py       # Structured logging (text/JSON)
│   ├── importers/              # Platform-specific importers
│   │   ├── chatgpt_importer.py
│   │   ├── claude_importer.py
│   │   ├── cursor_importer.py
│   │   └── generic_importer.py
│   └── schemas/                # JSON schema validation
├── tests/                      # 435 tests, 98.68% coverage
├── data/                       # Consolidated app data
├── scripts/                    # Import and utility scripts
└── docs/                       # Documentation

性能

SQLite FTS5 全文搜索,针对 347 条索引会话进行基准测试:

  • 搜索速度:每次查询 0.2–0.5ms (比线性 JSON 扫描快 4.4 倍)

  • 主题搜索:在 574 个唯一主题中搜索耗时 0.3–0.4ms

  • 写入速度:每次会话约 33ms (包含索引)

  • 容量:10 个月内生产环境存储 371 条会话

  • 测试覆盖率:98.68% (435 个测试) — 0 代码异味,0 安全热点 (SonarCloud 验证)

最后基准测试时间:2026 年 4 月 | 详细报告

开发者注意:性能基准测试会创建一个 ~/claude-memory-test 目录用于隔离测试。正常的 MCP 使用仅使用 ~/claude-memory/。如果您看到 ~/claude-memory-test,可以安全删除。

搜索示例

# Technical topics
search_conversations("terraform azure")
search_conversations("mcp server setup")
search_conversations("python debugging")

# Project discussions  
search_conversations("interview preparation")
search_conversations("product management")
search_conversations("architecture decisions")

# Specific problems
search_conversations("dependency issues")
search_conversations("authentication error")
search_conversations("deployment configuration")

开发

添加新功能

  1. 主题提取:修改 ConversationMemoryServer 中的 _extract_topics()

  2. 搜索算法:增强 search_conversations() 方法

  3. 摘要生成:改进 generate_weekly_summary() 逻辑

测试

# Run validation suite
python3 tests/validate_system.py

# Test individual components
python3 tests/standalone_test.py

# Run full test suite with coverage
python3 -m pytest tests/ --ignore=tests/standalone_test.py --cov=src --cov-report=term

# Import test data
python3 scripts/bulk_import_enhanced.py test_data.json --dry-run

测试数据存储 (仅限开发者):如果您运行性能基准测试或测试数据生成器,它们会创建一个 ~/claude-memory-test 目录,以将测试数据与您的生产环境 ~/claude-memory 目录隔离开。这仅用于开发/测试 - 正常的 MCP 使用不会创建此目录。

运行基准测试后清理测试数据:

rm -rf ~/claude-memory-test

或使用 Makefile 清理目标:

make clean-test-data

故障排除

常见问题

MCP 导入错误:

pip install mcp[cli]  # Include CLI extras

搜索无结果:

  • 检查会话索引:ls ~/claude-memory/conversations/index.json

  • 验证文件权限

  • 运行验证:python3 tests/validate_system.py

每周摘要时区错误:

  • 确保所有日期时间对象使用一致的时区处理

  • 最近的修复解决了时区感知与原生比较的问题

系统要求

  • Python:3.11+ (已在 3.11.12 版本测试)

  • 磁盘空间:每 100 条会话约 10MB

  • 内存:<100MB RAM 使用量

  • 操作系统:推荐 Ubuntu/WSL,兼容 macOS/Windows

贡献

  1. Fork 本仓库

  2. 创建功能分支:git checkout -b feature-name

  3. 提交更改:git commit -am 'Add feature'

  4. 推送到分支:git push origin feature-name

  5. 提交 Pull Request

许可证

MIT 许可证 - 详情请参阅 LICENSE 文件

致谢


状态:生产就绪 ✅ 最后更新:2026 年 4 月 版本:2.0.0

Available Tools

10 tools
add_conversationB

Add a new conversation to the memory system.

session_id, user_id, tags, and conversation_type are the universal metadata fields introduced in PR #114; when provided, they are persisted alongside the conversation and indexed for metadata search (search_by_tag / search_by_session_id / search_by_conversation_type). All four are validated/sanitized before storage since this data may originate from external imports.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNo
tagsNo
titleNo
contentYes
user_idNo
session_idNo
conversation_typeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden. It discloses validation/sanitization and the persistence/indexing behavior of the four metadata fields, which is useful. It does not mention the return value, whether the tool can duplicate conversations, or any side effects or failure modes beyond validation.

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 compact and readable, front-loading the core action and then explaining the metadata fields. The formatting is clean, though the trailing phrase about external imports is slightly tangential and could be trimmed.

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

Completeness3/5

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

For a 7-parameter write operation with no annotations and no parameter descriptions in the schema, the description is under-equipped. It explains why the four universal fields exist and the indexing behavior, but it does not clarify return values, error conditions, or the meaning of date/title/content. The presence of an output schema helps, but the description still 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 lists 7 parameters but none of them have descriptions, and the description adds meaning only for session_id, user_id, tags, and conversation_type by explaining they are persisted and indexed. date, title, and content receive no semantic explanation beyond their names and types, which is a notable gap given the 0% schema description coverage.

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 adds a new conversation to the memory system, and it names the universal metadata fields. However, it does not explicitly contrast itself with the update_conversation sibling, which is an easy distinction to miss in an agent's selection process.

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

Usage Guidelines3/5

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

The description explains that the optional fields can be used for metadata search and that they may originate from external imports, which implies when these fields matter. It does not spell out when to prefer add_conversation over update_conversation or when certain metadata fields are required, leaving usage context implicit.

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

generate_weekly_summaryC

Generate a summary of conversations from the past week

ParametersJSON Schema
NameRequiredDescriptionDefault
week_offsetNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/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 the full burden of behavioral disclosure. It only says a summary is generated; it does not clarify whether this is read-only, how the past week is calculated, whether it aggregates across all conversations or only certain types, or what data the summary contains.

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, tight sentence that front-loads the core purpose without wasted words. However, its brevity comes at the cost of omitting useful parameter and behavior details, so it is concise but slightly under-specified.

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?

Although the tool is simple and has an output schema, the description leaves the meaning of week_offset undefined, which is essential for correct invocation. An agent cannot determine how to request the desired week without additional assumptions, so the description is not complete enough on its own.

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?

The only parameter, week_offset, is not mentioned in the description at all. The schema provides its name, title, type, and default, but not what the offset means (e.g., 0 = current week, 1 = previous week) or how it relates to 'past week'. With 0% schema description coverage, the description needed to compensate and does not.

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 states a specific action ('Generate') and resource ('a summary of conversations') with a time constraint ('past week'). This distinguishes it from the sibling search/add/update/get tools as an aggregation operation, though it does not explicitly contrast it with any of them.

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

Usage Guidelines3/5

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

The phrase 'past week' implies the tool is appropriate when a weekly summary is needed, but the description provides no explicit guidance on when to use this tool versus search_conversations or search_by_topic. No exclusions or alternative conditions are given.

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

get_conversationA

Retrieve a stored conversation by an ID returned from a search tool.

The complete record is read from the authoritative JSON store. Content is capped to protect the model context; increase max_chars when necessary.

ParametersJSON Schema
NameRequiredDescriptionDefault
max_charsNo
conversation_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and adds useful behavioral details: the read is from the 'authoritative JSON store', and the response content is capped to protect model context. It could mention error behavior when the ID is not found, but the disclosed behaviors go beyond a bare getter.

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 two lean sentences with no filler. The primary purpose is front-loaded, and the second sentence adds a meaningful operational constraint about content truncation.

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

Completeness4/5

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

For a simple retrieval tool with an output schema, the description covers purpose, source, and the one tunable behavior (content cap). It is adequate for an agent to select and call the tool, though it leaves not-found/error behavior unspecified.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate. It does: conversation_id is contextualized as an ID returned from a search tool, and max_chars is explained as the content cap that can be increased when needed. It does not specify units or range, but the default in the schema covers some of that gap.

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 uses a specific verb ('Retrieve') and a clear resource ('a stored conversation by an ID'), which immediately identifies it as a point-lookup tool. The mention that the ID comes from a search tool further separates it from the search-family siblings.

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

Usage Guidelines4/5

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

The description provides clear usage context: call this after obtaining a conversation ID from a search tool. It does not explicitly name sibling alternatives or state when not to use it, but the intended workflow is evident.

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

get_search_statsA

Get search engine statistics and performance information

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. The verb 'Get' implies a read-only operation and the lack of parameters suggests no destructive side effects. Still, it does not explicitly confirm safety, rate limits, or what 'performance information' includes.

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, front-loaded sentence with no filler. Every word contributes to identifying the tool's purpose.

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

Completeness5/5

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

For a parameterless tool with an output schema available, this description is sufficient for an agent to select and invoke it correctly. The lack of parameters removes invocation complexity, and the output schema covers return value details.

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

Parameters4/5

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

The tool has zero parameters, which sets the baseline at 4. There is no parameter semantics to explain, and the description does not need to compensate for undocumented inputs.

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 uses a specific verb ('Get') and identifies a clear resource ('search engine statistics and performance information'). It is distinct from all sibling tools, none of which obviously cover search engine statistics.

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

Usage Guidelines3/5

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

The intended use is implied by the name and description: use this when search engine statistics or performance are needed. However, there is no explicit guidance about when to use it versus alternatives, nor any mention of prerequisites or exclusions.

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

search_by_conversation_typeB

Search conversations by conversation_type (D2 metadata field).

Typical values: chat, code, analysis. Requires SQLite FTS.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
conversation_typeYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral context itself. It adds useful details: conversation_type is a D2 metadata field, typical values are chat/code/analysis, and SQLite FTS is required. However, it does not disclose read-only behavior, result-set behavior, or what happens when FTS is unavailable, leaving some burden unmet.

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: purpose first, then typical values, then the key prerequisite. Every sentence earns its place with no filler or repetition of schema information.

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

Completeness4/5

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

For a simple single-field search tool, the description covers the essential domain context (D2 metadata field, typical enum-like values) and the important prerequisite (SQLite FTS). The presence of an output schema reduces the need to describe return values, so the remaining gaps are minor.

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 adds real meaning to the required conversation_type parameter by explaining it is a D2 metadata field and giving typical values. The optional limit parameter remains unspecified, though its name, type, and default make it fairly self-explanatory.

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 a specific verb ('Search') and resource ('conversations') filtered by 'conversation_type', so an agent immediately knows what the tool does. It does not explicitly compare against sibling tools, but the focused field name already differentiates it from search_by_topic, search_by_tag, and generic search_conversations.

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 gives no guidance on when to choose this tool over search_conversations or the other search_by_* siblings. It mentions a technical prerequisite ('Requires SQLite FTS') but does not explain alternative conditions, exclusions, or preferred usage context.

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

search_by_session_idA

Find all conversations sharing a session_id (D2 metadata field).

Useful for reconstructing a multi-turn session that spans several stored conversation records (e.g. a Cursor working session, a Claude thread continued across days). Results are sorted chronologically. Requires SQLite FTS.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
session_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries full behavioral burden. It adds meaningful traits beyond the schema: 'Results are sorted chronologically' and 'Requires SQLite FTS'. It does not mention exact-match semantics or permissions, but the read-oriented wording and presence of an output schema reduce ambiguity.

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?

Three concise sentences: the first states the core function, the second gives the primary use case with examples, and the third provides ordering and a system prerequisite. Every sentence earns its place and there is no filler or redundancy.

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

Completeness4/5

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

For a two-parameter read tool with an output schema present, the description covers the purpose, a concrete use case, chronological ordering, and the SQLite FTS dependency. It does not explain the limit parameter's effect or mention alternative tools, but these are minor given the tool's simplicity and available output schema.

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 adds meaning for session_id by calling it a 'D2 metadata field' and explaining its role in reconstructing sessions, but the limit parameter is not described at all beyond its schema default. This partial compensation leaves one parameter without added context.

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?

Description uses a specific verb ('Find') with a concrete resource ('all conversations sharing a session_id') and clarifies that session_id is a 'D2 metadata field', clearly distinguishing this from sibling tools that search by topic, tag, or conversation type. An agent can immediately understand what the tool returns and how it differs from alternatives.

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

Usage Guidelines4/5

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

Provides clear context for when to use the tool: 'reconstructing a multi-turn session that spans several stored conversation records', with concrete examples like a Cursor working session or a Claude thread continued across days. It does not explicitly name alternatives or state when not to use it, but the use case is unambiguous.

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

search_by_tagA

Search conversations tagged with a specific tag (D2 metadata field).

Tags are universal metadata populated by the importers (e.g. starred, archived, workspace:my-project, variant:web). Requires SQLite FTS.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagYes
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description must carry the burden of behavioral disclosure. It adds meaningful context: tags originate from importers, are universal, and can take namespaced forms like 'workspace:my-project'. The SQLite FTS dependency is also a useful behavioral hint. However, it does not mention return shape, limit handling, pagination, or potential errors, leaving several behavioral aspects undisclosed.

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 three concise sentences, each earning its place: the core purpose, the tag semantics with concrete examples, and a required dependency. It is front-loaded with the action and contains no filler or redundancy.

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

Completeness4/5

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

For a simple two-parameter search tool with an output schema, the description covers the essential tag concept, provides real-world examples, and notes a critical prerequisite. The main gaps are the lack of explanation for the 'limit' parameter and the absence of sibling differentiation, but the output schema likely covers return values, so overall completeness is strong.

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 does explain the key 'tag' parameter thoroughly, including its nature as a D2 metadata field and providing examples. The 'limit' parameter, however, is entirely left to the schema's name and default value, with no description in either place.

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 states a specific action and resource: 'Search conversations tagged with a specific tag.' It further clarifies that tags are D2 metadata fields with concrete examples, which helps distinguish the tool from siblings like search_by_topic or search_by_session_id. However, it does not explicitly contrast itself against those sibling tools, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description gives useful context for when the tool is applicable: tags are universal metadata populated by importers, and examples like 'starred' and 'archived' imply common use cases. It also states a prerequisite ('Requires SQLite FTS'), which is a form of usage constraint. Yet it offers no explicit guidance on when to prefer this tool over search_by_topic, search_by_conversation_type, or search_conversations, nor any exclusions.

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

search_by_topicC

Search conversations by a specific topic

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
topicYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.8/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 the full behavioral burden. It implies a read-only search but does not disclose whether matching is exact, fuzzy, case-insensitive, or how results are ordered. It also omits any mention of pagination, limits beyond the schema default, or access/permission requirements.

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, front-loaded sentence that is easy to parse. It wastes no words and communicates the core action and resource immediately, though that brevity contributes to the lack of behavioral detail.

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 two parameters, no annotations, and several closely related sibling tools, the description is incomplete. An agent would need extra information about parameter semantics and when to prefer this over search_by_tag or search_conversations to invoke it correctly.

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%, and the description does little to compensate. It maps to the 'topic' parameter but says nothing about how topics are matched or interpreted, and it entirely ignores the 'limit' parameter and its default behavior.

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 states a clear verb ('Search'), a resource ('conversations'), and a filtering dimension ('by a specific topic'). This distinguishes it from siblings like search_by_tag and search_by_session_id, though it does not clarify the exact matching semantics of 'topic'.

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?

There is no guidance on when to use this tool versus alternatives such as the general search_conversations or the more specific search_by_tag. No context about typical use cases or exclusions is provided, leaving the agent to infer applicability from the tool name alone.

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

search_conversationsC

Search through stored Claude conversations for relevant content

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does convey a read-style operation over stored conversations and mentions 'relevant content', which implies some relevance ranking, but it does not explain whether search covers full transcripts, metadata, summaries, or how results are ordered and limited.

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 filler and places the action and resource early. It earns its conciseness, though it is arguably too sparse to support tool selection among siblings.

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?

The input schema is simple and an output schema exists, so return structure may be covered elsewhere, but the tool sits in a crowded sibling set with multiple specialized search variants. The description does not explain when generic search is appropriate, leaving a meaningful selection gap for an agent.

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 description must compensate for undocumented parameters, but it never mentions 'query' or 'limit' explicitly. The phrase 'relevant content' hints that query drives a relevance search and limit likely caps results, but that is inferred rather than stated.

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 states a specific verb ('search') and a clear resource ('stored Claude conversations'), so an agent can tell this is a search operation. It does not differentiate from sibling tools like search_by_topic, search_by_tag, search_by_session_id, or search_by_conversation_type, which all share the same search family.

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?

There is no guidance on when to use this generic search versus the specialized sibling search tools. With four search-by-* siblings plus get_search_stats, the description leaves the agent to infer which tool fits a given request.

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

update_conversationA

Update fields on an existing conversation in place.

Pass conversation_id plus any subset of fields to change. The first line of the stored content is rewritten with a self-documenting audit line: [update <iso-timestamp> — <change_note>]. If change_note is omitted, it's auto-derived from which fields changed.

Tag ops: set_tags replaces the full list; add_tags and remove_tags mutate it. set_tags is mutually exclusive with the other two; pass set_tags=[] to clear all tags.

Metadata fields (tags, conversation_type, session_id, user_id) are validated/sanitized before storage since this data may originate from external imports.

record_audit=False preserves authoritative imported content verbatim. Normal interactive updates should retain the default audit record.

ParametersJSON Schema
NameRequiredDescriptionDefault
titleNo
contentNo
user_idNo
add_tagsNo
set_tagsNo
session_idNo
change_noteNo
remove_tagsNo
record_auditNo
conversation_idYes
conversation_typeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and succeeds. It discloses that the first line of content is rewritten with a self-documenting audit line, change_note can be auto-derived, tag operations have specific replace/mutate semantics with mutual exclusivity, metadata is validated/sanitized, and record_audit=False preserves imported content verbatim. These are all meaningful behavioral traits beyond the tool name.

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 well-structured and front-loaded, with the core purpose in the first sentence. Each paragraph earns its place: partial update mechanics, audit behavior, tag semantics, metadata validation, and special record_audit usage. It is detailed without being bloated.

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

Completeness5/5

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

Given 11 parameters, no annotations, and no schema-level descriptions, this description is remarkably complete. It covers partial updates, audit-line side effects, tag exclusivity, metadata sanitization, and audit suppression. The presence of an output schema covers return-value expectations, so no critical calling information is missing.

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

Parameters4/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 does well for tags, change_note, record_audit, conversation_id, and metadata fields, but title and content are only covered implicitly via 'any subset of fields to change.' The tag semantics and audit behavior add substantial value beyond the raw schema.

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 opens with a specific verb and resource: 'Update fields on an existing conversation in place.' This clearly identifies the action and scope, distinguishing it from add_conversation, get_conversation, and the search family without ambiguity.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool: modifying an existing conversation by passing conversation_id with a subset of fields. It also provides usage guidance for record_audit, recommending default audit for interactive updates and record_audit=False for preserving authoritative imports, but it does not explicitly name sibling tools or state when not to use it.

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.

  1. 10 tool updatesv0.1.2
    • First observedadd_conversation
    • First observedgenerate_weekly_summary
    • First observedget_conversation
    • First observedget_search_stats
    • First observedsearch_by_conversation_type
    • First observedsearch_by_session_id
    • First observedsearch_by_tag
    • First observedsearch_by_topic
    • First observedsearch_conversations
    • First observedupdate_conversation

TDQS

B3.4/5.0

Scored across 10 tools

Disambiguation4/5

Most tools target distinct resources or actions: add/get/update are clear CRUD operations, and the metadata-specific searches (by_tag, by_session_id, by_conversation_type) are well-scoped. However, search_conversations and search_by_topic overlap conceptually, and the distinction between generic content search and topic search is not sharply defined.

Naming Consistency4/5

The naming is predominantly verb_noun snake_case, with add_conversation, get_conversation, update_conversation, and generate_weekly_summary following a clear pattern. The search tools are slightly inconsistent because some use search_conversations while others use search_by_tag/search_by_session_id/search_by_conversation_type, but the style is still recognizable and predictable.

Tool Count4/5

Ten tools is a reasonable size for a conversation memory system, and the CRUD core plus search variants cover most expected workflows. The count is slightly search-heavy, with six retrieval-related tools, but none feel redundant enough to remove outright.

Completeness3/5

The system covers add, get, update, search, summary, and stats, which handles the core lifecycle for stored conversations. Notable gaps include no delete/forget operation, no list-all conversations tool, and no dedicated search_by_user_id even though user_id is described as a universal metadata field.

Maintenance

ActivitySlowing
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that makes Claude Code conversation history searchable and proactively useful by indexing past sessions with hybrid BM25+TF-IDF search, extracting decisions and solutions, and auto-injecting relevant project context at session start.
    9
    7 npm
    66
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A lightweight MCP server that provides Claude Desktop with persistent memory across conversations by storing, summarizing, and retrieving conversation history.
    3
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that gives Claude persistent memory by storing conversation context, entities, and enabling semantic search across sessions.
    8 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables semantic and keyword search over Claude Code conversation history stored locally, using hybrid search, local embeddings, and time-decay scoring.
    22 npm
    MIT