Supports utilizing local Hugging Face models for sentence window retrieval and document embedding to provide context for RAG operations.
Integrates with OpenAI embedding endpoints and models to index documents and enable high-quality retrieval-augmented generation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-RAGNARsearch my local documentation for the API authentication steps"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-RAGNAR - a local RAG MCP Server
A local MCP server that implements RAG (Retrieval-Augmented Generation) with sentence window retrieval.
Features
Document indexing with support for multiple file types (txt, md, pdf, doc, docx)
Sentence window retrieval for better context understanding
Configurable embedding models (OpenAI or local hugging face mode - i.e BAAI/bge-large-en-v1.5)
MCP server integration for easy querying
Requirements
Python 3.10+
UV package manager
Installation
Clone the repository:
Install dependencies using UV:
Usage
Indexing Documents
You can index documents either programmatically or via the command line.
Indexing
Running the MCP Server
Configuration
can be supplied as env var or .env file
EMBED_ENDPOINT: (Optional) Path to an OpenAI compatible embedding endpoint (ends with /v1). If not set, a local Hugging Face model is used by default.EMBED_MODEL: (Optional) Name of the embedding model to use. Default value of BAAI/bge-large-en-v1.5.INDEX_ROOT: The root directory for the index, used by the retriever. This is mandatory for MCP (Multi-Cloud Platform) querying.MCP_DESCRIPTION: The exposed name and description for the MCP server, used for MCP querying only. This is mandatory for MCP querying. For example: "RAG to my local personal documents"INDEX_ROOT: the root path of the index
in SSE mode it will listen to http://localhost:8001/ragnar
in stdio mode
install locally as an uv tool
Claude Desktop:
Update the following:
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Example :
License
GNU General Public License v3.0