Skip to main content

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

  1. Documents are parsed and split into chunks (markdown-aware: respects headers, code blocks)
  2. Each chunk is embedded with a multilingual model via fastembed (ONNX, no PyTorch needed)
  3. Embeddings are stored in ChromaDB (local, file-based)
  4. Queries are embedded with the same model and matched by cosine similarity
  5. 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

multilingual_rag_mcp-0.2.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multilingual_rag_mcp-0.2.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file multilingual_rag_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: multilingual_rag_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for multilingual_rag_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8861955443875b115f281877a6c90412e524437d78ff0c0d29b2bb877d675b75
MD5 87004f32dfc7c76d6b312d5a48bc452a
BLAKE2b-256 351186e10d6ff8046ef37aebae0bd293b8c3ac756f269f66ce436e706c4a37db

See more details on using hashes here.

Provenance

The following attestation bundles were made for multilingual_rag_mcp-0.2.0.tar.gz:

Publisher: publish.yml on aliaksandr-kazarez/multilingual-rag-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file multilingual_rag_mcp-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for multilingual_rag_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7d0352620c7ec095322b943aa906e45f95c8363b4c9716bfbad7cecbef3ad0
MD5 d1d48ab62195f09aaa12983b9f4bab9b
BLAKE2b-256 5962af8186e06cb5c6780deb43c6ac3bb102dd34743715c488657d49ef97bd89

See more details on using hashes here.

Provenance

The following attestation bundles were made for multilingual_rag_mcp-0.2.0-py3-none-any.whl:

Publisher: publish.yml on aliaksandr-kazarez/multilingual-rag-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page