Skip to main content
Glama
no13productions

AI Agent History RAG MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CLAUDE_HISTORY_RAG_DB_PATHNoLanceDB database location~/.claude-history-rag/lancedb
CLAUDE_HISTORY_RAG_LOG_LEVELNoLogging levelINFO
CLAUDE_HISTORY_RAG_BATCH_SIZENoEmbedding batch size32
CLAUDE_HISTORY_RAG_CLIENT_PSKNoOptional client PSK override (if unset, uses local JSON)
CLAUDE_HISTORY_RAG_MACHINE_IDNoUnique identifier for this machinehostname
CLAUDE_HISTORY_RAG_SERVER_PSKNoOptional server PSK override (disables rotation UI)
CLAUDE_HISTORY_RAG_SERVER_URLNoCentral server URL. If set, runs in client mode
CLAUDE_HISTORY_RAG_STATE_PATHNoFile position state~/.claude-history-rag/state.json
CLAUDE_HISTORY_RAG_CLIENT_NAMENoOptional human-friendly label for this client
CLAUDE_HISTORY_RAG_AUTH_ENABLEDNoRequire PSK on status + API endpointstrue
CLAUDE_HISTORY_RAG_PROJECTS_PATHNoClaude Code projects directory~/.claude/projects
CLAUDE_HISTORY_RAG_SPANNER_RRF_KNoReciprocal-rank fusion constant60
CLAUDE_HISTORY_RAG_DEBOUNCE_DELAYNoFile watcher debounce (ms)5000
CLAUDE_HISTORY_RAG_GC_AFTER_FILESNoEnable garbage collectiontrue
CLAUDE_HISTORY_RAG_VERTEX_PROJECTNoVertex AI projectADC/gcloud project
CLAUDE_HISTORY_RAG_AUTH_STATE_PATHNoServer auth state (rotation, allowlist, hashes)~/.claude-history-rag/auth.json
CLAUDE_HISTORY_RAG_EMBEDDING_MODELNoModel namenomic-embed-text
CLAUDE_HISTORY_RAG_SPANNER_PROJECTNoCloud Spanner projectADC/gcloud project
CLAUDE_HISTORY_RAG_STORAGE_BACKENDNolancedb or spannerlancedb
CLAUDE_HISTORY_RAG_VERTEX_LOCATIONNoVertex AI locationus-central1
CLAUDE_HISTORY_RAG_CLIENT_AUTH_PATHNoClient PSK storage~/.claude-history-rag/client_auth.json
CLAUDE_HISTORY_RAG_CODEX_STATE_PATHNoCodex file position state~/.claude-history-rag/codex_state.json
CLAUDE_HISTORY_RAG_SPANNER_DATABASENoCloud Spanner database ID
CLAUDE_HISTORY_RAG_SPANNER_INSTANCENoCloud Spanner instance ID
CLAUDE_HISTORY_RAG_EMBEDDING_API_KEYNoAPI key (for OpenAI, etc.)
CLAUDE_HISTORY_RAG_GEMINI_STATE_PATHNoGemini file position state~/.claude-history-rag/gemini_state.json
CLAUDE_HISTORY_RAG_CHATGPT_STATE_PATHNoChatGPT export file position state~/.claude-history-rag/chatgpt_state.json
CLAUDE_HISTORY_RAG_EMBEDDING_BASE_URLNoEmbeddings API base URLhttp://localhost:11434/v1
CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDERNoopenai for OpenAI-compatible APIs, vertex for Vertex AIopenai
CLAUDE_HISTORY_RAG_STATUS_SERVER_HOSTNoStatus server host127.0.0.1
CLAUDE_HISTORY_RAG_STATUS_SERVER_PORTNoStatus server port4680
CLAUDE_HISTORY_RAG_UPLOAD_RETRY_COUNTNoRetries before queuing for later3
CLAUDE_HISTORY_RAG_CODEX_SESSIONS_PATHNoCodex session history directory~/.codex/sessions
CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSIONNoOptional output/storage dimension overridemodel default
CLAUDE_HISTORY_RAG_MAX_CHUNKS_PER_FILENoMax chunks per batch100
CLAUDE_HISTORY_RAG_MAX_FILE_BATCH_SIZENoFiles to process before GC50
CLAUDE_HISTORY_RAG_CHATGPT_EXPORTS_PATHNoChatGPT official export drop folder~/.claude-history-rag/imports/chatgpt
CLAUDE_HISTORY_RAG_GEMINI_SESSIONS_PATHNoGemini CLI session history directory~/.gemini/tmp
CLAUDE_HISTORY_RAG_VERTEX_AUTO_TRUNCATENoLet Vertex truncate oversized embedding inputstrue
CLAUDE_HISTORY_RAG_CLAUDE_APP_STATE_PATHNoClaude app export file position state~/.claude-history-rag/claude_app_state.json
CLAUDE_HISTORY_RAG_STATUS_SERVER_ENABLEDNoEnable HTTP status servertrue
CLAUDE_HISTORY_RAG_ANTIGRAVITY_STATE_PATHNoGoogle Antigravity file position state~/.claude-history-rag/antigravity_state.json
CLAUDE_HISTORY_RAG_DEFER_STARTUP_INDEXINGNoSkip initial indexing on startupfalse
CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODENoapp embeds before write, spanner uses ML.PREDICTapp
CLAUDE_HISTORY_RAG_VERTEX_QUERY_TASK_TYPENoVertex task type for query embeddingsRETRIEVAL_QUERY
CLAUDE_HISTORY_RAG_CLAUDE_APP_EXPORTS_PATHNoClaude web/Desktop app export drop folder~/.claude-history-rag/imports/claude-app
CLAUDE_HISTORY_RAG_UPLOAD_INTERVAL_SECONDSNoBatch upload interval (5 min)300
CLAUDE_HISTORY_RAG_SPANNER_ENABLE_FULL_TEXTNoCreate/use Spanner full-text search indextrue
CLAUDE_HISTORY_RAG_ANTIGRAVITY_SESSIONS_PATHNoGoogle Antigravity history root~/.gemini/antigravity
CLAUDE_HISTORY_RAG_VERTEX_DOCUMENT_TASK_TYPENoVertex task type for document embeddingsRETRIEVAL_DOCUMENT
CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODEL_IDNoRegistered Spanner model nameConversationEmbeddingModel
CLAUDE_HISTORY_RAG_UPLOAD_RETRY_DELAY_SECONDSNoDelay between retries30
CLAUDE_HISTORY_RAG_SPANNER_ENABLE_VECTOR_INDEXNoCreate/use Spanner vector indextrue
CLAUDE_HISTORY_RAG_SPANNER_VECTOR_INDEX_LEAVESNoSpanner vector index leaf count1000
CLAUDE_HISTORY_RAG_SPANNER_NUM_LEAVES_TO_SEARCHNoANN recall/latency search knob50
CLAUDE_HISTORY_RAG_SPANNER_HYBRID_CANDIDATE_LIMITNoCandidate pool for vector/text RRF fusion100
CLAUDE_HISTORY_RAG_OPENAI_EMBEDDING_SEND_DIMENSIONSNoSend dimensions to OpenAI-compatible APIsfalse
CLAUDE_HISTORY_RAG_SPANNER_USE_APPROX_VECTOR_SEARCHNoUse indexed ANN when query shape supports ittrue
CLAUDE_HISTORY_RAG_CLIENT_HEARTBEAT_INTERVAL_SECONDSNoClient heartbeat interval60

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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
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
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
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)
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)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/no13productions/ai-agent-history-rag-mcp'

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