MCP Catalogs
首页MCP-Airflow-API screenshot

MCP-Airflow-API

by call518·46·综合分 45

MCP 服务器支持通过自然语言控制 Apache Airflow 工作流程。

developer-toolsops-infraai-llm
12
Forks
3
活跃 Issue
本月
最近提交
2 天前
收录于

概述

MCP-Airflow-API 是一个全面的 MCP 服务器,将 Apache Airflow REST API 操作转换为自然语言工具,使用户能够通过直观命令而非复杂的 API 调用来管理 Airflow 集群。该项目支持 Airflow 2.x(43 个工具)和 3.0+(45+ 个工具),可通过环境变量动态选择版本,使其能够适应不同的 Airflow 部署而无需更改代码。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:Airflow 管理员通过自然语言命令管理 DAG 和任务
:运营团队监控大型环境中的工作流程状态和性能
:数据工程师使用 LLM 助手(如 Claude 或 GPT)与 Airflow 集群交互
:支持哪些 Airflow 版本?
:如何处理身份验证?

什么时候选它

当你希望使用自然语言控制 Airflow 工作流而不想学习复杂 API 时选择此工具,特别是当你在同时管理 Airflow 2.x 和 3.x 环境时。

什么时候不要选它

如果你需要对 Airflow 配置进行超出其 API 的精细控制,或者使用其他工作流编排系统,则不应选择此工具。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • list_dags

    Retrieve a list of all DAGs in Airflow

  • get_dag_details

    Get detailed information about a specific DAG

  • trigger_dag

    Trigger a DAG run for a specific DAG

  • pause_dag

    Pause a DAG to prevent it from running

  • resume_dag

    Resume a paused DAG

  • get_dag_runs

    Get all runs for a specific DAG

  • get_task_instances

    Get task instances for a specific DAG run

  • get_task_log

    Get the log output for a specific task instance

  • get_variables

    Retrieve variables stored in Airflow

  • set_variable

    Create or update a variable in Airflow

  • get_connections

    Get all connections configured in Airflow

  • add_connection

    Add a new connection to Airflow

可对比工具

airflow-mcpairflow-cliapache-airflowprefect-mcp

安装

安装

方法 1:从 PyPI 直接安装

uvx --python 3.12 mcp-airflow-api

方法 2:Claude-Desktop MCP 客户端集成

{
  "mcpServers": {
    "mcp-airflow-api": {
      "command": "uvx",
      "args": ["--python", "3.12", "mcp-airflow-api"],
      "env": {
        "AIRFLOW_API_VERSION": "v2",
        "AIRFLOW_API_BASE_URL": "http://localhost:8080/api",
        "AIRFLOW_API_USERNAME": "airflow",
        "AIRFLOW_API_PASSWORD": "airflow"
      }
    }
  }
}

方法 3:Docker Compose

git clone https://github.com/call518/MCP-Airflow-API.git
cd MCP-Airflow-API
cp .env.example .env
# 编辑 .env 文件,添加您的 Airflow API 设置
docker-compose up -d

FAQ

支持哪些 Airflow 版本?
MCP-Airflow-API 支持 Airflow 2.x(API v1,43 个工具)和 Airflow 3.0+(API v2,45+ 个工具)。版本通过 AIRFLOW_API_VERSION 环境变量选择。
如何处理身份验证?
它支持基本身份验证(用户名/密码)和流式 HTTP 模式的令牌身份验证。通过环境变量进行配置。

Hacker News 讨论

开发者社区最近的相关讨论。

MCP-Airflow-API 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。