RAG Factory
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., "@RAG Factoryoptimize a RAG pipeline for my support docs"
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.
RAG Factory — AutoML for RAG
RAG Factory turns RAG configuration from guesswork into measurement. From a short conversation plus a sample of your own documents, it recommends candidate RAG configurations, builds an isolated sub-environment for each, evaluates it on your own data, and optimizes across the candidate grid — then registers the winning environments as a persistent fleet you can query directly or over MCP.
Status: v1.0 snapshot. This repository is a curated portfolio snapshot of a project that continues to evolve in a private development repository.
📸 Screenshots / demo of the web UI will be added here.
The problem
A good RAG setup cannot be reliably predicted up front. MTEB scores do not predict performance in your domain, and the chunking strategy can matter as much as the embedding model. The only trustworthy answer is to measure candidates on your own corpus — but doing that by hand (generating a QA set, building indexes, running ranking metrics, comparing) is slow and expensive.
The solution
RAG Factory closes the loop:
[Recommender] -> [Factory] -> [Evaluator]
input build measure
^ |
+-------- optimization loop ------+Recommender (input). A conversational interview plus a data-profile turns your intent and a document sample into a search space of candidate configurations — not a single guessed "truth".
Factory (build). For a given configuration it builds a sub-environment: parsing → chunking → embedding → index.
Evaluator (output). It measures each candidate on your own data (MRR, NDCG, faithfulness / completeness), and the result feeds back to select the winner.
Registry (fleet). Winning environments are persisted and can be served — locally, via a Gradio web UI, or through an MCP server.
What is built here vs. adopted
Honesty about the boundary matters, so it is explicit:
Layer | Decision | Why |
Build + eval + optimize core, ranking metrics (MRR/NDCG) | Adopted — AutoRAG | The optimizer and validated metrics are a solved problem; reimplementing them would be worse and slower |
QA ground-truth generation | Adopted (engine-provided) | Hand-curating a test set dominates development time |
Conversational recommender (input layer) | Built here | No existing tool offers this; the unique, agentic part |
Fleet registry / environment manager | Built here | Tools optimize "one best pipeline for one dataset"; they do not manage N persistent environments |
MCP server + Gradio web UI + optimization orchestration | Built here | The serving and human-in-the-loop layer wrapping the engine |
Principle: reinvent zero metrics and zero optimizer; build exactly what is new.
Tech stack
Python · AutoRAG · LlamaIndex (OpenAI-compatible LLMs) · MCP (FastMCP) · Gradio · pandas / numpy · langdetect · PyYAML · LLM access via OpenRouter.
Package layout
Module | Responsibility |
| Conversational recommender: intent interview + data profiling |
| Candidate search space & finalist recommendation |
| Corpus prep, QA generation, environment build (AutoRAG YAML) |
| Build/eval execution and the optimization loop |
| Answer generation, reporting, artifact emission |
| Fleet registry & query serving |
| MCP server (FastMCP, stdio) exposing the fleet |
| Gradio web application |
Getting started
# 1. Environment
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# 2. Configure access (copy the template and fill in your key)
cp .env.example .env
# then edit .env: OPENROUTER_API_KEY, OPENROUTER_BASE_URL, OPENROUTER_MODELRun the web application:
python -m ragfactory.appRun the MCP server (stdio transport):
python -m ragfactory.mcp_server
# optional: RAGFACTORY_REGISTRY_DIR=/path/to/registry python -m ragfactory.mcp_serverNote: some build/evaluation paths run AutoRAG and may require an embedding model and a GPU. A corpus is not bundled — you point RAG Factory at your own documents.
Testing
pytest # unit / fast tests (default; costly tests deselected)
pytest -m integration # slower tests that run AutoRAG / GPU
pytest -m costly # tests that spend money on live LLM calls (OpenRouter)The suite is substantial (24 test modules) and mirrors the production package closely.
Markers are defined in pytest.ini.
Documentation
docs/ARCHITECTURE.md— design decisions, the build-vs-adopt rationale, and evaluation methodology.
License
Released under the MIT License © 2026 Dariusz Poślad.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/Zyxac24/AutoML_for_RAG-public'
If you have feedback or need assistance with the MCP directory API, please join our Discord server