Airflow MCP
Allows interaction with Apache Airflow, enabling users to query DAG statuses, trigger runs, and monitor executions via natural language.
Click on "Deploy 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 MCPWhat DAGs failed in the last hour?"
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 MCP
This project implements an MCP server for Apache Airflow, enabling users to interact with their orchestration platform using natural language.
With a few minutes of setup, you should be able to use Claude Desktop or any MCP-enabled LLM to ask questions like:
"What DAGs do we have in our Airflow cluster?"
"What is our latest failed DAG?"
"Show me all versions of the transform_sales_aggregator DAG"
"Which assets are produced by our load DAGs?"
About MCP and Airflow MCP
The Model Context Protocol (MCP) is an open standard creating secure connections between data sources and AI applications. This repository provides a custom MCP server for Apache Airflow that transforms how teams interact with their orchestration platform through natural language.
Supports Airflow 2 and Airflow 3. Set airflow_version=3 in your environment to enable the Airflow 3 API (/api/v2) and JWT authentication automatically.
Related MCP server: Airflow MCP
🚀 Features
Query pipeline statuses through natural language
Troubleshoot DAG failures efficiently
Retrieve comprehensive DAG information
Trigger DAGs based on their status
Monitor execution results
Analyze DAG components and configurations
Browse Airflow variables, pools, and connections
Inspect task instances for any DAG run
Airflow 3: DAG version history, Asset (Dataset) catalog
🛠️ Getting Started
Prerequisites
If you already have an Airflow instance and want to use our prebuilt Docker image, you only need:
Docker
Access to your Apache Airflow instance (Airflow 2 or Airflow 3)
LLM access (Claude, ChatGPT, or AWS Bedrock)
This repository also provides a local setup for Apache Airflow, which you can use for demo purposes.
Quick Start - Using the Prebuilt Docker Image
Configure Claude Desktop to connect to your Airflow instance. If you haven't configured Claude Desktop for use with MCP before, follow the Claude Desktop documentation.
Airflow 2:
{
"mcpServers": {
"airflow_mcp": {
"command": "docker",
"args": ["run", "-i", "--rm",
"-e", "airflow_base_url",
"-e", "airflow_username",
"-e", "airflow_password",
"-e", "airflow_version",
"pondered/airflow-mcp:latest"],
"env": {
"airflow_base_url": "http://host.docker.internal:8088",
"airflow_username": "airflow",
"airflow_password": "airflow",
"airflow_version": "2"
}
}
}
}Airflow 3 (uses /api/v2 and JWT authentication automatically):
{
"mcpServers": {
"airflow_mcp": {
"command": "docker",
"args": ["run", "-i", "--rm",
"-e", "airflow_base_url",
"-e", "airflow_username",
"-e", "airflow_password",
"-e", "airflow_version",
"pondered/airflow-mcp:latest"],
"env": {
"airflow_base_url": "http://host.docker.internal:8080",
"airflow_username": "airflow",
"airflow_password": "airflow",
"airflow_version": "3"
}
}
}
}Running MCP Locally with Claude Desktop
Clone this repository:
git clone https://github.com/ponderedw/airflow-mcpIf you don't have a running Airflow environment, start one with:
just airflowThis will start an Airflow instance on port 8088, with username
airflowand passwordairflow.You can access Airflow at http://localhost:8088/ and see multiple DAGs configured:

These DAGs have complex dependencies, some running on a schedule and some using Airflow's Dataset/Asset functionality.
Configure Claude Desktop as shown in the Quick Start section above.
Test your setup by asking Claude: "What DAGs do we have in our Airflow cluster?"
Environment Variables
Variable | Required | Description |
| Yes | Base URL of your Airflow instance (e.g. |
| Yes | Airflow username |
| Yes | Airflow password |
| No |
|
| No |
|
| No |
|
| No | Bearer token to protect the MCP server's own SSE endpoint |
| No |
|
| No | Alternative connection string: |
🔧 Available Tools
Read tools (always enabled)
Tool | Description |
| List all DAGs |
| Full details for a single DAG |
| All tasks defined in a DAG |
| Details for a single task |
| Source code of a DAG file |
| 25 most recent runs for a DAG |
| Filtered runs across multiple DAGs |
| Task instances for a specific DAG run |
| All Airflow connections |
| All Airflow variables |
| A single Airflow variable by key |
| All resource pools and slot usage |
Write tools (require POST_MODE=true)
Tool | Description |
| Trigger a new DAG run |
| Pause or unpause one or all DAGs |
Airflow 3 only (enabled automatically when airflow_version=3)
Tool | Description |
| All recorded versions of a DAG |
| A specific DAG version by number |
| All Assets (formerly Datasets) |
Schedule Insights tools (require AIRFLOW_INSIGHTS_MODE=true)
Tool | Description |
| Predicted next run time for a DAG |
Requires the airflow-schedule-insights plugin installed in your Airflow environment.
📝 Example Usage
"What DAGs do we have in our Airflow cluster?"
"Identify all DAGs with failed status in their most recent execution and trigger a new run for each one"
"What operators are used by the transform_forecast_attendance DAG?"
"Has the transform_forecast_attendance DAG ever completed successfully?"
"Show me all versions of the load_ticket_sales DAG and what changed"
"Which assets does the load_box_office_reports DAG produce?"
"What variables are configured in Airflow?"
Running MCP with LangChain
You can use from langchain_mcp_adapters.client import MultiServerMCPClient to add Airflow MCP as one of your tools in a LangChain app.
Option 1: Separate Container (SSE Transport)
mcp_host = os.environ.get('mcp_host', 'mcp_sse_server:8000')
mcps = {
"AirflowMCP": {
"url": f"http://{mcp_host}/sse",
"transport": "sse",
"headers": {"Authorization": f"Bearer {os.environ.get('MCP_TOKEN')}"}
}
}Option 2: Embedded Server (STDIO Transport)
Install the library first: pip install airflow-mcp-ponder
mcps = {
"AirflowMCP": {
'command': "python",
'args': ["-m", "airflow_mcp_ponder.mcp_airflow"],
"transport": "stdio",
'env': {k: v for k, v in {
'AIRFLOW_ASSISTENT_AI_CONN': os.getenv('AIRFLOW_ASSISTENT_AI_CONN'),
'airflow_base_url': os.getenv('airflow_base_url'),
'airflow_username': os.getenv('airflow_username'),
'airflow_password': os.getenv('airflow_password'),
'airflow_version': os.getenv('airflow_version'),
'AIRFLOW_INSIGHTS_MODE': os.getenv('AIRFLOW_INSIGHTS_MODE'),
'POST_MODE': os.getenv('POST_MODE'),
'TRANSPORT_TYPE': 'stdio',
}.items() if v is not None}
}
}Using the Tools
client = MultiServerMCPClient(mcps)
tools = await client.get_tools()🤝 Contributing
We enthusiastically invite the community to contribute to this open-source initiative! Whether you're interested in:
Adding new features
Improving documentation
Enhancing compatibility with different LLM providers
Reporting bugs
Suggesting improvements
Please feel free to submit pull requests or open issues on our GitHub repository.
🔗 Links
This server cannot be deployed
Maintenance
Related MCP Connectors
Your Databricks Lakehouse in natural language: run SQL on your SQL warehouses, track long-running qu
Interact with your Google Cloud Composer resources using natural language commands.
Deploy, monitor, and manage your OpenClaw AI assistants via natural language.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides integration with Apache Airflow's REST API, allowing AI assistants to programmatically interact with Airflow workflows, monitor DAG runs, and manage tasks.MIT
- AlicenseNot gradedqualityDmaintenanceEnables users to interact with Apache Airflow orchestration platform through natural language to query pipeline statuses, troubleshoot DAG failures, trigger DAGs, and analyze configurations.11MIT
- FlicenseNot gradedqualityDmaintenanceEnables natural language-powered ETL workflows using Airflow, AWS Glue, Athena, and S3, allowing LLM agents to control and monitor data infrastructure.-
- AlicenseAqualityCmaintenanceEnables interaction with an Airbyte instance through natural language, supporting workspaces, sources, destinations, connections, jobs, logs, tags, streams, and connector definitions.3640 PyPI5Apache 2.0