airflow-unfactor
Reads Apache Airflow DAG source code and provides tools to convert it to Prefect flows, including reading DAG files, looking up translation knowledge, and validating generated code.
Generates idiomatic Prefect flow code from Apache Airflow DAGs, with support for deployment configuration, project scaffolding, and migration reporting.
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., "@airflow-unfactorconvert the DAG in dags/my_etl.py to a Prefect flow"
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.
airflow-unfactor
An MCP server that converts Apache Airflow DAGs into Prefect flows. Point it at a DAG, and the LLM generates idiomatic Prefect code. Not a template with TODOs — working code. Built with FastMCP.
Install
Claude Code — one line:
claude mcp add airflow-unfactor -- uvx airflow-unfactorClaude Desktop and other clients — see manual config below.
Then ask your LLM: "Convert the DAG in dags/my_etl.py to a Prefect flow."
How It Works
The server exposes seven tools over MCP. The LLM reads raw DAG source code, looks up translation knowledge, and generates the Prefect flow.
Tool | What It Does |
| Returns raw DAG source code with metadata (path, size, line count) |
| Airflow→Prefect translation knowledge — operators, patterns, connections |
| Syntax-checks generated code and returns both sources for comparison |
| Searches live Prefect docs for anything not in the pre-compiled knowledge |
| Creates a Prefect project directory structure (not code) |
| Writes prefect.yaml deployment configuration from DAG metadata |
| Writes MIGRATION.md with conversion decisions and a before-production checklist |
No AST parsing. No template engine. The LLM reads the code directly, just like a developer would.
Manual config
The buttons above and the claude mcp add command both register the server with uvx, which downloads it on first run — no separate pip install needed. To install the package directly anyway: pip install airflow-unfactor or uv pip install airflow-unfactor.
{
"mcpServers": {
"airflow-unfactor": {
"command": "uvx",
"args": ["airflow-unfactor"]
}
}
}{
"mcpServers": {
"airflow-unfactor": {
"command": "uvx",
"args": ["airflow-unfactor"]
}
}
}{
"mcpServers": {
"airflow-unfactor": {
"command": "uvx",
"args": ["airflow-unfactor"]
}
}
}Example
Airflow DAG:
from airflow import DAG
from airflow.operators.python import PythonOperator
def extract():
return {"users": [1, 2, 3]}
def transform(ti):
data = ti.xcom_pull(task_ids="extract")
return [u * 2 for u in data["users"]]
with DAG("my_etl", ...) as dag:
t1 = PythonOperator(task_id="extract", python_callable=extract)
t2 = PythonOperator(task_id="transform", python_callable=transform)
t1 >> t2Generated Prefect flow:
from prefect import flow, task
@task
def extract():
return {"users": [1, 2, 3]}
@task
def transform(data):
return [u * 2 for u in data["users"]]
@flow(name="my_etl")
def my_etl():
data = extract()
result = transform(data)
return resultThe >> dependency chain becomes explicit data passing through return values. XCom is gone. It's just Python.
Translation Knowledge
The server ships with 78 pre-compiled Airflow→Prefect translation entries covering operators, patterns, connections, and core concepts. These are compiled by Colin from live Airflow source and Prefect documentation.
When the pre-compiled knowledge doesn't cover something, search_prefect_docs queries the Prefect documentation MCP server at docs.prefect.io in real time.
Documentation
Full docs: gabcoyne.github.io/airflow-unfactor
Development
git clone https://github.com/gabcoyne/airflow-unfactor.git
cd airflow-unfactor
uv sync
# Run tests
uv run pytest
# Lint
uv run ruff check --fix
# Compile translation knowledge
cd colin && colin runLicense
MIT — see LICENSE.
This server cannot be installed
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
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/gabcoyne/airflow-unfactor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server