Skip to main content
Glama
ttrine

transcript-search

by ttrine

Semantic Transcript Search

A semantic search system for Claude Code transcript history, exposed as an MCP server so Claude Code can query its own past sessions.

Architecture

~/.claude/projects/**/*.jsonl  →  Indexer  →  Qdrant (localhost:6333)
                                               ↑
Claude Code  →  MCP Server  →  Query API  ────┘
                                ↓
                        OpenAI Embeddings

Related MCP server: conversation-history-mcp

Prerequisites

  • Python 3.12+

  • Qdrant running locally on port 6333

  • OpenAI API key

Starting Qdrant

Using Docker:

docker run -p 6333:6333 -v $(pwd)/qdrant_storage:/qdrant/storage qdrant/qdrant

Or install and run locally following Qdrant docs.

Installation

git clone https://github.com/ttrine/semantic-transcript-search.git
cd semantic-transcript-search
uv sync

Configuration

Create a config file at ~/.config/transcript-search/config.json:

{
  "openai_api_key": "sk-...",
  "qdrant_url": "http://localhost:6333",
  "collection_name": "claude_transcripts",
  "embedding_model": "text-embedding-3-small",
  "embedding_dimensions": 1536
}

Note: If using text-embedding-3-large, set embedding_dimensions to 3072.

Alternatively, set environment variables:

  • OPENAI_API_KEY - Your OpenAI API key

  • QDRANT_URL - Qdrant server URL (defaults to http://localhost:6333)

Usage

Run the watcher service to automatically index new and modified transcripts:

uv run transcript-watcher

Options:

  • --foreground: Run in foreground with console logging

  • --force-reindex: Re-index all files before watching

  • --no-initial-index: Skip initial indexing, watch only

  • --debounce FLOAT: Debounce delay in seconds (default: 2.0)

  • --watch-path PATH: Custom path to watch

macOS launchd Service

To run the watcher as a background service that starts at login:

# Install the service
cp launchd/com.transcript-search.watcher.plist ~/Library/LaunchAgents/

# Edit the plist to set the correct path to transcript-watcher binary
# Then load the service
launchctl load ~/Library/LaunchAgents/com.transcript-search.watcher.plist

# Check status
launchctl list | grep transcript

# View logs
tail -f ~/.local/log/transcript-search/watcher.log

# Stop service
launchctl unload ~/Library/LaunchAgents/com.transcript-search.watcher.plist

One-Time Indexing

For manual/one-time indexing of all Claude Code transcripts:

uv run index-transcripts

Options:

  • --force: Re-index all files (ignores cache)

  • --stats: Show collection statistics

  • --base-path PATH: Custom path to search for transcripts

uv run search-transcripts "how did we implement the TDD workflow?"

Options:

  • -n, --limit: Number of results (default: 10)

  • -p, --project: Filter by project path

  • -t, --type: Filter by message type (user/assistant)

  • -j, --json-output: Output as JSON

  • -f, --full: Show full content instead of preview

MCP Server Integration

Add to your Claude Code MCP configuration (~/.claude/mcp.json):

{
  "mcpServers": {
    "transcript-search": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/semantic-transcript-search", "python", "-m", "transcript_search.mcp_server"]
    }
  }
}

After restarting Claude Code, the search_transcripts tool will be available.

MCP Tools

search_transcripts

Search through past Claude Code session transcripts using semantic similarity.

Parameters:

  • query (required): The search query

  • limit: Maximum results (default: 10)

  • project_filter: Filter to specific project

  • message_type: Filter by "user" or "assistant"

get_session_context

Retrieve full context from a specific session after finding a relevant match.

Parameters:

  • session_id (required): The session ID to retrieve

  • limit: Maximum messages (default: 50)

Development

Install dev dependencies:

uv sync --extra dev

Run unit tests:

uv run pytest tests/ -m "not integration" -v

Run integration tests (requires running Qdrant and valid OpenAI API key):

uv run pytest tests/ -m integration -v

