Skip to main content
Glama
singleflo

opencode-history-mcp

by singleflo

OpenCode History MCP

A local MCP (Model Context Protocol) server that lets AI coding agents search your past OpenCode conversations — before they start exploring files or re-doing work you already did.

Everything runs on your machine: it reads OpenCode's own SQLite database and builds a private full-text search index next to it. No network calls, no external services, no data ever leaves your computer.

PyPI Python License: MIT MCP

If this saves you from re-diagnosing the same bug twice, consider dropping a ⭐ — it helps other OpenCode users find it too.

Why

If you use OpenCode daily across many projects, you build up thousands of past sessions — bug fixes, feature work, diagnostics — sitting untapped in opencode.db. When you start a new session on the same module or file, your agent has no idea any of that happened. It re-explores from scratch, or worse, repeats a mistake you already fixed three weeks ago.

This server exposes that history as MCP tools any agent can call: "has this file been touched before? what did we conclude last time? what related work exists in this project?"

Related MCP server: mcp-copilotcli-history

How it works

OpenCode's own DB (read-only)          Our derived index (read-write)
┌─────────────────────────┐            ┌──────────────────────────┐
│ opencode.db              │  builds →  │ opencode-history.db       │
│ - session / message /part│            │ - sessions (denormalized) │
│ - JSON blobs per row      │            │ - search_idx (FTS5)       │
└─────────────────────────┘            │ - session_files (index)   │
                                        └──────────────────────────┘
  • Source DB stays untouched. We open it mode=ro (read-only, WAL-aware) and never write to it.

  • A separate FTS5 index holds denormalized session metadata + full-text search over user/assistant text — orders of magnitude faster than scanning JSON blobs on every query.

  • Auto-sync on startup, TTL-cached (5 min): if OpenCode wrote new sessions since the last check, the index catches up incrementally before serving results.

  • Privacy is structural, not a policy: the index lives next to OpenCode's own DB, on your machine, under your OS user. There is no hosted/shared version of this server — everyone runs their own, against their own history.

Quickstart

1. Build the index (first run)

uvx opencode-history-mcp --build-index

This reads your local opencode.db and builds opencode-history.db next to it. Takes a few seconds per thousand sessions.

2. Add it to your MCP client

hermes mcp add history \
  --command uvx \
  --args opencode-history-mcp

Or in ~/.hermes/config.yaml:

mcp_servers:
  history:
    command: uvx
    args:
      - opencode-history-mcp
    enabled: true

In ~/.config/opencode/opencode.jsonc (global) or .opencode/opencode.jsonc (project):

{
  "mcp": {
    "history": {
      "type": "local",
      "command": ["uvx", "opencode-history-mcp"],
      "enabled": true
    }
  }
}

In claude_desktop_config.json:

{
  "mcpServers": {
    "opencode-history": {
      "command": "uvx",
      "args": ["opencode-history-mcp"]
    }
  }
}

Any client that supports local stdio MCP servers works the same way — point it at:

command: uvx
args: ["opencode-history-mcp"]

3. Keep the index fresh (optional)

The server auto-syncs on startup (checked every 5 minutes per session). For a fully up-to-date index without waiting on that check, run:

uvx opencode-history-mcp --sync-index

You can schedule this with cron/launchd if you want the index always warm ahead of time.

Tools

Tool

Purpose

search_history

Full-text search (FTS5) over user prompts and assistant responses. Ranked by relevance + recency + activity.

find_related_work

Higher-precision match on session titles and original task descriptions. Best first call for "have we done this before?"

find_sessions_by_file

Find every session that modified or mentioned a specific file.

list_sessions

Browse sessions in a directory, sorted by date/messages/cost/tokens.

get_session_detail

Full metadata for one session: task, files touched, cost, tokens, sub-agent count.

get_session_messages

Read the actual paginated message history of a session.

get_stats

Aggregate stats: session/message counts, cost, time range, activity distribution.

All tools accept an optional directory parameter to scope results to one project. Recommended pattern: search scoped to the current project first; if nothing relevant comes back, retry without directory for a global search — related work sometimes lives in a sibling project.

Cross-platform paths

The server resolves OpenCode's data directory the same way OpenCode itself does (its xdg-basedir-based resolution — see packages/core/src/global.ts in the OpenCode source):

Platform

Default path

Notes

Linux

$XDG_DATA_HOME/opencode → falls back to ~/.local/share/opencode

Standard XDG Base Directory behavior.

macOS

~/.local/share/opencode

⚠️ Not ~/Library/Application Support/opencode. OpenCode has no macOS-specific branch in its path resolution — it uses the same XDG-style path as Linux. This trips people up who assume Apple conventions apply.

Windows

%LOCALAPPDATA%\opencode

