- Home
- MCP servers
- Muxue Rag
Muxue Rag
- python
0
GitHub Stars
python
Language
3 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"musnows-muxue_rag_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/rag_mcp",
"run",
"mcp_rag_tool",
"--serve"
],
"env": {
"RAG_MCP_CONFIG": "/path/to/rag_mcp/config.yaml"
}
}
}
}This MCP server enables local retrieval-augmented generation by indexing text files in a directory and exposing search and raw file retrieval through the MCP protocol. It helps you quickly locate relevant documents and read their original contents via an MCP client.
How to use
You can use an MCP client to connect to this tool and perform two core actions: search the indexed documents with keywords and read the raw content of a specific file. First, start the MCP server in a directory where your documents reside, then configure your MCP client to point at that server. Keep the indexing directory consistent so all queries reference the same RAG data.
How to install
Prerequisites you need before installation:
Python 3.13 or later is required.
A local package manager is recommended. Use uv to manage packages and run the tool.
Run the following commands to set up the tool locally.
Install steps
# Clone the project
git clone <repository_url>
cd rag_mcp
# Install dependencies via the preferred local runner
uv sync
Configure the tool
llm:
service_type: "local" # or "openai" and so on
base_url: "http://localhost:1234/v1" # LLM service API address
api_key: "your-api-key" # if required
timeout: 60
model:
name: "text-embedding-qwen3-embedding-4b"
context_window: 4096
temperature: 0.7
processing:
chunk_count: 5
Run the server and build the index
- Build the index for your documents using the following command.
uv run mcp_rag_tool --dir /path/to/your/documents
- Start the MCP server to serve MCP clients.
uv run mcp_rag_tool --serve
If you want to serve for a specific directory, lock the query directory
uv run mcp_rag_tool --dir /path/to/your/documents --serve
Additional usage notes
-
The indexing is incremental by design. It reindexes only files that are new or modified since the last run.
-
Hidden directories (such as those starting with a dot) are auto-filtered out to avoid indexing system or sensitive files.
-
The tool supports common plain text formats like .txt, .md, .json, .py, .js, and more.
Available tools
search_rag
Search the index for documents matching a keyword and return the matched content along with the source file path.
read_raw_file
Read and return the raw contents of a specified file for analysis.