Skip to main content
Glama
velenzaboc

AI Agent History RAG MCP Server

by velenzaboc

AI Agent History RAG MCP Server

An MCP (Model Context Protocol) server that provides RAG (Retrieval-Augmented Generation) over AI coding agent and chat history (Claude Code, Codex, Gemini CLI, Antigravity, ChatGPT exports, and Claude app exports). It solves the compaction problem where long sessions lose context by providing persistent, searchable memory across all sessions and tools.

Features

  • Multi-Agent History: Ingests Claude Code, Codex, Gemini CLI, Google Antigravity, ChatGPT exports, and Claude app exports

  • Semantic Search: Find relevant context from past conversations using natural language queries

  • Hybrid Search: Combines vector similarity and BM25 full-text search with RRF reranking

  • File Change Tracking: Search for specific file modifications across all sessions

  • Session Summaries: Retrieve summaries of past sessions

  • Real-time Indexing: Automatically watches and indexes new conversation data

  • Incremental Updates: Only processes new content, not entire files

  • Multi-Machine Support: Centralize history from multiple machines to a single server

  • Offline Resilience: Client mode queues uploads when server is unavailable

  • Client Registry: Track connected clients, last uploads, and reindex status

  • Server-Triggered Reindex: One click to reindex server + notify clients

  • Diagnostic Tool: Built-in doctor command for troubleshooting (cross-platform)

  • Installation Wizard: Interactive setup with automatic verification

Related MCP server: hive-memory

Supported Sources

  • Claude Code: ~/.claude/projects/**/*.jsonl

  • Codex: ~/.codex/sessions/**/*.jsonl

  • Gemini CLI: ~/.gemini/tmp/**/chats/*.json and ~/.gemini/tmp/**/logs.json

  • Google Antigravity: ~/.gemini/antigravity/brain/**/.system_generated/logs/transcript_full.jsonl with legacy ~/.gemini/antigravity/conversations/*.pb fallback

  • ChatGPT web/Desktop: official export conversations.json dropped under ~/.claude-history-rag/imports/chatgpt/**/conversations.json

  • Claude web/Desktop app: official export conversations.json dropped under ~/.claude-history-rag/imports/claude-app/**/conversations.json

All sources are ingested fully (user, assistant, tool calls, and tool outputs). The only difference between sources is how we parse their on-disk formats and where we watch for files.

ChatGPT and Claude app do not currently provide a stable supported local transcript folder comparable to Claude Code/Codex/Gemini CLI. Their watchers are live drop-folder watchers for official exports: export from the app/web UI, extract the ZIP, and place the extracted folder under the configured import directory. The watcher indexes new or replaced conversations.json files automatically.

About diffs and file changes

Diffs are ingested when the tool provides them:

  • Codex: apply_patch tool calls include the patch diff in arguments.

  • Gemini CLI: tool calls may include diffs in args.patch or resultDisplay.

  • Claude Code: tool logs include file operations and edit snippets, but full diffs are not guaranteed unless the tool output contains them.

We always store full tool outputs; no truncation.

Architecture Overview

The system supports two deployment modes:

Single-Machine Mode (Default)

Everything runs locally - embeddings, storage, and search all happen on one machine.

┌─────────────────────────────────────────────────────────────┐
│                     Local Machine                            │
│                                                              │
│  Claude Code ──► MCP Server ──► Daemon ──► LanceDB          │
│                                    │                         │
│                              Embeddings (Ollama/OpenAI API) │
└─────────────────────────────────────────────────────────────┘

Multi-Machine Mode (Client/Server)

Consolidate conversation history from multiple machines to a central server:

┌─────────────────────────┐     ┌─────────────────────────┐
│      Machine 1          │     │      Machine 2          │
│                         │     │                         │
│  Claude Code            │     │  Claude Code            │
│       │                 │     │       │                 │
│       ▼                 │     │       ▼                 │
│  MCP Client ────────────┼─────┼─► MCP Client            │
│  (chunks only)          │     │  (chunks only)          │
└─────────────────────────┘     └─────────────────────────┘
              │                           │
              │      HTTP POST            │
              ▼                           ▼
┌─────────────────────────────────────────────────────────────┐
│                    Central Server                            │
│                                                              │
│  API Endpoints ◄── Status Server (port 4680)                │
│       │                                                      │
│       ▼                                                      │
│  Embedder ──► LanceDB ──► Search API                        │
│  (Ollama/vLLM/OpenAI)                                       │
└─────────────────────────────────────────────────────────────┘

Benefits of multi-machine mode:

  • Search across all your machines' conversation history from any machine

  • Centralized embeddings - only one machine needs GPU/compute resources

  • Offline resilience - clients queue uploads when server is unavailable

  • Catch-up sync - reconnecting clients automatically upload missed content

Installation

Prerequisites

The server uses an OpenAI-compatible embeddings API for generating vectors. This works with:

  • Ollama (recommended for local use)

  • vLLM

  • text-embeddings-inference

  • OpenAI API

  • LiteLLM

  • Any other service implementing the /v1/embeddings endpoint

# Clone the repository
git clone https://github.com/bmeyer99/claude-history-rag-mcp.git
cd claude-history-rag-mcp

# Install all dependencies (both server and client)
uv sync --all-extras

# Or install only what you need:
uv sync --extra server   # Server mode (embeddings + storage)
uv sync --extra client   # Client mode (lightweight, uploads only)

Using pip

# Full installation
pip install -e ".[all]"

# Server only
pip install -e ".[server]"

# Client only (lightweight)
pip install -e ".[client]"

Quick Start

Native MCP Install

The retired Python wizard is not a supported installation path. Configure the daemon with the platform service scripts, then install the production MCP STDIO proxy only through its native, production-gated installer. After exporting the complete production environment shown below, write the proxy into a JSON client config with:

./scripts/history-rag-mcp-native.sh \
  --install-json "$HOME/.claude.json" \
  "$(pwd)/scripts/history-rag-mcp-native.sh"

The native installer validates the same production shape as the daemon before writing the client entry. It preserves unrelated JSON keys, writes an owner-only file, and never embeds the daemon PSK. An impersonated ADC profile is accepted only when its nested source is a keyless authorized_user profile with no private-key fields, delegates, target drift, symlink, or permissive file mode. JSON clients with a different wrapper shape must be migrated explicitly; the installer does not guess or rewrite them.