Falls back to %USERPROFILE%\AppData\Local\opencode if the env var is unset.

WSL (WSL2/WSL1)

Same as Linux — ~/.local/share/opencode

WSL runs a real Linux kernel, so sys.platform reports "linux" and the Linux path applies automatically. This is only correct if OpenCode itself runs inside WSL.

The WSL + Windows-side-OpenCode edge case

If you installed OpenCode on Windows natively (not inside WSL) but run your MCP client or terminal inside WSL, the database lives on the Windows filesystem, which WSL mounts under /mnt/c/.... The automatic Linux-path resolution will look in the wrong place (your WSL home directory, not the Windows one) and won't find it.

Fix: point the server explicitly at the mounted Windows path via the OPENCODE_DATA_DIR environment variable:

export OPENCODE_DATA_DIR="/mnt/c/Users/<your-windows-username>/AppData/Local/opencode"

Or set it in your MCP client's env config for this server, e.g. for Hermes:

mcp_servers:
  history:
    command: uvx
    args:
      - opencode-history-mcp
    env:
      OPENCODE_DATA_DIR: /mnt/c/Users/yourname/AppData/Local/opencode
    enabled: true

Any other custom setup

OPENCODE_DATA_DIR always wins over auto-detection, on every platform — use it whenever OpenCode's data lives somewhere non-standard (custom XDG_DATA_HOME, a container, a synced/mounted drive, etc).

Teaching your agent to use this automatically

Having the tools available isn't enough — agents default to exploring files directly unless told otherwise. Add this to your project's AGENTS.md (OpenCode) or CLAUDE.md (Claude Code) to make history search a mandatory first step:

## Check history before starting work

Before exploring files or writing code for any task that touches an
existing module, file, or bug, call the history search tools first:

1. `find_related_work(query="<short description of the task>")` —
   has this exact task been worked on before?
2. If the task names a specific file, also call
   `find_sessions_by_file(file_path="...")`.
3. If step 1 returns nothing relevant, broaden with
   `search_history(query="...")` (full-text, no directory scope).

Only start exploring the codebase directly if history search comes up
empty. If a relevant past session is found, read it with
`get_session_detail` / `get_session_messages` before proceeding —
don't repeat work or re-diagnose an issue that was already solved.

This is a strong nudge, not a hard constraint — the agent can still decide history search isn't relevant for a truly new task. The goal is making "check first" the default reflex instead of an afterthought.

Development

git clone https://github.com/singleflo/opencode-history-mcp.git
cd opencode-history-mcp
uv venv
uv pip install -e .

# Build the index against your own OpenCode history
python -m opencode_history_mcp.build_index --full

# Run the server directly (stdio)
python -m opencode_history_mcp.server

# Inspect with the FastMCP dev tools
fastmcp dev -m opencode_history_mcp.server

See docs/design.md for the full design rationale (ranking formula, schema decisions, sync algorithm).

Contributing

Issues and PRs welcome. If you hit a platform-specific path issue, please include your OS, OPENCODE_DATA_DIR (if set), and the actual location of your opencode.db — that's the fastest way to fix an edge case in the resolution logic.

License

MIT — see LICENSE.

Available Tools

7 tools
find_sessions_by_fileA
Read-onlyIdempotent

Find sessions that modified or mentioned a specific file.

Searches patch records (files actually changed) and file mentions in text. Uses an indexed file_paths table for fast lookup (<50ms).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 10, max 20)
directoryNoOptional project directory scope
file_pathYesFile path or basename to search for (e.g. 'webhook_queue.py')

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is known. The description adds valuable behavioral context by explaining the search mechanism (patch records and file mentions) and the performance characteristic (<50ms). This goes beyond the annotations without contradicting them.

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 concise and front-loaded: the first sentence states the core purpose, and the following sentences provide supplementary details about search scope and performance. Every sentence earns its place with no redundancy or fluff.

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?

The description, combined with the input schema, output schema, and annotations, provides a complete picture for a tool of this complexity. It clarifies what the tool searches, mentions performance, and the schema covers parameter details. The only minor gap is not describing the return structure, but the output schema exists to cover that.

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 schema description coverage is 100%, so all three parameters are documented in the schema. The description mentions that file_path can be a basename (e.g., 'webhook_queue.py') but this is also in the schema's example. The description does not add significant semantic value beyond the schema, so the baseline score of 3 is appropriate.

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 tool's function with a specific verb ('Find') and resource ('sessions that modified or mentioned a specific file'). It distinguishes itself from sibling tools like list_sessions by focusing on file-based filtering. The dual search modes (patch records and mentions) further clarify its scope.

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: when looking for sessions related to a specific file. It does not explicitly mention alternatives or exclusions, but the purpose is unambiguous enough that an agent would know to use this for file-based searches rather than general session listing or history search.

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

