Apache Airflow MCP Server

$npx -y @yangkyeongmo/mcp-server-apache-airflow
README.md

Standardized way to interact with Apache Airflow through Model Context Protocol

mcp-server-apache-airflow

A Model Context Protocol (MCP) server implementation for Apache Airflow, enabling seamless integration with MCP clients. This project provides a standardized way to interact with Apache Airflow through the Model Context Protocol.

About

This project implements a Model Context Protocol server that wraps Apache Airflow's REST API, allowing MCP clients to interact with Airflow in a standardized way. It uses the official Apache Airflow client library to ensure compatibility and maintainability.

Feature Implementation Status

Feature API Path Status
DAG Management
List DAGs /api/v1/dags
Get DAG Details /api/v1/dags/{dag_id}
Pause DAG /api/v1/dags/{dag_id}
Unpause DAG /api/v1/dags/{dag_id}
Update DAG /api/v1/dags/{dag_id}
Delete DAG /api/v1/dags/{dag_id}
Get DAG Source /api/v1/dagSources/{file_token}
Patch Multiple DAGs /api/v1/dags
Reparse DAG File /api/v1/dagSources/{file_token}/reparse
DAG Runs
List DAG Runs /api/v1/dags/{dag_id}/dagRuns
Create DAG Run /api/v1/dags/{dag_id}/dagRuns
Get DAG Run Details /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}
Update DAG Run /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}
Delete DAG Run /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}
Get DAG Runs Batch /api/v1/dags/~/dagRuns/list
Clear DAG Run /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear
Set DAG Run Note /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/setNote
Get Upstream Dataset Events /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents
Tasks
List DAG Tasks /api/v1/dags/{dag_id}/tasks
Get Task Details /api/v1/dags/{dag_id}/tasks/{task_id}
Get Task Instance /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}
List Task Instances /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances
Update Task Instance `/api/v

Tools (5)

list_dagsList all available DAGs in the Airflow instance.
get_dag_detailsGet detailed information about a specific DAG by ID.
create_dag_runTrigger a new DAG run for a specific DAG.
list_dag_runsList all runs for a specific DAG.
get_task_instancesList task instances for a specific DAG run.

Environment Variables

AIRFLOW_BASE_URLrequiredThe base URL of your Apache Airflow instance REST API
AIRFLOW_USERNAMErequiredUsername for Airflow authentication
AIRFLOW_PASSWORDrequiredPassword for Airflow authentication

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "apache-airflow": {
      "command": "npx",
      "args": [
        "-y",
        "@yangkyeongmo/mcp-server-apache-airflow"
      ],
      "env": {
        "AIRFLOW_BASE_URL": "http://localhost:8080",
        "AIRFLOW_USERNAME": "admin",
        "AIRFLOW_PASSWORD": "admin"
      }
    }
  }
}

Try it

List all the DAGs currently active in my Airflow instance.
Trigger a new run for the 'daily_etl_process' DAG with the configuration {'date': '2023-10-27'}.
Check the status of the last 5 runs for the 'data_sync' DAG.
Get the details and source code for the DAG named 'cleanup_logs'.
Show me the task instances for the most recent run of the 'ml_pipeline' DAG.

Frequently Asked Questions

What are the key features of Apache Airflow MCP Server?

Comprehensive DAG management including list, get details, pause, unpause, and delete.. Full DAG run lifecycle control including creation, clearing, and batch listing.. Task-level monitoring with capabilities to list tasks and retrieve specific task instance details.. Standardized access to Airflow variables, connections, and XComs via REST API wrapping.. Support for retrieving DAG source code and reparsing DAG files..

What can I use Apache Airflow MCP Server for?

Data engineers monitoring pipeline health directly from their AI assistant.. DevOps teams triggering manual workflow runs with custom parameters via natural language.. Developers debugging failed task instances by inspecting logs and source code through the MCP interface.. Automating Airflow administrative tasks like pausing multiple DAGs or updating variables..

How do I install Apache Airflow MCP Server?

Install Apache Airflow MCP Server by running: npx -y @yangkyeongmo/mcp-server-apache-airflow

What MCP clients work with Apache Airflow MCP Server?

Apache Airflow MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Apache Airflow MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free