Run all tests:

uv run pytest tests/ -v

License

MIT

Available Tools

2 tools
get_session_contextB

Retrieve full context from a specific Claude Code session. Use this after finding a relevant result to get more context from that session.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of messages to return (default: 50)
session_idYesThe session ID to retrieve context from

TDQS

B3.4/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. It only says 'retrieve full context' without disclosing what that context includes, the return structure, pagination behavior, or any operational side effects. For a tool with no annotation coverage, this is a significant gap.

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?

Two concise sentences, with the primary purpose front-loaded and the usage guidance following. There is slight redundancy between 'retrieve full context' and 'get more context from that session,' but the overall structure is efficient.

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 simple 2-parameter tool, the description covers the core use case and when to call it. However, it leaves gaps: what 'full context' means, how to obtain the session_id, and what the response looks like. Acceptable but not rich enough for a tool with no annotations or 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 100%, so both session_id and limit are already documented. The description adds no parameter-level detail beyond reinforcing that session_id identifies the target session, so the baseline of 3 applies.

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 ('Retrieve') and resource ('full context from a specific Claude Code session'). It also implies a distinction from the sibling tool by positioning itself as a follow-up to finding a relevant result, though it does not explicitly name the sibling.

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 second sentence explicitly tells the agent when to use this tool: after finding a relevant result, to get more context from that session. This provides clear usage context, though it does not name the alternative search tool or describe exclusion conditions.

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

search_transcriptsA

Search through past Claude Code session transcripts using semantic similarity. Use this to find past discussions, solutions, or context from previous coding sessions. Returns matched content with session metadata for navigation.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10)
queryYesThe search query describing what you're looking for
message_typeNoOptional filter by message type
project_filterNoOptional filter to limit search to a specific project path

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that matching is semantic-similarity-based and that results include matched content plus session metadata for navigation, which is meaningful beyond the tool name. It does not discuss edge cases like result truncation, but the core behavior is clearly communicated.

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 sentences, each with a distinct job: what the tool does, when to use it, and what it returns. There is no filler or redundancy, and the core action appears immediately.

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 moderately simple search tool with a fully described parameter schema, the description covers the purpose, usage context, matching mechanism, and return shape. Since there is no output schema, the mention of 'matched content with session metadata for navigation' is useful, though exact result fields are left unspecified.

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 documents all four parameters with descriptions, so the description does not need to compensate for missing parameter details. The phrase 'using semantic similarity' adds useful context that the query is a natural-language semantic query, but this is only a modest improvement over the schema.

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 names a specific action ('Search through past Claude Code session transcripts') and a distinctive method ('semantic similarity'), making the resource and behavior clear. It does not explicitly contrast with the sibling get_session_context, but the search-focused verb and scope leave little 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 provides explicit use cases: 'find past discussions, solutions, or context from previous coding sessions.' It tells an agent when to use the tool, though it does not mention when not to use it or directly route to the sibling tool.

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. 2 tool updatesv0.1.0
    • First observedget_session_context
    • First observedsearch_transcripts

TDQS

A4/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one searches across transcripts, the other retrieves full session context. No overlap or ambiguity in their roles.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern using snake_case: search_transcripts and get_session_context. The naming is predictable and uniform.

Tool Count4/5

With only 2 tools, the set is minimal, but it is appropriately scoped for a narrow transcript search-and-retrieve workflow. Slightly on the thin side, though reasonable for the stated purpose.

Completeness5/5

The workflow is complete: search for relevant transcripts and then retrieve full session context. No obvious missing operations for the domain.

Maintenance

ActivityInactive
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

  • 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.
    26
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server for Claude Code that enables semantic search of past session transcripts and intelligent session forking, allowing users to find and resume from relevant previous conversations with full context.
    13
    8
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Capture, index, and search your Claude Code conversation history. Provides an MCP server for Claude Code to query its own past conversations.
    3
    1
    MIT

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/ttrine/semantic-transcript-search'

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