rag-mcp
rag-mcp
Multilingual RAG MCP server for local document search. Query in one language, find content in another.
Built for the common case where you talk to AI agents in English but your documents are in Russian (or any other language). The multilingual embedding model maps semantically similar concepts across 50+ languages to the same vector space — no translation step needed.
Install
pip from PyPI
pip install multilingual-rag-mcpOne-liner with uvx (no install needed)
uvx --from multilingual-rag-mcp rag-mcp index ./docs/pip from GitHub (latest)
pip install git+https://github.com/aliaksandr-kazarez/rag-mcp.gitQuick start
1. Index your documents
rag-mcp index ~/documents/2. Add to Claude Code
claude mcp add rag -- uvx --from multilingual-rag-mcp rag-mcpSet the document paths via env vars:
claude mcp add rag \
-e RAG_DOCS=$HOME/documents \
-- uvx --from multilingual-rag-mcp rag-mcpIf installed locally (pip install), use the simpler form:
claude mcp add rag -e RAG_DOCS=$HOME/documents -- rag-mcp3. Search
From Claude Code, the search tool handles cross-lingual queries automatically:
"search for protein recommendations" finds Russian articles about белок
"найди рецепты" finds recipe content regardless of language
MCP tools
Tool | Description |
| Semantic search across all indexed documents |
| Retrieve full document content |
| List indexed documents, optionally filtered |
| Re-index all configured document directories |
| Index statistics (documents, chunks, categories) |
Configuration
Env var | Default | Description |
| — | Comma-separated paths to document directories |
|
| Index storage location |
|
| Embedding model (any fastembed-compatible model) |
|
| Maximum chunk size in characters |
|
| Overlap between chunks |
Supported formats
Markdown (.md), plain text (.txt), PDF (.pdf), JSON (.json), CSV (.csv).
Markdown files with YAML frontmatter have their metadata (title, date, etc.) extracted automatically.
CLI
rag-mcp index <dir> [<dir> ...] Index documents
rag-mcp stats Print index statistics
rag-mcp Start MCP server (stdio)
rag-mcp --help Show help
rag-mcp --version Show versionHow it works
Documents are parsed and split into chunks (markdown-aware: respects headers, code blocks)
Each chunk is embedded with a multilingual model via fastembed (ONNX, no PyTorch needed)
Embeddings are stored in ChromaDB (local, file-based)
Queries are embedded with the same model and matched by cosine similarity
Cross-lingual retrieval works because the model places semantically similar text from different languages near each other in vector space
License
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliaksandr-kazarez/rag-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server