MCP-RAGNAR is an MCP server that implements local Retrieval-Augmented Generation using sentence window retrieval across indexed document collections. It connects LLM interfaces like Claude Desktop to local file repositories, enabling AI assistants to search and extract context from multiple file formats including plain text, Markdown, PDF, and Microsoft Word documents. Software developers, researchers, and technical writers use this server to ground conversational models in private documentation or proprietary knowledge bases without exposing raw files to cloud endpoints unless configured to do so. The server indexes documents using configurable embedding models, supporting both local Hugging Face transformers such as BAAI/bge-large-en-v1.5 and remote OpenAI-compatible embedding APIs. When queries are executed through the Model Context Protocol, the sentence window retrieval technique returns target sentences along with surrounding contextual text, improving comprehension and answer accuracy. By running via stdio or Server-Sent Events, MCP-RAGNAR enables fast semantic lookups across pre-built local indexes directly from conversational desktop environments.
Category: AI Memory & Context
Tags: document processing, embeddings, rag, retrieval, vector-search
bash git clone https://github.com/bixentemal/mcp-ragnar cd mcp-ragnar 3. Install the dependencies: bash uv pip install -e . 4. Index your local documents to create a target index directory: bash python -m indexer.index /path/to/documents /path/to/index 5. Install the tool locally via uv: bash uv tool install . 6. Open your Claude Desktop configuration (claude_desktop_config.json) and configure the server: json { "mcpServers": { "mcp-ragnar": { "command": "uvx", "args": ["mcp-ragnar"], "env": { "MCP_DESCRIPTION": "My local documentation", "INDEX_ROOT": "/path/to/index" } } } } 7. Restart Claude Desktop to enable local document querying.Part of MCP Servers
MCP-RAGNAR allows LLMs to retrieve relevant passages from local documents using sentence window retrieval. It parses text, Markdown, PDF, and Word documents into searchable vectors, indexes them to disk, and exposes tools for semantic search. This provides accurate contextual grounding for desktop agents without exposing entire documents or requiring external database servers.
MCP-RAGNAR supports document indexing for multiple standard file formats, specifically TXT, MD, PDF, DOC, and DOCX files. When pointing the indexer command line tool at a document folder, it processes these supported formats and stores embeddings into the designated index path for subsequent retrieval.
MCP-RAGNAR works with both local Hugging Face embedding models and OpenAI-compatible embedding endpoints. By default, it uses the local BAAI/bge-large-en-v1.5 model, but users can configure alternative models such as BAAI/bge-small-en-v1.5 or OpenAI models like text-embedding-3-small via environment variables or command-line parameters.
MCP-RAGNAR works with any client supporting the Model Context Protocol over standard input and output (stdio) or Server-Sent Events (SSE). It includes verified configuration examples for Claude Desktop on macOS and Windows, and can also run as a standalone SSE server accessible via HTTP.
Yes, MCP-RAGNAR is open source software published under the GNU General Public License v3.0 (GPL-3.0). You can inspect the source code, review the implementation details, adapt the indexing logic, and deploy it locally by accessing its public code repository on GitHub.