Docker (Server Only)

  1. Start Ollama on your host machine:

    ollama serve
    ollama pull bge-m3
  2. Start the container:

    docker compose up -d

Access the dashboard at http://localhost:4680/dashboard

The container connects to Ollama on your host via host.docker.internal. On Linux with custom Docker networks, host.docker.internal may not resolve—either keep the default bridge network or point the embedding URL to your host’s IP address.

Configuration: Create a .env file to customize the embedding server:

# Use a different embedding server (default: host.docker.internal:11434)
CLAUDE_HISTORY_RAG_EMBEDDING_BASE_URL=http://192.168.1.100:11434/v1

PSK Authentication (recommended behind TLS):

# Enable PSK auth and set a server key override
CLAUDE_HISTORY_RAG_AUTH_ENABLED=true
CLAUDE_HISTORY_RAG_SERVER_PSK=change-me

Use the environment variable reference below for the full option list.

Client machines can connect to this Docker server:

export CLAUDE_HISTORY_RAG_SERVER_URL=http://docker-host:4680
uv run ai-agent-history-rag-daemon start

Single-Machine Setup (Default)

  1. Start Ollama (or another embeddings server):

    ollama serve
    ollama pull nomic-embed-text
  2. Start the daemon:

    uv run ai-agent-history-rag-daemon start
  3. Configure Claude Code (see Configuration section below)

Multi-Machine Setup

On the Central Server

  1. Start the embeddings server (Ollama example):

    ollama serve
    ollama pull nomic-embed-text
  2. Start the daemon in server mode (no SERVER_URL set):

    # Bind to all interfaces to accept remote connections
    CLAUDE_HISTORY_RAG_STATUS_SERVER_HOST=0.0.0.0 \
    uv run ai-agent-history-rag-daemon start
  3. The server exposes:

    • Dashboard: http://server-ip:4680/dashboard

    • API: http://server-ip:4680/api/

On Each Client Machine

  1. Configure to point to the server:

    export CLAUDE_HISTORY_RAG_SERVER_URL=http://192.168.1.100:4680
    export CLAUDE_HISTORY_RAG_MACHINE_ID=my-laptop  # Optional, defaults to hostname
    export CLAUDE_HISTORY_RAG_CLIENT_NAME="Brandon MacBook"  # Optional label
  2. Start the daemon in client mode:

    uv run ai-agent-history-rag-daemon start
  3. Configure Claude Code to use the MCP server (see Configuration section)

Velenza Production Spanner Runtime

The Velenza production daemon runs in server mode against the shared Spanner DB. It must be explicit: do not rely on the local LanceDB default for production status or search.

export CLAUDE_HISTORY_RAG_RUNTIME_CONTRACT=production
export CLAUDE_HISTORY_RAG_STORAGE_BACKEND=spanner
export CLAUDE_HISTORY_RAG_SPANNER_PROJECT=<your-gcp-project>
export CLAUDE_HISTORY_RAG_SPANNER_INSTANCE=<your-spanner-instance>
export CLAUDE_HISTORY_RAG_SPANNER_DATABASE=ai-agent-history-rag
export CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODE=spanner
export CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODEL_ID=ConversationEmbeddingModel
export CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDER=vertex
export CLAUDE_HISTORY_RAG_EMBEDDING_MODEL=gemini-embedding-001
export CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSION=3072
export CLAUDE_HISTORY_RAG_STATUS_SERVER_HOST=127.0.0.1
export CLAUDE_HISTORY_RAG_STATUS_SERVER_PORT=4680
export CLAUDE_HISTORY_RAG_CREDENTIALS_SOURCE=application_default
export CLAUDE_HISTORY_RAG_CREDENTIALS_PROFILE=impersonated_service_account
export CLAUDE_HISTORY_RAG_CREDENTIALS_IDENTITY=<dedicated-runtime-service-account>
export GOOGLE_APPLICATION_CREDENTIALS=<path-to-keyless-impersonated-adc-profile.json>
export GOOGLE_CLOUD_PROJECT=<your-gcp-project>
uv run ai-agent-history-rag-daemon start

These are deployment-specific and this repository is public, so it ships placeholders rather than any real project or instance. scripts/install-launchd.sh reads the same variables from your environment and fails with a readable message if they are unset, instead of generating a launch agent pointed at somebody else's project.

