Apache Airflow MCP Server
Published · Updated
At a glance
- Category
- Data & analytics
- GitHub repository
- astronomer/agents
- Watch out for
- Several tools change state, including delete_dag_run, which permanently deletes a run, so set AF_READ_ONLY=true or ASTRO_MCP_ALLOWED_TOOLS when the agent should only observe.
The Airflow MCP server is published by Astronomer as the astro-airflow-mcp package, which now lives in the astronomer/agents repository (the older standalone astronomer/astro-airflow-mcp repo is archived). It is Apache 2.0 licensed and talks to the Airflow REST API, so it works with open-source Airflow 2.x and 3.x as well as Astro deployments. The server detects the Airflow version and adapts its calls accordingly.
Two setup routes exist. Most people start it locally with uvx, which pulls the package from PyPI and speaks stdio to the client. Note that the server defaults to HTTP, so the --transport stdio flag matters. The second option is plugin mode: add astro-airflow-mcp to your Airflow requirements.txt and it registers itself as an Airflow plugin, exposing an MCP endpoint at /mcp/v1/ on the webserver or API server.
Alongside the server, the same package ships an af command-line tool, and Astronomer bundles the server into its astronomer-data plugin for Claude Code together with a set of data engineering skills.
How it connects
Your AI app
An assistant or agent that supports MCP
Apache Airflow MCP Server
Runs as
- Python (uv / pip)
- Remote (HTTP)
Gives the agent
- DAG inspection
- Run control
- Task debugging
- Agent-oriented summaries
- Environment metadata
- Resources and prompts
Apache Airflow
The data or system the tools act on
What it can do
- DAG inspection
- list_dags, get_dag_details, get_dag_source and list_import_errors let an agent see what is deployed, read DAG code and find files that failed to parse.
- Run control
- trigger_dag, trigger_dag_and_wait, clear_dag_run, delete_dag_run, pause_dag and unpause_dag start, rerun or stop workflows.
- Task debugging
- get_task_instance, get_task_logs and clear_task_instances fetch execution details and logs for a specific try, and let the agent rerun failed tasks.
- Agent-oriented summaries
- explore_dag, diagnose_dag_run and get_system_health bundle several API calls into one, for example task-state counts plus failed instances for a run.
- Environment metadata
- list_pools, list_variables, list_connections (credentials excluded), list_assets, list_providers and get_airflow_config describe the surrounding setup.
- Resources and prompts
- airflow:// resources expose version, providers, plugins and config, and prompts such as troubleshoot_failed_dag and daily_health_check guide common workflows.
Setting it up
With uv installed nothing else needs installing, because uvx runs the package straight from PyPI. In Claude Code run claude mcp add airflow -- uvx astro-airflow-mcp --transport stdio. Cursor (~/.cursor/mcp.json), VS Code with Copilot (.mcp.json at the workspace root) and Claude Desktop use an mcpServers entry named airflow with command uvx and args ["astro-airflow-mcp", "--transport", "stdio"], and the README gives equivalent gemini mcp add and codex mcp add commands. By default the server targets http://localhost:8080, which suits a local Astro CLI project. For anything else pass environment variables: AIRFLOW_API_URL, then either AIRFLOW_USERNAME and AIRFLOW_PASSWORD or AIRFLOW_AUTH_TOKEN, for example claude mcp add airflow -e AIRFLOW_API_URL=https://your-airflow.example.com -e AIRFLOW_USERNAME=admin -e AIRFLOW_PASSWORD=admin -- uvx astro-airflow-mcp --transport stdio. Set AF_READ_ONLY=true to block writes. In plugin mode, point the client at https://<your-airflow-url>/mcp/v1/ with an Authorization header, and use -t http in Claude Code.
claude mcp add airflow -- uvx astro-airflow-mcpRuns the astro-airflow-mcp package from PyPI. Add any API keys, environment variables or extra arguments the setup notes above list. Combine several servers in the MCP config generator
Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)
Where it helps
- Find why last night's DAG run failed by running diagnose_dag_run and then pulling the failing task's logs with get_task_logs.
- Run a morning check with get_system_health to catch import errors and DAG warnings before users notice.
- Read an unfamiliar pipeline with explore_dag to see its tasks, recent runs and source in one call.
- Trigger a backfill-style rerun by clearing task instances after a fix has been deployed.
- Check which provider packages and Airflow version a deployment runs before upgrading DAG code.
Limitations and things to watch
- Several tools change state, including delete_dag_run, which permanently deletes a run, so set AF_READ_ONLY=true or ASTRO_MCP_ALLOWED_TOOLS when the agent should only observe.
- ASTRO_MCP_ALLOWED_TOOLS applies to every client of a server and is read only at startup, so changes need a restart of every process hosting the endpoint.
- get_dag_stats works only on Airflow 3.x, and plugin mode requires Airflow 2.4 or later.
- diagnose_dag_run returns full details for at most 100 task instances, and its pagination does not give an atomic snapshot of a run that is still changing.
- Access is bounded by the Airflow credentials you supply; the server does not add its own per-user permissions.
Sources
Written from the project's own documentation, checked November 2026.
- github.com /astronomer/agents
- github.com /astronomer/agents/tree/main/astro-airflow-mcp
- github.com /astronomer/agents/blob/main/astro-airflow-mcp/README.md
How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.