get_session_detailA
Read-onlyIdempotent

Get full details of a specific session.

Returns metadata, original task (first user prompt), files modified, and the last assistant message.

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYesThe session ID (e.g. 'ses_abc123')

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the tool's safety profile is known. The description adds value by detailing the return content (metadata, original task, files modified, last assistant message), which goes beyond the annotations and clarifies what 'full details' means.

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 concise, two sentences with the primary action stated first and the return contents summarized in a bullet-like list. No unnecessary words or repetition.

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 simple tool with one well-documented parameter, an output schema, and clear annotations, the description fully covers what the tool returns and when to use it. There is no missing behavioral context that would impede an agent from invoking it correctly.

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 schema provides a complete description for the single parameter (session_id with example), and the description does not add further parameter-specific semantics. Since schema coverage is 100%, the baseline of 3 applies.

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 tool's function: 'Get full details of a specific session.' It specifies what is included (metadata, original task, files modified, last assistant message), which distinguishes it from sibling tools like get_session_messages and list_sessions by focusing on a single session's comprehensive detail.

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 implies when to use this tool (when you need full details on a single session), and the inclusion of specific elements (metadata, original task, files modified, last assistant message) suggests what you might use it for. However, it lacks explicit guidance on when not to use it or how it compares to alternatives like get_session_messages.

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

get_session_messagesA
Read-onlyIdempotent

Read the actual messages from a session (paginated).

Use this after finding a session with the discovery tools to read its content. Each text part is hard-truncated to 1000 chars to control token budget. Tool calls return only name + status (not output). File/base64 parts are skipped.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax messages to return (default 10, max 50)
offsetNoPagination offset (for reading beyond the first page)
session_idYesThe session ID

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior5/5

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

Adds significant behavioral details beyond the readOnly/idempotent annotations: hard truncation to 1000 chars, tool calls returning only name+status (not output), and file/base64 parts skipped. This is essential operational context that cannot be inferred from annotations or schema.

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 concise and front-loaded. The first sentence states the action, the second gives usage context, and the remaining sentences list critical constraints. Every sentence adds value, with no redundancy or filler.

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?

With read-only annotations, a complete input schema, and an output schema, the description covers the necessary context: when to use, pagination, output limitations, and content skipping. It is sufficient for an agent to correctly select and invoke the tool without ambiguity.

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 already provides complete descriptions for all parameters (100% coverage). The description repeats the pagination concept but adds no new parameter-specific details. Since the schema carries the parameter documentation, baseline 3 applies.

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 verb 'Read' and the resource 'actual messages from a session', distinguishing it from sibling discovery and detail tools. It immediately conveys the tool's core function and scope.

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?

Explicitly instructs to use after session discovery and describes pagination behavior. It gives clear context for when to invoke, though it does not explicitly list when not to use it. The phrasing 'after finding a session' strongly implies the appropriate workflow.

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

get_statsA
Read-onlyIdempotent

Overview statistics: session counts, messages, cost, time range, and distribution.

Root vs sub-agent breakdown. Top directories by activity.

ParametersJSON Schema
NameRequiredDescriptionDefault
directoryNoOptional scope (global if omitted)

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the tool as read-only and idempotent, so the safety profile is covered. The description adds context about the content of the statistics (e.g., root vs sub-agent breakdown, top directories) but does not disclose deeper operational behaviors such as authentication needs, rate limits, or how the optional directory scope affects output. The added content is useful but not rich enough to warrant a higher score.

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 compact: two sentences that front-load the main purpose and then list specific breakdowns. Every word is informative, with no redundancy or fluff. The structure is clear and easy to parse.

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?

The tool is simple (one optional parameter), has an output schema, and benefits from strong annotations. The description covers the core purpose and primary output facets, enough for an agent to know what to expect. It does not mention the directory parameter, but the schema handles that, and the description's job is to add value beyond structured fields, which it does with the statistics breakdown.

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 coverage is 100% for the single parameter `directory`, and the schema description already explains it as an optional scope. The tool description does not add any additional meaning or usage details for the parameter, so the baseline score of 3 applies.

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 that the tool provides overview statistics, enumerating specific metrics like session counts, messages, cost, time range, and distribution. It also mentions breakdowns by root vs sub-agent and top directories. This distinguishes it from sibling tools that focus on searching or retrieving individual sessions/messages.

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 is given for when to use this tool versus alternatives. The description merely states what it does without mentioning any alternatives or exclusions. Sibling tool names suggest more specific options exist (e.g., get_session_detail, list_sessions), but the description does not clarify when to choose get_stats over them.

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

list_sessionsA
Read-onlyIdempotent

