AI Agent History RAG MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CLAUDE_HISTORY_RAG_DB_PATH | No | LanceDB database location | ~/.claude-history-rag/lancedb |
| CLAUDE_HISTORY_RAG_LOG_LEVEL | No | Logging level | INFO |
| CLAUDE_HISTORY_RAG_BATCH_SIZE | No | Embedding batch size | 32 |
| CLAUDE_HISTORY_RAG_CLIENT_PSK | No | Optional client PSK override (if unset, uses local JSON) | |
| CLAUDE_HISTORY_RAG_MACHINE_ID | No | Unique identifier for this machine | hostname |
| CLAUDE_HISTORY_RAG_SERVER_PSK | No | Optional server PSK override (disables rotation UI) | |
| CLAUDE_HISTORY_RAG_SERVER_URL | No | Central server URL. If set, runs in client mode | |
| CLAUDE_HISTORY_RAG_STATE_PATH | No | File position state | ~/.claude-history-rag/state.json |
| CLAUDE_HISTORY_RAG_CLIENT_NAME | No | Optional human-friendly label for this client | |
| CLAUDE_HISTORY_RAG_AUTH_ENABLED | No | Require PSK on status + API endpoints | true |
| CLAUDE_HISTORY_RAG_PROJECTS_PATH | No | Claude Code projects directory | ~/.claude/projects |
| CLAUDE_HISTORY_RAG_SPANNER_RRF_K | No | Reciprocal-rank fusion constant | 60 |
| CLAUDE_HISTORY_RAG_DEBOUNCE_DELAY | No | File watcher debounce (ms) | 5000 |
| CLAUDE_HISTORY_RAG_GC_AFTER_FILES | No | Enable garbage collection | true |
| CLAUDE_HISTORY_RAG_VERTEX_PROJECT | No | Vertex AI project | ADC/gcloud project |
| CLAUDE_HISTORY_RAG_AUTH_STATE_PATH | No | Server auth state (rotation, allowlist, hashes) | ~/.claude-history-rag/auth.json |
| CLAUDE_HISTORY_RAG_EMBEDDING_MODEL | No | Model name | nomic-embed-text |
| CLAUDE_HISTORY_RAG_SPANNER_PROJECT | No | Cloud Spanner project | ADC/gcloud project |
| CLAUDE_HISTORY_RAG_STORAGE_BACKEND | No | lancedb or spanner | lancedb |
| CLAUDE_HISTORY_RAG_VERTEX_LOCATION | No | Vertex AI location | us-central1 |
| CLAUDE_HISTORY_RAG_CLIENT_AUTH_PATH | No | Client PSK storage | ~/.claude-history-rag/client_auth.json |
| CLAUDE_HISTORY_RAG_CODEX_STATE_PATH | No | Codex file position state | ~/.claude-history-rag/codex_state.json |
| CLAUDE_HISTORY_RAG_SPANNER_DATABASE | No | Cloud Spanner database ID | |
| CLAUDE_HISTORY_RAG_SPANNER_INSTANCE | No | Cloud Spanner instance ID | |
| CLAUDE_HISTORY_RAG_EMBEDDING_API_KEY | No | API key (for OpenAI, etc.) | |
| CLAUDE_HISTORY_RAG_GEMINI_STATE_PATH | No | Gemini file position state | ~/.claude-history-rag/gemini_state.json |
| CLAUDE_HISTORY_RAG_CHATGPT_STATE_PATH | No | ChatGPT export file position state | ~/.claude-history-rag/chatgpt_state.json |
| CLAUDE_HISTORY_RAG_EMBEDDING_BASE_URL | No | Embeddings API base URL | http://localhost:11434/v1 |
| CLAUDE_HISTORY_RAG_EMBEDDING_PROVIDER | No | openai for OpenAI-compatible APIs, vertex for Vertex AI | openai |
| CLAUDE_HISTORY_RAG_STATUS_SERVER_HOST | No | Status server host | 127.0.0.1 |
| CLAUDE_HISTORY_RAG_STATUS_SERVER_PORT | No | Status server port | 4680 |
| CLAUDE_HISTORY_RAG_UPLOAD_RETRY_COUNT | No | Retries before queuing for later | 3 |
| CLAUDE_HISTORY_RAG_CODEX_SESSIONS_PATH | No | Codex session history directory | ~/.codex/sessions |
| CLAUDE_HISTORY_RAG_EMBEDDING_DIMENSION | No | Optional output/storage dimension override | model default |
| CLAUDE_HISTORY_RAG_MAX_CHUNKS_PER_FILE | No | Max chunks per batch | 100 |
| CLAUDE_HISTORY_RAG_MAX_FILE_BATCH_SIZE | No | Files to process before GC | 50 |
| CLAUDE_HISTORY_RAG_CHATGPT_EXPORTS_PATH | No | ChatGPT official export drop folder | ~/.claude-history-rag/imports/chatgpt |
| CLAUDE_HISTORY_RAG_GEMINI_SESSIONS_PATH | No | Gemini CLI session history directory | ~/.gemini/tmp |
| CLAUDE_HISTORY_RAG_VERTEX_AUTO_TRUNCATE | No | Let Vertex truncate oversized embedding inputs | true |
| CLAUDE_HISTORY_RAG_CLAUDE_APP_STATE_PATH | No | Claude app export file position state | ~/.claude-history-rag/claude_app_state.json |
| CLAUDE_HISTORY_RAG_STATUS_SERVER_ENABLED | No | Enable HTTP status server | true |
| CLAUDE_HISTORY_RAG_ANTIGRAVITY_STATE_PATH | No | Google Antigravity file position state | ~/.claude-history-rag/antigravity_state.json |
| CLAUDE_HISTORY_RAG_DEFER_STARTUP_INDEXING | No | Skip initial indexing on startup | false |
| CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODE | No | app embeds before write, spanner uses ML.PREDICT | app |
| CLAUDE_HISTORY_RAG_VERTEX_QUERY_TASK_TYPE | No | Vertex task type for query embeddings | RETRIEVAL_QUERY |
| CLAUDE_HISTORY_RAG_CLAUDE_APP_EXPORTS_PATH | No | Claude web/Desktop app export drop folder | ~/.claude-history-rag/imports/claude-app |
| CLAUDE_HISTORY_RAG_UPLOAD_INTERVAL_SECONDS | No | Batch upload interval (5 min) | 300 |
| CLAUDE_HISTORY_RAG_SPANNER_ENABLE_FULL_TEXT | No | Create/use Spanner full-text search index | true |
| CLAUDE_HISTORY_RAG_ANTIGRAVITY_SESSIONS_PATH | No | Google Antigravity history root | ~/.gemini/antigravity |
| CLAUDE_HISTORY_RAG_VERTEX_DOCUMENT_TASK_TYPE | No | Vertex task type for document embeddings | RETRIEVAL_DOCUMENT |
| CLAUDE_HISTORY_RAG_SPANNER_EMBEDDING_MODEL_ID | No | Registered Spanner model name | ConversationEmbeddingModel |
| CLAUDE_HISTORY_RAG_UPLOAD_RETRY_DELAY_SECONDS | No | Delay between retries | 30 |
| CLAUDE_HISTORY_RAG_SPANNER_ENABLE_VECTOR_INDEX | No | Create/use Spanner vector index | true |
| CLAUDE_HISTORY_RAG_SPANNER_VECTOR_INDEX_LEAVES | No | Spanner vector index leaf count | 1000 |
| CLAUDE_HISTORY_RAG_SPANNER_NUM_LEAVES_TO_SEARCH | No | ANN recall/latency search knob | 50 |
| CLAUDE_HISTORY_RAG_SPANNER_HYBRID_CANDIDATE_LIMIT | No | Candidate pool for vector/text RRF fusion | 100 |
| CLAUDE_HISTORY_RAG_OPENAI_EMBEDDING_SEND_DIMENSIONS | No | Send dimensions to OpenAI-compatible APIs | false |
| CLAUDE_HISTORY_RAG_SPANNER_USE_APPROX_VECTOR_SEARCH | No | Use indexed ANN when query shape supports it | true |
| CLAUDE_HISTORY_RAG_CLIENT_HEARTBEAT_INTERVAL_SECONDS | No | Client heartbeat interval | 60 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_conversationsA | Search conversation history for relevant context. |
| search_file_changesA | Find file modifications in conversation history. |
| get_session_summaryA | Get summary of conversation session(s). |
| get_index_statusA | Get status of the RAG index. |
| get_server_statusA | Get comprehensive MCP server status and health information. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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