DocsRagMcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DOCSRAG_MODEL | No | Embedding model, or the deployment name for Azure OpenAI. Defaults to nomic-embed-text (Ollama) or text-embedding-3-small (OpenAI). | |
| DOCSRAG_API_KEY | No | API key for OpenAI or Azure OpenAI. | |
| DOCSRAG_DATABASE | No | Path of the SQLite index file. Defaults to ~/.docs-rag-mcp/index.db. | |
| DOCSRAG_ENDPOINT | No | Service URL. Required for Azure OpenAI. Defaults to http://localhost:11434 for Ollama. | |
| DOCSRAG_PROVIDER | No | Embedding provider: ollama (default), openai or azure. | |
| DOCSRAG_CHUNK_SIZE | No | Maximum characters per chunk. Defaults to 1200. | |
| DOCSRAG_ALLOWED_PATHS | No | Folders the server may index, separated by : on Linux and macOS or ; on Windows. Any folder if not set. | |
| DOCSRAG_CHUNK_OVERLAP | No | Characters repeated between chunks. Defaults to 200. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Use search_docs to answer questions from the user's own documents and cite the files you used. If the index is empty, ask which folder to index and call index_folder.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| index_folderA | Indexes the documents in a folder and its subfolders (Markdown, text and PDF files) so they can be searched with search_docs. Files that haven't changed since the last run are skipped, and files that were deleted are removed from the index. |
| search_docsA | Searches the indexed documents by meaning and returns the most relevant passages, with their file and section. Use it to answer questions from the user's own documents, and cite the files you used. |
| list_sourcesA | Lists the files in the index, with their number of chunks and when they were last indexed. |
| remove_from_indexA | Removes a file, or every file inside a folder, from the index. Files on disk are not touched. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool maps to a distinct operation in the RAG lifecycle: indexing, searching, listing, and removing. There is no overlap between them, and the descriptions explicitly cross-reference each other (index_folder mentions search_docs) to reinforce boundaries.
All four names are snake_case with a leading verb and a noun object, giving a predictable pattern. The only minor deviation is remove_from_index, which uses a prepositional phrase rather than a direct object, though it remains immediately readable.
Four tools is exactly right for a small document-RAG server: ingest, query, inspect, and delete. Each tool earns its place with no redundant or filler operations.
The surface covers the full index lifecycle (create, query, list, delete) with sensible details like incremental re-indexing and folder-level removal. A minor gap is the absence of a tool to fetch a full document or chunk by id, forcing agents to rely solely on search snippets.