Skip to main content

Configuration Variables

TeaRAGs is configured via environment variables passed to the MCP server. All variables are optional unless specified otherwise.

Core Configuration

VariableDescriptionDefault
TRANSPORT_MODE"stdio" or "http"stdio
HTTP_PORTPort for HTTP transport3000
HTTP_REQUEST_TIMEOUT_MSRequest timeout for HTTP transport (ms)300000
EMBEDDING_PROVIDER"ollama", "openai", "cohere", "voyage"ollama
QDRANT_URLQdrant server URLhttp://localhost:6333
QDRANT_API_KEYAPI key for Qdrant authentication-
PROMPTS_CONFIG_FILEPath to prompts configuration JSONprompts.json

Embedding Configuration

VariableDescriptionDefault
EMBEDDING_MODELModel nameunclemusclez/jina-embeddings-v2-base-code:latest
EMBEDDING_BASE_URLCustom API URLProvider-specific
EMBEDDING_DIMENSIONVector dimensions (auto-detected from model)Auto
EMBEDDING_BATCH_SIZEChunks per embedding batch (pipeline accumulator size)1024
EMBEDDING_CONCURRENCYParallel embedding workers (for remote GPU latency hiding)1
EMBEDDING_MAX_REQUESTS_PER_MINUTERate limitProvider-specific
EMBEDDING_RETRY_ATTEMPTSRetry count3
EMBEDDING_RETRY_DELAYInitial retry delay (ms)1000
OPENAI_API_KEYOpenAI API key-
COHERE_API_KEYCohere API key-
VOYAGE_API_KEYVoyage AI API key-
OLLAMA_NUM_GPUOllama GPU's num (Set 0 to enable CPU only mode)999

Code Vectorization Configuration

VariableDescriptionDefault
CODE_CHUNK_SIZEMaximum chunk size in characters2500
CODE_CHUNK_OVERLAPOverlap between chunks in characters300
CODE_ENABLE_ASTEnable AST-aware chunking (tree-sitter)true
CODE_CUSTOM_EXTENSIONSAdditional file extensions (comma-separated)-
CODE_CUSTOM_IGNOREAdditional ignore patterns (comma-separated)-
CODE_DEFAULT_LIMITDefault search result limit5
CODE_ENABLE_GIT_METADATAEnrich chunks with git blame (author, dates, tasks)false

Qdrant Batch Pipeline Configuration

VariableDescriptionDefault
QDRANT_UPSERT_BATCH_SIZEPoints per Qdrant upsert batch100
QDRANT_FLUSH_INTERVAL_MSAuto-flush buffer interval (0 to disable timer)500
QDRANT_BATCH_ORDERINGOrdering mode: "weak", "medium", or "strong"weak
QDRANT_DELETE_BATCH_SIZEPaths per delete batch (with payload index, larger is efficient)500
QDRANT_DELETE_CONCURRENCYParallel delete requests (Qdrant-bound, not embedding-bound)8

Performance & Debug Configuration

VariableDescriptionDefault
CHUNKER_POOL_SIZEWorker threads for parallel AST parsing4
FILE_PROCESSING_CONCURRENCYParallel file read + chunk dispatch during indexing50
MIN_BATCH_SIZEMin chunks before timeout flush (0 = no minimum)0
BATCH_FORMATION_TIMEOUT_MSFlush partial embedding batch after timeout (ms)2000
MAX_IO_CONCURRENCYMax parallel file I/O operations during cache sync50
DEBUGEnable debug timing logs (true or 1 to enable)false

Data Directories

The server stores data in ~/.tea-rags-mcp/:

DirectoryPurpose
snapshots/Sharded file hash snapshots for incremental indexing
logs/Debug logs when DEBUG=1 is enabled