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 APIAIRFLOW_USERNAMErequiredUsername for Airflow authenticationAIRFLOW_PASSWORDrequiredPassword for Airflow authenticationConfiguration
{
"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"
}
}
}
}