The launchd source at scripts/com.ai-agent-history-rag.daemon.plist.template pins the same contract, including:

  • watch roots: ~/.claude/projects, ~/.codex/sessions, ~/.gemini/tmp, ~/.gemini/antigravity, ~/.claude-history-rag/imports/chatgpt, and ~/.claude-history-rag/imports/claude-app

  • state/auth roots: ~/.claude-history-rag/*.json

  • credentials: a short-lived, exact-target impersonated ADC profile for the local daemon; GOOGLE_APPLICATION_CREDENTIALS is only the standard ADC carrier and the runtime rejects service-account-key JSON, private-key fields, target drift, and broad gcloud-user fallback

On another workstation, point at that server and use a stable machine id:

export CLAUDE_HISTORY_RAG_SERVER_URL=http://<server-ip>:4680
export CLAUDE_HISTORY_RAG_MACHINE_ID=<workstation-name>
export CLAUDE_HISTORY_RAG_CLIENT_NAME="<human readable name>"
uv run ai-agent-history-rag-daemon start

Each workstation watches its local Claude Code, Codex, Gemini, Antigravity, ChatGPT export, and Claude app export roots, then uploads chunks to the central server. Rows keep their machine_id, so search spans all machines while purge/reindex can remain machine-scoped.

Configuration

Claude Code MCP Settings

Option 1: Using claude mcp add-json

The daemon must already be running under the production contract. Point the client at the native proxy and project the same non-secret production environment:

claude mcp add-json ai-agent-history-rag '{
  "command": "/path/to/claude-history-rag-mcp/scripts/history-rag-mcp-native.sh",
  "args": [],
  "env": {
    "CLAUDE_HISTORY_RAG_RUNTIME_CONTRACT": "production",
    "CLAUDE_HISTORY_RAG_STORAGE_BACKEND": "spanner",
    "CLAUDE_HISTORY_RAG_SPANNER_PROJECT": "<your-gcp-project>",
    "CLAUDE_HISTORY_RAG_SPANNER_INSTANCE": "<your-spanner-instance>",
    "CLAUDE_HISTORY_RAG_SPANNER_DATABASE": "ai-agent-history-rag",
    "CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODE": "spanner",
    "CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODEL_ID": "ConversationEmbeddingModel",
    "CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDER": "vertex",
    "CLAUDE_HISTORY_RAG_EMBEDDING_MODEL": "gemini-embedding-001",
    "CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSION": "3072",
    "CLAUDE_HISTORY_RAG_STATUS_SERVER_HOST": "127.0.0.1",
    "CLAUDE_HISTORY_RAG_STATUS_SERVER_PORT": "4680",
    "CLAUDE_HISTORY_RAG_CREDENTIALS_SOURCE": "application_default",
    "CLAUDE_HISTORY_RAG_CREDENTIALS_PROFILE": "impersonated_service_account",
    "CLAUDE_HISTORY_RAG_CREDENTIALS_IDENTITY": "<dedicated-runtime-service-account>",
    "GOOGLE_APPLICATION_CREDENTIALS": "<path-to-keyless-impersonated-adc-profile.json>"
  }
}'

Replace /path/to/claude-history-rag-mcp with your actual project path.

Option 2: Manual Configuration

Add to ~/.config/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "ai-agent-history-rag": {
      "command": "/path/to/claude-history-rag-mcp/scripts/history-rag-mcp-native.sh",
      "args": [],
      "env": {
        "CLAUDE_HISTORY_RAG_RUNTIME_CONTRACT": "production",
        "CLAUDE_HISTORY_RAG_STORAGE_BACKEND": "spanner",
        "CLAUDE_HISTORY_RAG_SPANNER_PROJECT": "<your-gcp-project>",
        "CLAUDE_HISTORY_RAG_SPANNER_INSTANCE": "<your-spanner-instance>",
        "CLAUDE_HISTORY_RAG_SPANNER_DATABASE": "ai-agent-history-rag",
        "CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODE": "spanner",
        "CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODEL_ID": "ConversationEmbeddingModel",
        "CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDER": "vertex",
        "CLAUDE_HISTORY_RAG_EMBEDDING_MODEL": "gemini-embedding-001",
        "CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSION": "3072",
        "CLAUDE_HISTORY_RAG_STATUS_SERVER_HOST": "127.0.0.1",
        "CLAUDE_HISTORY_RAG_STATUS_SERVER_PORT": "4680",
        "CLAUDE_HISTORY_RAG_CREDENTIALS_SOURCE": "application_default",
        "CLAUDE_HISTORY_RAG_CREDENTIALS_PROFILE": "impersonated_service_account",
        "CLAUDE_HISTORY_RAG_CREDENTIALS_IDENTITY": "<dedicated-runtime-service-account>",
        "GOOGLE_APPLICATION_CREDENTIALS": "<path-to-keyless-impersonated-adc-profile.json>"
      }
    }
  }
}

Environment Variables

Core Settings

Variable

Default

Description

CLAUDE_HISTORY_RAG_RUNTIME_CONTRACT

""

Set to production for the Velenza launchd runtime; exact Spanner coordinates, status port, watch roots, and credential path are validated at daemon startup

CLAUDE_HISTORY_RAG_DB_PATH

~/.claude-history-rag/lancedb

LanceDB database location

CLAUDE_HISTORY_RAG_STATE_PATH

~/.claude-history-rag/state.json

File position state

CLAUDE_HISTORY_RAG_PROJECTS_PATH

~/.claude/projects

Claude Code projects directory

CLAUDE_HISTORY_RAG_CODEX_SESSIONS_PATH

~/.codex/sessions

Codex session history directory

CLAUDE_HISTORY_RAG_CODEX_STATE_PATH

~/.claude-history-rag/codex_state.json

Codex file position state

CLAUDE_HISTORY_RAG_GEMINI_SESSIONS_PATH

~/.gemini/tmp

Gemini CLI session history directory

CLAUDE_HISTORY_RAG_GEMINI_STATE_PATH

~/.claude-history-rag/gemini_state.json

Gemini file position state

CLAUDE_HISTORY_RAG_ANTIGRAVITY_SESSIONS_PATH

~/.gemini/antigravity

Google Antigravity history root

CLAUDE_HISTORY_RAG_ANTIGRAVITY_STATE_PATH

~/.claude-history-rag/antigravity_state.json

Google Antigravity file position state

CLAUDE_HISTORY_RAG_CHATGPT_EXPORTS_PATH

~/.claude-history-rag/imports/chatgpt

ChatGPT official export drop folder

CLAUDE_HISTORY_RAG_CHATGPT_STATE_PATH

~/.claude-history-rag/chatgpt_state.json

ChatGPT export file position state

CLAUDE_HISTORY_RAG_CLAUDE_APP_EXPORTS_PATH

~/.claude-history-rag/imports/claude-app

Claude web/Desktop app export drop folder

CLAUDE_HISTORY_RAG_CLAUDE_APP_STATE_PATH

~/.claude-history-rag/claude_app_state.json

Claude app export file position state

CLAUDE_HISTORY_RAG_LOG_LEVEL

INFO

Logging level

Client/Server Mode

Variable

Default

Description

CLAUDE_HISTORY_RAG_SERVER_URL

None

Central server URL. If set, runs in client mode

CLAUDE_HISTORY_RAG_MACHINE_ID

hostname

Unique identifier for this machine

CLAUDE_HISTORY_RAG_CLIENT_NAME

""

Optional human-friendly label for this client

CLAUDE_HISTORY_RAG_UPLOAD_INTERVAL_SECONDS

300

Batch upload interval (5 min)

CLAUDE_HISTORY_RAG_UPLOAD_RETRY_COUNT

3

Retries before queuing for later

CLAUDE_HISTORY_RAG_UPLOAD_RETRY_DELAY_SECONDS

30

Delay between retries

CLAUDE_HISTORY_RAG_CLIENT_HEARTBEAT_INTERVAL_SECONDS

60

Client heartbeat interval

Embedding Settings

Variable

Default

Description

CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDER

openai

openai for OpenAI-compatible APIs, vertex for Vertex AI

CLAUDE_HISTORY_RAG_EMBEDDING_BASE_URL

http://localhost:11434/v1

Embeddings API base URL

CLAUDE_HISTORY_RAG_EMBEDDING_MODEL

nomic-embed-text

Model name

CLAUDE_HISTORY_RAG_EMBEDDING_API_KEY

""

API key (for OpenAI, etc.)

CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSION

model default

Optional output/storage dimension override

CLAUDE_HISTORY_RAG_OPENAI_EMBEDDING_SEND_DIMENSIONS

false

Send dimensions to OpenAI-compatible APIs

CLAUDE_HISTORY_RAG_VERTEX_PROJECT

ADC/gcloud project

Vertex AI project

CLAUDE_HISTORY_RAG_VERTEX_LOCATION

us-central1

Vertex AI location

CLAUDE_HISTORY_RAG_VERTEX_AUTO_TRUNCATE

true

Let Vertex truncate oversized embedding inputs

CLAUDE_HISTORY_RAG_VERTEX_QUERY_TASK_TYPE

RETRIEVAL_QUERY

Vertex task type for query embeddings

CLAUDE_HISTORY_RAG_VERTEX_DOCUMENT_TASK_TYPE

RETRIEVAL_DOCUMENT

Vertex task type for document embeddings

Example URLs:

  • Ollama: http://localhost:11434/v1

  • vLLM: http://localhost:8000/v1

  • OpenAI: https://api.openai.com/v1

  • text-embeddings-inference: http://localhost:8080/v1

Vertex AI example:

export CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDER=vertex
export CLAUDE_HISTORY_RAG_EMBEDDING_MODEL=gemini-embedding-001
export CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSION=3072
export CLAUDE_HISTORY_RAG_VERTEX_PROJECT=<your-gcp-project>
export CLAUDE_HISTORY_RAG_VERTEX_LOCATION=us-central1

Storage Settings

Variable

Default

Description

CLAUDE_HISTORY_RAG_STORAGE_BACKEND

lancedb

lancedb for local development or spanner; Velenza production must set spanner

CLAUDE_HISTORY_RAG_SPANNER_PROJECT

""

Cloud Spanner project; required when storage_backend=spanner

CLAUDE_HISTORY_RAG_SPANNER_INSTANCE

""

Cloud Spanner instance ID; required when storage_backend=spanner

CLAUDE_HISTORY_RAG_SPANNER_DATABASE

""

Cloud Spanner database ID; required when storage_backend=spanner

CLAUDE_HISTORY_RAG_SPANNER_ENABLE_FULL_TEXT

true

Create/use Spanner full-text search index

CLAUDE_HISTORY_RAG_SPANNER_ENABLE_VECTOR_INDEX

true

Create/use Spanner vector index

CLAUDE_HISTORY_RAG_SPANNER_USE_APPROX_VECTOR_SEARCH

true

Use indexed ANN when query shape supports it

CLAUDE_HISTORY_RAG_SPANNER_VECTOR_INDEX_LEAVES

1000

Spanner vector index leaf count

CLAUDE_HISTORY_RAG_SPANNER_NUM_LEAVES_TO_SEARCH

50

ANN recall/latency search knob

CLAUDE_HISTORY_RAG_SPANNER_HYBRID_CANDIDATE_LIMIT

100

Candidate pool for vector/text RRF fusion

CLAUDE_HISTORY_RAG_SPANNER_RRF_K

60

Reciprocal-rank fusion constant

CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODE

app

app embeds before write, spanner uses ML.PREDICT

CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODEL_ID

ConversationEmbeddingModel

Registered Spanner model name

Spanner example:

export CLAUDE_HISTORY_RAG_STORAGE_BACKEND=spanner
export CLAUDE_HISTORY_RAG_SPANNER_PROJECT=<your-gcp-project>
export CLAUDE_HISTORY_RAG_SPANNER_INSTANCE=<your-spanner-instance>
export CLAUDE_HISTORY_RAG_SPANNER_DATABASE=<your-rag-database>

Spanner + Vertex native embedding example:

export CLAUDE_HISTORY_RAG_STORAGE_BACKEND=spanner
export CLAUDE_HISTORY_RAG_SPANNER_PROJECT=<your-gcp-project>
export CLAUDE_HISTORY_RAG_SPANNER_INSTANCE=<your-spanner-instance>
export CLAUDE_HISTORY_RAG_SPANNER_DATABASE=<your-rag-database>
export CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODE=spanner
export CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODEL_ID=ConversationEmbeddingModel
export CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDER=vertex
export CLAUDE_HISTORY_RAG_EMBEDDING_MODEL=gemini-embedding-001
export CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSION=3072

Status Server Settings

Variable

Default

Description

CLAUDE_HISTORY_RAG_STATUS_SERVER_ENABLED

true

Enable HTTP status server

CLAUDE_HISTORY_RAG_STATUS_SERVER_HOST

127.0.0.1

Status server host

CLAUDE_HISTORY_RAG_STATUS_SERVER_PORT

4680

Status server port

Auth (PSK) Settings

Variable

Default

Description

CLAUDE_HISTORY_RAG_AUTH_ENABLED

true

Require PSK on status + API endpoints

CLAUDE_HISTORY_RAG_SERVER_PSK

""

Optional server PSK override (disables rotation UI)

CLAUDE_HISTORY_RAG_CLIENT_PSK

""

Optional client PSK override (if unset, uses local JSON)

CLAUDE_HISTORY_RAG_AUTH_STATE_PATH

~/.claude-history-rag/auth.json

Server auth state (rotation, allowlist, hashes)

CLAUDE_HISTORY_RAG_CLIENT_AUTH_PATH

~/.claude-history-rag/client_auth.json

Client PSK storage

Performance Settings

Variable

Default

Description

CLAUDE_HISTORY_RAG_DEBOUNCE_DELAY

5000

File watcher debounce (ms)

CLAUDE_HISTORY_RAG_BATCH_SIZE

32

Embedding batch size

CLAUDE_HISTORY_RAG_MAX_CHUNKS_PER_FILE

100

Max chunks per batch

CLAUDE_HISTORY_RAG_MAX_FILE_BATCH_SIZE

50

Files to process before GC

CLAUDE_HISTORY_RAG_GC_AFTER_FILES

true

Enable garbage collection

CLAUDE_HISTORY_RAG_DEFER_STARTUP_INDEXING

false

Skip initial indexing on startup

Embedding Model Selection

The server supports multiple embedding models. Choose based on your priorities:

Model

MTEB

Retrieval

Dims

Size

Best For

mxbai-embed-large

64.68

54.39

1024

670MB

Maximum quality

bge-m3

~63

~53

1024

1.2GB

Long context, multilingual

nomic-embed-text

62.28

~50

768

274MB

Balanced (default)

snowflake-arctic-embed

~60

~48

var

46-669MB

Memory-constrained

Switching models requires re-indexing:

# Delete existing index
rm -rf ~/.claude-history-rag/lancedb/

# Set new model
export CLAUDE_HISTORY_RAG_EMBEDDING_MODEL=mxbai-embed-large

# Pull the model (if using Ollama)
ollama pull mxbai-embed-large

# Restart daemon
uv run ai-agent-history-rag-daemon restart

CLI Commands

The daemon package provides its existing management tools. Production MCP uses the separate native proxy:

Command

Description

scripts/history-rag-mcp-native.sh

Production-gated MCP STDIO proxy to the loopback daemon

ai-agent-history-rag-daemon

Background daemon for indexing

ai-agent-history-rag-settings

Interactive settings wizard

scripts/status.sh

Native daemon status and log inspection

scripts/cleanup.sh

Native cleanup helper

docker compose

Declarative Docker deployment path

Run daemon-management commands with their existing package launcher. MCP clients must execute the native proxy directly.

Running Modes

Run the indexer and status server as a standalone background daemon:

# Start the daemon
uv run ai-agent-history-rag-daemon start

# Check daemon status
uv run ai-agent-history-rag-daemon status

# Stop the daemon
uv run ai-agent-history-rag-daemon stop

# Restart the daemon
uv run ai-agent-history-rag-daemon restart

The daemon:

  • Runs in the foreground (use & or a process manager for background)

  • Writes PID to ~/.claude-history-rag/daemon.pid

  • Logs to ~/.claude-history-rag/daemon.log

  • Provides the dashboard at http://127.0.0.1:4680/dashboard

Server mode log output:

Starting daemon [SERVER] | db=~/.claude-history-rag/lancedb | embedding_url=http://localhost:11434/v1 | embedding_model=nomic-embed-text

Client mode log output:

Starting daemon [CLIENT] | server_url=http://192.168.1.100:4680 | machine_id=my-laptop

MCP Process Model

The MCP process is intentionally not a standalone indexer. It validates the full production runtime and credential contract before entering the STDIO loop, then proxies the five tools to the already-running loopback daemon. The retired Python console path fails closed and cannot reach Spanner or Vertex.

Auto-start on Boot

Auto-start services use ai-agent-history-rag-daemon supervise, which replaces any PID-file daemon before staying in the foreground for the service manager. Use start for manual foreground runs.

macOS (launchd)

./scripts/install-launchd.sh

To configure for client mode, edit ~/Library/LaunchAgents/com.ai-agent-history-rag.daemon.plist after installation.

Linux (systemd)

./scripts/install-systemd.sh

To configure environment variables:

# Edit the service file
nano ~/.config/systemd/user/ai-agent-history-rag.service

# Reload and restart
systemctl --user daemon-reload
systemctl --user restart ai-agent-history-rag

Windows (Scheduled Task)

.\scripts\install-windows.ps1

To configure for client mode, set user environment variables (CLAUDE_HISTORY_RAG_SERVER_URL) and restart the task.

Status Monitoring

The status server provides monitoring endpoints:

PSK Authentication & Rotation

All status server endpoints (dashboard + API + health/metrics) require a pre-shared key (PSK) by default. Clients send:

Authorization: Bearer <psk>

TLS required: Run the status server behind HTTPS (e.g., Traefik). The PSK is sent raw over the wire and is only protected by TLS.

Server storage (auth.json):

  • The active key is stored hashed for validation.

  • The active key is also stored in plaintext to support dashboard reveal and rotation flows.

  • If you set CLAUDE_HISTORY_RAG_SERVER_PSK, the dashboard disables rotation (tooltip: “PSK assigned in .env — rotate in your .env and rebuild”).

Client storage (client_auth.json):

  • Clients store the raw PSK locally for requests.

  • The client auth file is written with 0600 permissions on macOS/Linux (best-effort on Windows).

Rotation flow:

  • “Rotate PSK” lets you select existing clients to temporarily keep using the old key for X days.

  • New/unknown clients must use the new key.

  • Clients receive a rotation hint, retry immediately with the new key, and ack success.

  • If rotation fails, the client falls back to the old key and reports an error; the dashboard shows a red Error key status with an “Allow stay” button (temporary allowlist, expires after X days).

Dashboard key reveal:

  • You must unlock the dashboard with the current PSK to access protected endpoints.

  • The dashboard stores a hash in localStorage to authorize key reveal; the PSK itself is only held in-memory while the reveal modal is open.

  • Auto-refresh is paused while the key modal is open.

Key status column:

  • Current (green): using the active key

  • Awaiting Rotation (yellow): allowlisted to use old key

  • Old (orange): old key expired or removed

  • Error (red): failed rotation

Security limitations:

  • The PSK is plaintext in server auth.json to support dashboard reveal/rotation.

  • Protect your host and auth.json file; restrict filesystem access.

  • Do not expose the status server without TLS.

Re-index Behavior (Server Mode)

Using the dashboard Re-index button will:

  1. Clear the server database and reset server-side file positions

  2. Set a reindex request flag for all clients

  3. Clients acknowledge the request, clear their local positions, and re-upload

  4. Clients send a completed ack after uploads finish

You can see client ack status in the dashboard Clients panel.

Client registry data is stored under the configured state directory (e.g., ~/.claude-history-rag/client_registry.json or /data/state in Docker) so it survives upgrades/reinstalls.

API Endpoints (Server Mode)

When running in server mode, additional API endpoints are available for client machines:

Endpoint

Method

Description

/api/chunks

POST

Upload chunks from clients

/api/search

POST

Semantic search

/api/search/files

POST

File change search

/api/sessions

POST

Session summaries

/api/positions/{machine_id}

GET

Get file positions for a machine

/api/positions

POST

Retired direct cursor mutation route; returns 409 cursor_sync_forbidden

/api/reindex-ack

POST

Client acknowledgement for server reindex

/api/purge-client

POST

Purge all chunks for a single client

MCP Tools

search_conversations

Search conversation history for relevant context.

Arguments:
  query: str           - Natural language query
  project_filter: str  - Limit to specific project (optional)
  date_from: str       - Inclusive lower timestamp bound, ISO date/datetime (optional)
  date_to: str         - Inclusive upper timestamp bound, ISO date/datetime (optional)
  limit: int           - Maximum results (default: 5)
  use_hybrid: bool     - Use hybrid search (default: True)

search_file_changes

Find file modifications in conversation history.

Arguments:
  file_path: str       - Filter by file path (optional, supports partial match)
  query: str           - Semantic query about changes (optional)
  project_filter: str  - Limit to specific project (optional)
  operation_filter: str - Filter by "edit" or "write" (optional)
  date_from: str       - Inclusive lower timestamp bound, ISO date/datetime (optional)
  date_to: str         - Inclusive upper timestamp bound, ISO date/datetime (optional)
  limit: int           - Maximum results (default: 10)

get_session_summary

Get summary of conversation session(s).

Arguments:
  session_id: str      - Specific session ID (optional)
  project_filter: str  - Limit to specific project (optional)
  count: int           - Number of sessions (default: 1)

get_index_status

Get status of the RAG index.

Returns:
  mode: str                    - "server" or "client"
  total_chunks: int            - Number of indexed chunks (server mode)
  watched_files: int           - Number of files being tracked
  pending_files: int           - Files in queue for processing
  pending_uploads: int         - Uploads waiting to send (client mode)
  connected: bool              - Server connection status (client mode)
  server_status: dict          - Remote server status (client mode)
  status: str                  - Overall health status

get_server_status

Get comprehensive server status and health information.

Arguments:
  detail_level: str  - "basic" for summary, "full" for detailed metrics (default: "basic")

Returns:
  server: dict      - Version, uptime, PID, platform info
  health: dict      - Overall status and component health checks
  database: dict    - Chunk counts, database size (full detail only)
  indexing: dict    - File processing progress (full detail only)
  performance: dict - Memory, CPU, query metrics (full detail only)
  cache: dict       - Hit rates, cache size (full detail only)

Development

Running Tests

uv run pytest

Linting

uv run ruff check .
uv run ruff format .

Testing with MCP Inspector

npx @modelcontextprotocol/inspector ./scripts/history-rag-mcp-native.sh

Detailed Architecture

Single-Machine Mode

┌─────────────────────────────────────────────────────────────┐
│                     Daemon Process                          │
│  (ai-agent-history-rag-daemon)                                │
│                                                             │
│  ~/.claude/projects/*.jsonl                                 │
│           │                                                 │
│           ▼                                                 │
│     File Watcher ──► Chunker ──► Embedder ──► LanceDB       │
│                                               (shared)      │
│                                                   │         │
│     Status Server (dashboard, health, metrics)    │         │
└───────────────────────────────────────────────────│─────────┘
                                                    │
                                                    ▼
┌─────────────────────────────────────────────────────────────┐
│                   MCP Proxy Process                         │
│  (scripts/history-rag-mcp-native.sh)                        │
│                                                             │
│     Claude Code ◄──► STDIO Transport ◄──► MCP Tools         │
│                                               │             │
│                                               ▼             │
│                                  Loopback daemon API        │
└─────────────────────────────────────────────────────────────┘

Multi-Machine Mode

┌─────────────────────────────────────────────────────────────┐
│                    Client Machine                           │
│                                                             │
│  ~/.claude/projects/*.jsonl                                 │
│           │                                                 │
│           ▼                                                 │
│     File Watcher ──► Chunker ──► HTTP Client                │
│                                      │                      │
│                            ┌─────────┴─────────┐            │
│                            │  Pending Queue    │            │
│                            │  (offline mode)   │            │
│                            └───────────────────┘            │
│                                      │                      │
│     MCP Tools ◄── proxy to server ◄──┘                      │
└──────────────────────────────│──────────────────────────────┘
                               │ HTTP POST /api/chunks
                               │ HTTP POST /api/search
                               ▼
┌─────────────────────────────────────────────────────────────┐
│                    Central Server                           │
│                                                             │
│     API Endpoints ◄── Status Server (port 4680)             │
│           │                                                 │
│           ▼                                                 │
│     Embedder ──► Storage Backend ◄── Search API            │
│     (OpenAI-compatible / Vertex)   (LanceDB / Spanner)     │
│                                                             │
│     Position Tracking (per machine)                        │
└─────────────────────────────────────────────────────────────┘

Offline Resilience (Client Mode)

When the server is unavailable:

  1. Chunking continues locally - Files are still processed into chunks

  2. Uploads are queued durably - A versioned outbox index is stored in ~/.claude-history-rag/client_state.json; bounded payload records are stored alongside it using exclusive randomized atomic writes. Every pending upload binds the canonical request body—including machine, client, chunks, source, and cursor—to a SHA-256 digest, and cursor progress is committed only after complete server acceptance

  3. Retry logic - 3 retries with 30s delay, then waits for next sync interval

  4. Catch-up on reconnect - Compares durable local vs server positions and replays generation-bound gaps without using the retired direct position-sync route

  5. Search degrades gracefully - Returns "server unavailable" error

Chunk Types

  1. Turn chunks: User message paired with assistant response

  2. File change chunks: Extracted from Edit/Write tool_use blocks with parent-child linking

  3. Summary chunks: From compaction events

Each chunk includes machine_id in multi-machine mode for tracking origin.

Tech Stack

  • Python 3.10+ with async/await patterns

  • FastMCP (official MCP SDK) - STDIO transport

  • Storage backends - LanceDB 0.25+ embedded search, or Cloud Spanner vector/full-text/hybrid search

  • Embedding providers - OpenAI-compatible /v1/embeddings API or Vertex AI REST

  • httpx - Async HTTP client for embeddings API and client/server communication

  • watchfiles - Rust-based async file watching

  • pydantic - Data validation and settings

  • aiohttp - Status server and API endpoints

Performance

Metric

Target

Implementation

Query latency

<500ms

LanceDB vector + RRF reranking, or Spanner exact/ANN vector + full-text hybrid search

Indexing

<30s/1000 chunks

Batch embedding, async I/O

Memory idle

<200MB

Lazy model loading

Update latency

<60s

5s debounce + incremental indexing

Troubleshooting

Native Diagnostics

Inspect the daemon and validate the MCP production boundary without invoking a Python wizard:

./scripts/status.sh
./scripts/history-rag-mcp-native.sh --validate-only

The first command reports daemon and log state. The second fails closed unless the complete production runtime and credential contract is valid; it performs no MCP handler or daemon network call during validation.

Client can't connect to server

  1. Check server is running: curl http://server-ip:4680/health

  2. Verify firewall allows port 4680

  3. Check STATUS_SERVER_HOST is set to 0.0.0.0 on server (not 127.0.0.1)

Embeddings failing

  1. Verify embedding server is running: curl http://localhost:11434/v1/models

  2. Check model is pulled: ollama list

  3. Verify EMBEDDING_BASE_URL and EMBEDDING_MODEL are correct

Pending uploads not syncing

  1. Check server connectivity: curl http://server-ip:4680/health

  2. View pending uploads: cat ~/.claude-history-rag/client_state.json

  3. Stale uploads (>72h) are automatically cleared

Roadmap

  • Split LanceDB and Spanner implementations into separate backend modules behind the existing ConversationStore interface.

  • Add typed importers for ChatGPT and Claude app official export ZIP/JSON files.

  • Add a source registration layer so new watchers do not require edits across config, status, docs, and the watcher registry.

  • Extend the dashboard to manage backend settings, source roots, and remote client onboarding.

License

MIT

Available Tools

5 tools
get_index_statusA

Get status of the RAG index.

Use when user asks about memory system health or
why something isn't being found.

Returns:
    Dict with index statistics including:
    - total_chunks: Number of indexed chunks
    - projects_indexed: Number of unique projects
    - watched_files: Number of files being tracked
    - pending_files: Number of files in queue for processing
    - status: Overall health status
    - cache_stats: Search cache statistics (if enabled)
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior3/5

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

No annotations are provided. The description implies a safe read-only operation but does not explicitly state it is non-destructive or disclose any behavioral traits beyond return values, such as authentication needs or rate limits.

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 succinct, uses bullet points for return fields, and front-loads the core purpose. Every sentence adds value without 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?

Given the tool has no parameters and no output schema, the description adequately describes what the tool returns. However, it lacks mention of error conditions or behavior when the index is not initialized, which would enhance completeness.

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

Parameters5/5

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

The input schema has no parameters, and schema description coverage is 100%. The description does not need to add parameter semantics, so it fully meets expectations.

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 it gets the status of the RAG index, with a specific verb ('Get status') and resource ('RAG index'). It distinguishes from sibling tools like 'get_server_status' by focusing on memory system health.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use when user asks about memory system health or why something isn't being found.' This clearly indicates when to invoke the tool.

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

get_server_statusA

Get comprehensive MCP server status and health information.

Use when you need to check server health, performance metrics,
indexing progress, or debug issues with the memory system.

Args:
    detail_level: "basic" for summary info, "full" for detailed metrics
                 including performance, cache stats, and errors

Returns:
    Dict with comprehensive server status including:
    - server: Version, uptime, PID, platform info
    - health: Overall status (healthy/degraded/unhealthy) and component checks
    - database: Chunk counts, size (full detail only)
    - indexing: Progress, files pending/indexed/failed (full detail only)
    - performance: Memory, CPU, query metrics (full detail only)
    - cache: Hit rates, size (full detail only)
    - embedder: Model info, loaded status (full detail only)
    - file_watcher: Running status, queue info (full detail only)
    - errors: Recent errors and counts (full detail only)
    - configuration: Current settings (full detail only)
ParametersJSON Schema
NameRequiredDescriptionDefault
detail_levelNobasic

TDQS

A4.3/5.0
Behavior3/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 does not explicitly state that the tool is read-only or safe for repeated calls, but the return structure implies a non-destructive health check. This is adequate but could be more explicit about side effects or 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.

Conciseness4/5

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

The description is well-structured with clear sections: purpose, usage, args, returns. It is somewhat lengthy but every sentence provides value. It could be slightly more concise without losing clarity.

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 the tool has no output schema, the description provides a comprehensive list of return fields covering server, health, database, indexing, performance, cache, embedder, file_watcher, errors, and configuration. This is more than sufficient for an AI agent to understand the tool's output. The single parameter is fully covered. Sibling tools are distinct, so no missing context.

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

Parameters5/5

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

The one parameter 'detail_level' is fully explained in the description with examples of values ('basic', 'full') and what each returns. The schema only provides name, type, and default, so the description adds essential semantic meaning 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 clearly states 'Get comprehensive MCP server status and health information.' It uses a specific verb and resource, and is distinct from siblings like get_index_status, get_session_summary, etc. No confusion about what the tool does.

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 explicitly says 'Use when you need to check server health, performance metrics, indexing progress, or debug issues with the memory system.' This provides clear context for when to use the tool, though it does not explicitly mention when not to use it or list alternatives beyond the sibling context.

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

get_session_summaryA

Get summary of conversation session(s).

Use for:
- "What did we work on in the last session?"
- "Summarize our recent conversations"

Args:
    session_id: Specific session ID, or None for recent
    project_filter: Limit to specific project
    count: Number of sessions to summarize

Returns:
    Dict with session summaries
ParametersJSON Schema
NameRequiredDescriptionDefault
countNo
session_idNo
project_filterNo

TDQS

A4/5.0
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states the return type ('Dict with session summaries') and parameter explanations, but omits whether the operation is read-only, destructive, or has any side effects, rate limits, or prerequisites. This is insufficient for a tool with no annotation coverage.

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

Conciseness5/5

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

The description is short (7 lines) and well-structured: purpose, usage examples, args, returns. Every sentence adds value, and the key information is front-loaded. No wasted words.

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?

Given the lack of an output schema, the description only vaguely mentions 'Dict with session summaries' without detailing the structure or keys. It also does not cover pagination, error behavior, or performance implications. For a tool with 3 parameters and no additional schema, this is adequate but has notable gaps.

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

Parameters5/5

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

The input schema has no descriptions for its 3 parameters, so the description takes on the full burden. It clearly explains each parameter's meaning and default behavior (e.g., 'session_id: Specific session ID, or None for recent'), adding essential semantics beyond the raw schema types and defaults.

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 'Get summary of conversation session(s)' with a specific verb and resource. It provides concrete usage examples that distinguish it from siblings like search_conversations, which is for searching individual messages rather than summarizing entire sessions.

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 explicit use cases ('What did we work on in the last session?', 'Summarize our recent conversations') that help an agent determine when to invoke this tool. However, it does not explicitly state when not to use it or compare it to alternatives, leaving some ambiguity.

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

search_conversationsA

Search conversation history for relevant context.

Use this to find:
- Previous discussions about a topic
- Decisions made in earlier sessions
- Context that was compacted away

Args:
    query: Natural language query
    project_filter: Limit to specific project path
    date_from: Inclusive lower timestamp bound. Accepts ISO-8601 datetime
        or date-only values such as 2026-06-13.
    date_to: Inclusive upper timestamp bound. Accepts ISO-8601 datetime
        or date-only values such as 2026-06-15.
    limit: Maximum results (default 5, min 1, max 50)
    use_hybrid: Use hybrid search (vector + BM25) for better results
        (default True)
    enable_analysis: Enable query analysis and result evaluation for
        improved relevance (default True). Adds 'analysis' and 'evaluation'
        to response.
    enable_synthesis: Enable result synthesis to combine multiple results
        into a coherent summary (default False). Adds 'synthesis' to response
        with key_points and deduplicated content.
    include_debug: Include detailed timing metrics and decision tracking
        in response (default False). Useful for debugging and performance
        analysis. Adds 'metrics' to response.

Returns:
    Dict with results list and metadata. When enable_analysis=True, includes:
    - analysis: Query intent, detected technologies, key terms
    - evaluation: Relevance score, completeness assessment
    When enable_synthesis=True, includes:
    - synthesis: Primary content, key points, code snippets
    When include_debug=True, includes:
    - metrics: Timing data (query_analysis_ms, search_ms, etc.), decisions made
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
date_toNo
date_fromNo
use_hybridNo
include_debugNo
project_filterNo
enable_analysisNo
enable_synthesisNo

TDQS

A4.4/5.0
Behavior4/5

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

Describes return value structure based on flags (analysis, synthesis, debug) and mentions default behaviors. With no annotations, this adequately discloses read-only search behavior and result shape.

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?

Well-structured with main purpose, Args, and Returns sections. Slightly long but each line adds value; front-loaded purpose sentence is effective.

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?

Covers search functionality, parameter details, and return variations comprehensively. Lacks error handling or rate limits, but adequate given no output schema and 9 parameters.

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

Parameters5/5

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

All 9 parameters are thoroughly described in the Args section, including types, defaults, and effects (e.g., date_from: ISO-8601, enable_analysis: adds 'analysis' and 'evaluation'). Schema coverage is 0%, so description fully compensates.

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?

Clearly states 'Search conversation history for relevant context' and lists specific use cases (previous discussions, decisions, compacted context), effectively distinguishing from sibling tools like search_file_changes.

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 explicit 'Use this to find:' list of scenarios, guiding when to invoke. Does not explicitly mention when not to use or alternatives, but the context is sufficiently clear.

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

search_file_changesA

Find file modifications in conversation history.

Use this when user asks:
- "What did we change in auth.dart?"
- "Show me recent edits to the config files"
- "What files did we create?"

Args:
    file_path: Filter by file path (supports partial match)
    query: Semantic query about changes
    project_filter: Limit to specific project
    operation_filter: Filter by "edit" or "write"
    date_from: Inclusive lower timestamp bound. Accepts ISO-8601 datetime
        or date-only values such as 2026-06-13.
    date_to: Inclusive upper timestamp bound. Accepts ISO-8601 datetime
        or date-only values such as 2026-06-15.
    limit: Maximum results (default 10, min 1, max 50)

Returns:
    Dict with file change results
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo
date_toNo
date_fromNo
file_pathNo
project_filterNo
operation_filterNo

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not explicitly state that the tool is read-only or disclose any side effects, auth requirements, or rate limits. Basic behavior (finding modifications) is described, but safety profile is missing.

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: purpose first, then usage examples, then parameter list with clear labels, and finally returns. It is front-loaded and every sentence adds value.

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?

The description covers parameters well but lacks detail about the return structure beyond 'Dict with file change results'. No output schema is provided, and the description does not explain ordering, pagination, or format of results. For a search tool, this is a gap.

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?

With 0% schema description coverage, the description adds meaning for all 7 parameters: explains partial match for file_path, semantic query, project/operation filters, date format (ISO-8601), and limit bounds. This compensates for the sparse 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 clearly states it finds file modifications in conversation history, with example user queries. It distinguishes from siblings like search_conversations by focusing on file changes, but does not explicitly differentiate.

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 example queries ('What did we change in auth.dart?') and a parameter list, giving clear context for when to use the tool. However, it does not mention when not to use it or suggest alternatives.

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. 5 tool updatesv0.1.0
    • First observedget_index_status
    • First observedget_server_status
    • First observedget_session_summary
    • First observedsearch_conversations
    • First observedsearch_file_changes

TDQS

A4.1/5.0

Scored across 5 tools

Disambiguation4/5

Most tools have distinct purposes, but get_index_status and get_server_status overlap in indexing and database information, potentially causing confusion. Detailed descriptions help differentiate them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (get_* and search_*), making them predictable and clear.

Tool Count5/5

Five tools cover the necessary functionality for a RAG memory system without being too few or too many, earning each tool's place.

Completeness4/5

The tool set covers monitoring and search operations well, but lacks a tool to retrieve full conversation transcripts or manage indexing, which are minor gaps.

Maintenance

ActivityActive
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
    A
    quality
    D
    maintenance
    Provides persistent memory for AI agents using hybrid search (vector embeddings + BM25) with neural reranking, enabling storage and retrieval of insights, debugging solutions, and patterns across coding sessions.
    8
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI coding agents with persistent, graph-connected memory across projects, enabling cross-project context retrieval via synaptic connections and hybrid search.
    12
    6
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides long-term memory for AI coding agents, enabling them to remember, search, and organize information across sessions and platforms like Claude Code, ChatGPT, and Cursor.
    11
    8
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.
    MIT