MCP Server for Apache Airflow
mcp-服务器-apache-airflow
Apache Airflow 的模型上下文协议 (MCP) 服务器实现,可与 MCP 客户端无缝集成。该项目提供了一种通过模型上下文协议与 Apache Airflow 交互的标准化方式。
关于
该项目实现了一个模型上下文协议 (MCP)服务器,它封装了 Apache Airflow 的 REST API,允许 MCP 客户端以标准化的方式与 Airflow 交互。它使用官方的 Apache Airflow 客户端库来确保兼容性和可维护性。
Related MCP server: astro-airflow-mcp
功能实现状态
特征 | API 路径 | 地位 |
DAG 管理 | ||
列出 DAG |
| ✅ |
获取 DAG 详细信息 |
| ✅ |
暂停 DAG |
| ✅ |
取消暂停 DAG |
| ✅ |
更新 DAG |
| ✅ |
删除 DAG |
| ✅ |
获取 DAG 源 |
| ✅ |
修补多个 DAG |
| ✅ |
重新解析 DAG 文件 |
| ✅ |
DAG 运行 | ||
列出 DAG 运行 |
| ✅ |
创建 DAG 运行 |
| ✅ |
获取 DAG 运行详细信息 |
| ✅ |
更新 DAG 运行 |
| ✅ |
删除 DAG 运行 |
| ✅ |
获取 DAG 运行批次 |
| ✅ |
清除 DAG 运行 |
| ✅ |
设置 DAG 运行说明 |
| ✅ |
获取上游数据集事件 |
| ✅ |
任务 | ||
列出 DAG 任务 |
| ✅ |
获取任务详细信息 |
| ✅ |
获取任务实例 |
| ✅ |
列出任务实例 |
| ✅ |
更新任务实例 |
| ✅ |
清除任务实例 |
| ✅ |
设置任务实例状态 |
| ✅ |
变量 | ||
列出变量 |
| ✅ |
创建变量 |
| ✅ |
获取变量 |
| ✅ |
更新变量 |
| ✅ |
删除变量 |
| ✅ |
连接 | ||
列出连接 |
| ✅ |
创建连接 |
| ✅ |
获取连接 |
| ✅ |
更新连接 |
| ✅ |
删除连接 |
| ✅ |
测试连接 |
| ✅ |
泳池 | ||
列出池 |
| ✅ |
创建池 |
| ✅ |
获取池 |
| ✅ |
更新池 |
| ✅ |
删除池 |
| ✅ |
XComs | ||
列出 XComs |
| ✅ |
获取 XCom 入口 |
| ✅ |
数据集 | ||
列出数据集 |
| ✅ |
获取数据集 |
| ✅ |
获取数据集事件 |
| ✅ |
创建数据集事件 |
| ✅ |
获取 DAG 数据集排队事件 |
| ✅ |
获取 DAG 数据集排队事件 |
| ✅ |
删除 DAG 数据集排队事件 |
| ✅ |
删除 DAG 数据集排队事件 |
| ✅ |
获取数据集排队事件 |
| ✅ |
删除数据集排队事件 |
| ✅ |
监控 | ||
获取健康 |
| ✅ |
DAG 统计数据 | ||
获取 DAG 统计数据 |
| ✅ |
配置 | ||
获取配置 |
| ✅ |
插件 | ||
获取插件 |
| ✅ |
提供商 | ||
列表提供商 |
| ✅ |
事件日志 | ||
列出事件日志 |
| ✅ |
获取事件日志 |
| ✅ |
系统 | ||
获取导入错误 |
| ✅ |
获取导入错误详细信息 |
| ✅ |
获取健康状况 |
| ✅ |
获取版本 |
| ✅ |
设置
依赖项
该项目依赖于官方 Apache Airflow 客户端库 ( apache-airflow-client )。安装此软件包时,它将自动安装。
环境变量
设置以下环境变量:
AIRFLOW_HOST=<your-airflow-host>
AIRFLOW_USERNAME=<your-airflow-username>
AIRFLOW_PASSWORD=<your-airflow-password>与 Claude Desktop 一起使用
添加到您的claude_desktop_config.json :
{
"mcpServers": {
"mcp-server-apache-airflow": {
"command": "uvx",
"args": ["mcp-server-apache-airflow"],
"env": {
"AIRFLOW_HOST": "https://your-airflow-host",
"AIRFLOW_USERNAME": "your-username",
"AIRFLOW_PASSWORD": "your-password"
}
}
}
}使用uv替代配置:
{
"mcpServers": {
"mcp-server-apache-airflow": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-server-apache-airflow",
"run",
"mcp-server-apache-airflow"
],
"env": {
"AIRFLOW_HOST": "https://your-airflow-host",
"AIRFLOW_USERNAME": "your-username",
"AIRFLOW_PASSWORD": "your-password"
}
}
}
}将/path/to/mcp-server-apache-airflow替换为您克隆存储库的实际路径。
选择 API 组
您可以通过设置--apis标志来选择要使用的 API 组。
uv run mcp-server-apache-airflow --apis "dag,dagrun"默认使用所有 API。
允许的值为:
配置
连接
达格
达格伦
达格统计
数据集
事件日志
导入错误
监控
插件
水池
提供者
任务实例
多变的
幽浮
手动执行
您也可以手动运行服务器:
make runmake run接受以下选项:
选项:
--port:监听 SSE 的端口(默认值:8000)--transport:传输类型(stdio/sse,默认值:stdio)
或者,您可以直接运行 sse 服务器,它接受相同的参数:
make run-sse通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Apache Airflow MCP 服务器:
npx -y @smithery/cli install @yangkyeongmo/mcp-server-apache-airflow --client claude贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
Available Tools
68 toolsclear_dag_runD
Clear a DAG run
Inputs: dag_id (required), dag_run_id (required), dry_run.
clear_task_instancesD
Clear a set of task instances
Inputs: dag_id (required), task_ids, start_date, end_date, +8 more.
create_connectionD
Create a connection
Inputs: conn_id (required), conn_type (required), host, port, +4 more.
create_dataset_eventD
Create dataset event
Inputs: dataset_uri (required), extra.
create_variableD
Create a variable
Inputs: key (required), value (required), description.
delete_connectionC
Delete a connection by ID
Inputs: conn_id (required).
delete_dagD
Delete a DAG
Inputs: dag_id (required).
delete_dag_dataset_queued_eventC
Delete a queued Dataset event for a DAG
Inputs: dag_id (required), uri (required).
delete_dag_dataset_queued_eventsC
Delete queued Dataset events for a DAG
Inputs: dag_id (required), before.
delete_dag_runC
Delete a DAG run by DAG ID and DAG run ID
Inputs: dag_id (required), dag_run_id (required).
delete_dataset_queued_eventsC
Delete queued Dataset events for a Dataset
Inputs: uri (required), before.
delete_poolD
Delete a pool
Inputs: pool_name (required).
delete_variableC
Delete a variable by key
Inputs: key (required).
fetch_dagsC
Fetch all DAGs
Inputs: limit, offset, order_by, tags, +3 more.
get_configD
Get current configuration
Inputs: section.
get_connectionC
Get a connection by ID
Inputs: conn_id (required).
get_dagC
Get a DAG by ID
Inputs: dag_id (required).
get_dag_dataset_queued_eventC
Get a queued Dataset event for a DAG
Inputs: dag_id (required), uri (required).
get_dag_dataset_queued_eventsC
Get queued Dataset events for a DAG
Inputs: dag_id (required).
get_dag_detailsC
Get a simplified representation of DAG
Inputs: dag_id (required), fields.
get_dag_runC
Get a DAG run by DAG ID and DAG run ID
Inputs: dag_id (required), dag_run_id (required).
get_dag_runsD
Get DAG runs by ID
Inputs: dag_id (required), limit, offset, execution_date_gte, +9 more.
get_dag_runs_batchD
List DAG runs (batch)
Inputs: dag_ids, execution_date_gte, execution_date_lte, start_date_gte, +7 more.
get_dag_sourceD
Get a source code
Inputs: file_token (required).
get_dag_statsD
Get DAG stats
Inputs: dag_ids.
get_dag_tasksD
Get tasks for DAG
Inputs: dag_id (required).
get_datasetC
Get a dataset by URI
Inputs: uri (required).
get_dataset_eventsD
Get dataset events
Inputs: limit, offset, order_by, dataset_id, +4 more.
get_dataset_queued_eventsC
Get queued Dataset events for a Dataset
Inputs: uri (required).
get_datasetsC
List datasets
Inputs: limit, offset, order_by, uri_pattern, +1 more.
get_event_logC
Get a specific log entry by ID
Inputs: event_log_id (required).
get_event_logsC
List log entries from event log
Inputs: limit, offset, order_by, dag_id, +10 more.
get_healthC
Get instance status
Inputs: no named parameters.
get_import_errorC
Get a specific import error by ID
Inputs: import_error_id (required).
get_import_errorsC
List import errors
Inputs: limit, offset, order_by.
get_logC
Get the log from a task instance by DAG ID, task ID, DAG run ID and task try number
Inputs: dag_id (required), task_id (required), dag_run_id (required), task_try_number (required).
get_pluginsC
Get a list of loaded plugins
Inputs: limit, offset.
get_poolC
Get a pool by name
Inputs: pool_name (required).
get_poolsD
List pools
Inputs: limit, offset, order_by.
get_providersC
Get a list of loaded providers
Inputs: limit, offset.
get_taskC
Get a task by ID
Inputs: dag_id (required), task_id (required).
get_task_instanceC
Get a task instance by DAG ID, task ID, and DAG run ID
Inputs: dag_id (required), task_id (required), dag_run_id (required).
get_tasksD
Get tasks for DAG
Inputs: dag_id (required), order_by.
get_upstream_dataset_eventsC
Get dataset events for a DAG run
Inputs: dag_id (required), dag_run_id (required).
get_valueC
Get a specific option from configuration
Inputs: section (required), option (required).
get_variableD
Get a variable by key
Inputs: key (required).
get_versionC
Get version information
Inputs: no named parameters.
get_xcom_entriesC
Get all XCom entries
Inputs: dag_id (required), dag_run_id (required), task_id (required), map_index, +3 more.
get_xcom_entryD
Get an XCom entry
Inputs: dag_id (required), dag_run_id (required), task_id (required), xcom_key (required), +3 more.
list_connectionsC
List all connections
Inputs: limit, offset, order_by.
list_task_instancesC
List task instances by DAG ID and DAG run ID
Inputs: dag_id (required), dag_run_id (required), execution_date_gte, execution_date_lte, +13 more.
list_task_instance_triesC
List task instance tries by DAG ID, DAG run ID, and task ID
Inputs: dag_id (required), dag_run_id (required), task_id (required), limit, +2 more.
list_variablesD
List all variables
Inputs: limit, offset, order_by.
patch_dagD
Update a DAG
Inputs: dag_id (required), is_paused, tags.
patch_dagsC
Update multiple DAGs
Inputs: dag_id_pattern, is_paused, tags.
patch_poolD
Update a pool
Inputs: pool_name (required), slots, description, include_deferred.
pause_dagC
Pause a DAG by ID
Inputs: dag_id (required).
post_dag_runC
Trigger a DAG by ID
Inputs: dag_id (required), dag_run_id, data_interval_end, data_interval_start, +3 more.
post_poolC
Create a pool
Inputs: name (required), slots (required), description, include_deferred.
reparse_dag_fileC
Request re-parsing of a DAG file
Inputs: file_token (required).
set_dag_run_noteC
Update the DagRun note
Inputs: dag_id (required), dag_run_id (required), note (required).
set_task_instances_stateD
Set a state of task instances
Inputs: dag_id (required), state (required), task_ids, execution_date, +5 more.
test_connectionD
Test a connection
Inputs: conn_type (required), host, port, login, +3 more.
unpause_dagC
Unpause a DAG by ID
Inputs: dag_id (required).
update_connectionC
Update a connection by ID
Inputs: conn_id (required), conn_type, host, port, +4 more.
update_dag_run_stateC
Update a DAG run state by DAG ID and DAG run ID
Inputs: dag_id (required), dag_run_id (required), state.
update_task_instanceC
Update a task instance by DAG ID, DAG run ID, and task ID
Inputs: dag_id (required), dag_run_id (required), task_id (required), state.
update_variableC
Update a variable by key
Inputs: key (required), value, description.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 68 tools
Most tools have distinct purposes targeting specific Airflow entities (DAGs, tasks, connections, variables, datasets), but there is some overlap between get_dag_details and get_dag, and between get_tasks and get_dag_tasks, which could cause minor confusion. The descriptions help differentiate, but the sheer number of tools increases cognitive load.
Tool names follow a highly consistent verb_noun pattern throughout (e.g., get_dag, create_connection, delete_variable, update_task_instance). There are no deviations in naming conventions, making the set predictable and easy to navigate.
With 68 tools, this server is overloaded for typical agent use. While Airflow is a complex system, this count far exceeds the 3-15 range for well-scoped servers, making it heavy and likely overwhelming for agents to handle efficiently.
The tool surface provides comprehensive CRUD/lifecycle coverage for all key Airflow domains (DAGs, tasks, connections, variables, datasets, pools, logs, XComs). There are no obvious gaps, and operations like create, get, update, delete, list, and state management are fully represented across entities.
Maintenance
Related MCP Connectors
Authenticated MCP server for ClearPolicy policy and compliance workflows.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Provide seamless access to Appfolio Property Manager Reporting API through a standardized MCP serv…
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceProvides integration with Apache Airflow's REST API, allowing AI assistants to programmatically interact with Airflow workflows, monitor DAG runs, and manage tasks.MIT

astro-airflow-mcpofficial
AlicenseAqualityFmaintenanceAn MCP server that enables AI assistants to interact with Apache Airflow's REST API for DAG management, task monitoring, and system diagnostics. It provides comprehensive tools for triggering workflows, retrieving logs, and inspecting system health across Airflow 2.x and 3.x versions.3113Apache 2.0- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that wraps the Apache Airflow REST API, enabling clients to manage DAGs, monitor task instances, and handle workflows through a standardized interface. It provides comprehensive access to Airflow features including DAG runs, variables, connections, and XComs.MIT
- AlicenseNot gradedqualityDmaintenanceProvides a standardized MCP interface for interacting with HTTP tools and services, enabling unified API access and management.MIT