Browse sessions filtered by directory. Root sessions only (sub-agents excluded).

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoSort order - 'date', 'messages', 'cost', or 'tokens'date
limitNoMax results (default 20, max 50)
directoryNoOptional project directory filter

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, covering the safety profile. The description adds behavioral context by specifying that only root sessions are returned and that directory filtering applies, which goes beyond the schema. It does not describe return format or pagination, but the presence of an output schema mitigates this. No contradiction with annotations.

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 short sentences, with the first sentence stating the core purpose and the second providing a key scoping constraint. Every word earns its place—no fluff, no redundancy. It is front-loaded with the action and resource first.

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 read-only listing tool with full parameter documentation, annotations, and an output schema, the description is adequate. It clearly defines what the tool does and its scope. The only missing element is explicit guidance on when to choose this over sibling tools, but given the tool's simplicity, the provided context is sufficient for correct invocation.

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%, as all three parameters (sort, limit, directory) have descriptions. The description's mention of 'filtered by directory' aligns with the directory parameter but adds no new semantics beyond the schema. This matches the baseline of 3 for high schema coverage.

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 tool's function: 'Browse sessions filtered by directory'. It adds a critical scope constraint with 'Root sessions only (sub-agents excluded)', which distinguishes it from sibling tools that might list sub-agent sessions or search sessions differently. The verb 'browse' and resource 'sessions' are specific and immediately convey the action.

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 implies usage context: browsing sessions at the root level, optionally filtered by directory. The exclusion of sub-agents is a clear when-not-to-use condition. However, it does not explicitly mention alternatives like 'search_history' or 'find_sessions_by_file', nor does it state when to prefer this over them, so it falls short of a full 5.

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

search_historyA
Read-onlyIdempotent

Search past OpenCode conversations by keyword (full-text on user prompts and assistant responses).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 10, max 20)
queryYesSearch terms (supports FTS5 syntax: keywords, phrases, prefixes)
directoryNoOptional project directory to scope results. If omitted, searches globally.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds useful behavioral context by stating that the full-text search covers both user prompts and assistant responses, which is not obvious from the schema alone. It does not contradict annotations.

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, well-structured sentence that is front-loaded with the action and resource, and provides a parenthetical clarification. Every word earns its place with zero fluff.

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?

With a simple 3-parameter schema, full parameter documentation, safety annotations, and an output schema, the description need only cover purpose and search scope. It does so completely. The lack of alternative guidance is already factored into usage_guidelines.

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?

Since schema description coverage is 100%, the baseline is 3. The description adds extra meaning by clarifying that the 'query' searches over user prompts and assistant responses, which is not specified in the parameter descriptions. This adds value beyond the 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 uses a specific verb ('Search') and resource ('past OpenCode conversations'), and specifies the scope ('full-text on user prompts and assistant responses'). This clearly distinguishes it from sibling tools like list_sessions or get_session_detail, which are about listing or retrieving sessions rather than searching content.

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 implies its usage: when you need to find past conversations by content keywords. However, it does not explicitly mention when not to use it or point to alternatives among siblings (e.g., find_sessions_by_file for file-based search). No exclusions or comparisons are provided.

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. Dates show when Glama detected each change.

  1. 7 tool updatesv0.1.0
    • First observedfind_related_work
    • First observedfind_sessions_by_file
    • First observedget_session_detail
    • First observedget_session_messages
    • First observedget_stats
    • First observedlist_sessions
    • First observedsearch_history

TDQS

A4.2/5.0
Disambiguation4/5

While search_history and find_related_work both search text, they target different fields (full conversation vs. titles/initial prompts) and the descriptions explicitly distinguish them. All other tools are clearly distinct by resource type (sessions, files, stats).

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case, with modifiers like 'by_file' and 'by_related_work' for clarity.

Tool Count5/5

Seven tools provide a tight, focused set for browsing session history without redundancy.

Completeness5/5

The tool set covers discovery (search, file lookup, related work, list), detail retrieval, message reading, and aggregate stats—no obvious dead ends for a read-only history server.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables comprehensive search and analysis of Claude Code conversation history using full-text search, optional semantic vector search, and conversation management tools. Provides fast SQLite-based indexing with role-based filtering, project organization, and hybrid search capabilities combining keyword and semantic matching.
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables searching and analyzing GitHub Copilot's conversation history stored locally, providing tools for full-text search, session listing, statistics, and file-based retrieval.
    6
    4
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local index and hybrid search (SQLite FTS5 + on-device vector KNN) over your AI coding-agent conversation history across 11 tools (Claude Code, Codex, Cursor, and more). Exposes search_threads, search_current_project, recent_threads, get_thread, list_tags, and list_open_todos so any agent can recall its own past work.
    22
    36
    AGPL 3.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/singleflo/opencode-history-mcp'

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