Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GITHUB_TOKEN | No | Personal access token for GitHub API. Required for private repos; increases rate limits for public repos. | |
| COHERE_API_KEY | No | Cohere API key (required for Cohere embeddings or re-ranking). | |
| OPENAI_API_KEY | No | OpenAI API key (required for default LLM or default embeddings). | |
| PINRAG_LLM_MODEL | No | LLM model name (e.g., 'claude-3-5-sonnet-20241022', 'gpt-4o-mini'). | |
| PINRAG_LOG_LEVEL | No | Log level: DEBUG, INFO, WARNING, or ERROR. | INFO |
| ANTHROPIC_API_KEY | No | Anthropic API key (required when PINRAG_LLM_PROVIDER=anthropic or PINRAG_EVALUATOR_PROVIDER=anthropic). | |
| PINRAG_CHUNK_SIZE | No | Text chunk size in characters. | 1000 |
| PINRAG_RETRIEVE_K | No | Number of chunks to retrieve when re-ranking is off. | 20 |
| PINRAG_USE_RERANK | No | Set to 'true' to enable Cohere Re-Rank. | false |
| PINRAG_PERSIST_DIR | No | Chroma vector store directory. Use an absolute path for a stable index location. | chroma_db |
| PINRAG_LLM_PROVIDER | No | LLM provider: 'openai' or 'anthropic'. | openai |
| PINRAG_RERANK_TOP_N | No | Chunks passed to the LLM after re-ranking. | 10 |
| ANONYMIZED_TELEMETRY | No | Enable or disable Chroma's anonymous usage telemetry. | False |
| PINRAG_CHUNK_OVERLAP | No | Chunk overlap in characters. | 200 |
| PINRAG_LOG_TO_STDERR | No | Set to 'true' to send logs to stderr (visible in MCP output). | false |
| PINRAG_RESPONSE_STYLE | No | RAG answer style: 'thorough' or 'concise'. | thorough |
| PINRAG_COLLECTION_NAME | No | Chroma collection name. | pinrag |
| PINRAG_EMBEDDING_MODEL | No | Embedding model name (e.g., 'text-embedding-3-small', 'embed-english-v3.0'). | |
| PINRAG_EVALUATOR_MODEL | No | Model for correctness grading during evaluation. | |
| PINRAG_USE_MULTI_QUERY | No | Set to 'true' to generate alternative phrasings of the user query via LLM. | false |
| PINRAG_CHILD_CHUNK_SIZE | No | Child chunk size when PINRAG_USE_PARENT_CHILD is true. | 800 |
| PINRAG_USE_PARENT_CHILD | No | Set to 'true' to embed small chunks and return larger parent chunks. | false |
| PINRAG_MULTI_QUERY_COUNT | No | Number of alternative queries to generate (max 10). | 4 |
| PINRAG_PARENT_CHUNK_SIZE | No | Parent chunk size when PINRAG_USE_PARENT_CHILD is true. | 2000 |
| PINRAG_RERANK_RETRIEVE_K | No | Chunks to fetch before reranking. | 20 |
| PINRAG_YT_PROXY_HTTP_URL | No | HTTP proxy URL for YouTube transcript fetches. | |
| PINRAG_EMBEDDING_PROVIDER | No | Embedding provider: 'openai' or 'cohere'. | openai |
| PINRAG_EVALUATOR_PROVIDER | No | LLM provider for evaluation runs (LLM-as-judge). | openai |
| PINRAG_YT_PROXY_HTTPS_URL | No | HTTPS proxy URL for YouTube transcript fetches. | |
| PINRAG_GITHUB_DEFAULT_BRANCH | No | Default branch for GitHub indexing when not specified. | main |
| PINRAG_GITHUB_MAX_FILE_BYTES | No | Skip files larger than this when indexing GitHub repos. | 524288 |
| PINRAG_EVALUATOR_MODEL_CONTEXT | No | Model for groundedness grading during evaluation. | |
| PINRAG_PLAINTEXT_MAX_FILE_BYTES | No | Skip plain .txt files larger than this when indexing. | 524288 |
| PINRAG_STRUCTURE_AWARE_CHUNKING | No | Apply structure-aware chunking heuristics for code/table boundaries. | true |
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 |
|---|---|
| query_tool | Query indexed documents and return an answer with citations. |
| add_document_tool | Add files, directories, YouTube videos, or GitHub repos to the index. |
| add_url_tool | Add YouTube videos/playlists or GitHub repos to the index via URL. |
| list_documents_tool | List all indexed documents in the PinRAG index. |
| remove_document_tool | Remove a document and all its chunks from the PinRAG index. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| use_pinrag | Use PinRAG to query, index, list, or remove documents. Routes to the correct tool based on the request: - Query / question → query_tool - Index / add → add_url_tool (URLs) or add_document_tool (files/dirs) - List / show → list_documents_tool - Remove / delete → remove_document_tool |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| documents_resource | Read-only list of documents currently indexed in PinRAG (default collection). |
| server_config_resource | Environment variables and config params used by the PinRAG MCP server. |