multilingual-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-mcp
One-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/multilingual-rag-mcp.git
Quick start
1. Index your documents
rag-mcp index ~/documents/
2. Add to Claude Code
claude mcp add rag -- uvx --from multilingual-rag-mcp rag-mcp
Set the document paths via env vars:
claude mcp add rag \
-e RAG_DOCS=$HOME/documents \
-- uvx --from multilingual-rag-mcp rag-mcp
If installed locally (pip install), use the simpler form:
claude mcp add rag -e RAG_DOCS=$HOME/documents -- rag-mcp
3. 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 |
|---|---|
search(query, n=5) |
Semantic search across all indexed documents |
get_document(path) |
Retrieve full document content |
list_documents(filter?) |
List indexed documents, optionally filtered |
reindex() |
Re-index all configured document directories |
stats() |
Index statistics (documents, chunks, categories) |
Configuration
| Env var | Default | Description |
|---|---|---|
RAG_DOCS |
— | Comma-separated paths to document directories |
RAG_DATA |
~/.local/share/rag-mcp/ |
Index storage location |
RAG_MODEL |
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 |
Embedding model (any fastembed-compatible model) |
RAG_CHUNK_SIZE |
1000 |
Maximum chunk size in characters |
RAG_CHUNK_OVERLAP |
200 |
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 version
How 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multilingual_rag_mcp-0.1.0.tar.gz.
File metadata
- Download URL: multilingual_rag_mcp-0.1.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44ca262d7d2f54da8ad15b31f6428a246ae932441da1f2775b2c888da5f91108
|
|
| MD5 |
2eaaca107f50fa4428b3a71cc751413d
|
|
| BLAKE2b-256 |
8837e62a37127247d12693909eb199be1197c70817f0b1d030875a55727355a2
|
Provenance
The following attestation bundles were made for multilingual_rag_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on aliaksandr-kazarez/multilingual-rag-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
multilingual_rag_mcp-0.1.0.tar.gz -
Subject digest:
44ca262d7d2f54da8ad15b31f6428a246ae932441da1f2775b2c888da5f91108 - Sigstore transparency entry: 2666443996
- Sigstore integration time:
-
Permalink:
aliaksandr-kazarez/multilingual-rag-mcp@83450e7c0104b4fafd6e741e793da795bb28f83a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aliaksandr-kazarez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@83450e7c0104b4fafd6e741e793da795bb28f83a -
Trigger Event:
push
-
Statement type:
File details
Details for the file multilingual_rag_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: multilingual_rag_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38d070ab81af6cb27a17128300e343f0576d8c2af2c628ee6b1d43e859b00fd6
|
|
| MD5 |
de4fb0c4075c6d51999b170e209bbcd5
|
|
| BLAKE2b-256 |
e4fef7960f7ac0e8d72e5eefc397b77275f23e1e7c25c5a379d10eccdc27b275
|
Provenance
The following attestation bundles were made for multilingual_rag_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on aliaksandr-kazarez/multilingual-rag-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
multilingual_rag_mcp-0.1.0-py3-none-any.whl -
Subject digest:
38d070ab81af6cb27a17128300e343f0576d8c2af2c628ee6b1d43e859b00fd6 - Sigstore transparency entry: 2666444038
- Sigstore integration time:
-
Permalink:
aliaksandr-kazarez/multilingual-rag-mcp@83450e7c0104b4fafd6e741e793da795bb28f83a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aliaksandr-kazarez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@83450e7c0104b4fafd6e741e793da795bb28f83a -
Trigger Event:
push
-
Statement type: