# UltraRAG

> Build complex RAG pipelines from MCP servers with YAML instead of glue code

- Category: Retrieval & Knowledge (RAG) / RAG Frameworks & Platforms
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/OpenBMB/UltraRAG
- Website: https://ultrarag.github.io/
- Canonical page: https://ai-tldr.dev/tools/ultrarag/

## In short

UltraRAG is a RAG development framework whose architecture is built on the Model Context Protocol. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0. To get started: install uv and clone the repository.

## Overview

UltraRAG is a RAG development framework whose architecture is built on the Model Context Protocol. Instead of a Python class hierarchy, each core RAG component — retriever, generation, corpus processing, evaluation — is packaged as an independent MCP server exposing function-level tools, and pipelines are assembled by an MCP client.

The practical consequence is that pipeline logic becomes configuration. Sequential steps, loops and conditional branches are expressed in YAML, so an iterative RAG workflow that would normally be a few hundred lines of orchestration code fits in a few dozen lines of config. Adding a new capability means registering a tool on a server rather than subclassing anything, which is what keeps components reusable across pipelines.

It is a joint project of THUNLP at Tsinghua University, NEUIR at Northeastern University, OpenBMB and AI9stars, and is aimed at both academic research and industrial prototyping. Alongside the pipeline engine it ships UltraRAG UI — a visual RAG IDE with a Pipeline Builder that keeps a canvas and the underlying code in two-way sync — plus standardized evaluation workflows over mainstream RAG benchmarks so experiments stay reproducible and comparable.

## What it does

- Low-code orchestration: sequential, loop and conditional control flow declared in YAML rather than written as Python glue
- Atomic MCP servers — retriever, generation, corpus and evaluation are independent services whose tools compose across pipelines
- Unified evaluation with built-in workflows and ready-to-run mainstream RAG benchmarks for reproducible comparisons
- UltraRAG UI: a visual pipeline builder with two-way sync between canvas and code, plus knowledge-base management and one-click conversion of a pipeline into a chat app
- Multimodal and vision-language support, with vLLM and Hugging Face Transformers backends
- Docker images for CPU and GPU when you would rather not build a local Python environment

## Getting started

The project recommends installing from source with uv, which manages the virtual environment and the locked dependency set. A Docker path is available if you prefer not to configure Python locally.

1. Install uv and clone the repository

   uv manages the environment and the lockfile shared by every MCP server in the project.

```bash
pip install uv==0.12.0
git clone https://github.com/OpenBMB/UltraRAG.git --depth 1
cd UltraRAG
```

2. Sync dependencies

   `uv sync` installs the core; `--all-extras` adds retrieval, generation, corpus processing and evaluation. You can also install a single module with an extra such as `--extra retriever`.

```bash
# Core only (enough for UltraRAG UI)
uv sync

# Everything: retrieval, generation, corpus processing, evaluation
uv sync --all-extras

source .venv/bin/activate
```

3. Verify the installation

   Run the bundled hello example. A successful install prints "Hello, UltraRAG v3!".

```bash
ultrarag run examples/experiments/sayhello.yaml
```

4. Or deploy with Docker

   Pull a prebuilt image and start the container. UltraRAG UI launches automatically on port 5050.

```bash
docker pull hdxin2002/ultrarag:v0.3.0-base-cpu
docker run -it -p 5050:5050 hdxin2002/ultrarag:v0.3.0-base-cpu
```

## When to use it

- Run a standard RAG experiment on public benchmarks and compare it against baselines using the built-in evaluation workflow
- Prototype an iterative or branching RAG pipeline in YAML rather than writing bespoke orchestration code
- Reuse one retriever or reranker across several pipelines by exposing it once as an MCP server
- Turn a finished pipeline into an interactive chat demo with a knowledge base attached, without building a UI
