airflow-mcp-server
@us-all/airflow-mcp
Airflow MCPサーバー — DAG、実行、タスクインスタンス、ログテールの読み取り。トリガーおよびクリア(書き込み制限付き)。
@us-all/mcp-toolkitを基盤として構築されています。
Airflow Stable REST APIに特化したMCPです。デフォルトでは読み取り専用ですが、AIRFLOW_ALLOW_WRITE=true を設定することで airflow-trigger-dag および airflow-clear-task が有効になります。
dbtとのより深い統合(マニフェスト解析、実行結果履歴、ソースの鮮度、列ごとのテストカバレッジ、リネージの追跡、カスタムDQ結果テーブルなど)が必要な場合は、コンパニオンである @us-all/dbt-mcp を併せてインストールしてください。
airflow+metaカテゴリで7つのツールを提供DAGトリアージワークフロー用の2つのMCPプロンプト
list-runs → get-task-instances の組み合わせを置き換える1つの集約ツール
インストール
pnpm add -D @us-all/airflow-mcpRelated MCP server: Apache Airflow MCP Server
実行
AIRFLOW_API_URL=http://airflow.example.com:8080/api/v1 \
AIRFLOW_USERNAME=admin AIRFLOW_PASSWORD=... \
npx @us-all/airflow-mcpこのサーバーはMCP stdioを使用します。Claude Desktop / Cursor / その他のMCPクライアントに接続してください。MCP_TRANSPORT=http を設定すると、ストリーミング可能なHTTPトランスポート(Bearer認証、/health エンドポイント)を選択できます。
ツール
airflow (6 + 1 集約ツール)
ツール | 説明 |
| タグ/検索フィルターを使用してアクティブなDAGを一覧表示 |
| 特定DAGの最近の実行(状態フィルター、新しい順) |
| 特定のDAG実行のタスクインスタンス |
| 特定タスクインスタンスのログの末尾(最後のN kB)を取得 |
| 新しい実行をトリガー(書き込み制限付き) |
| 特定のタスクインスタンスをクリアして再実行(書き込み制限付き) |
| 集約されたDAGの健全性:成功率 + 平均実行時間 + 最後の失敗した実行 + 失敗しているタスク |
meta
search-tools — 自然言語によるツール検索。
プロンプト
プロンプト | 使用場面 |
| 「なぜDAG Xは失敗したのか?」 — 実行を取得し、失敗を特定し、ログをダンプし、修正案を提示 |
| 「成功率が低いDAGやスタックしている実行をすべてスキャンする」 |
環境変数
環境変数 | 必須 | 備考 |
| はい | Airflow REST APIのベースURL(例: |
| いいえ | Basic認証のユーザー名 |
| いいえ | Basic認証のパスワード(シークレット) |
| いいえ |
|
| いいえ | カテゴリの切り替え |
テスト済みスキーマ
Airflow Stable REST API (2.x)。Airflow 3.xも
/api/v1/Stableエンドポイント経由で同じインターフェースを公開しているため、このサーバーは2.xおよび3.xの両方のデプロイメントで動作します。
コンパニオンサーバー
dbtアーティファクトの解析、実行結果履歴、DQ結果テーブルについては、@us-all/dbt-mcp を併せてインストールしてください。
ビルド
pnpm install
pnpm run build # tsc → dist/
pnpm test # vitest
pnpm run smoke # spawns dist/index.js, calls initialize + tools/list (set env first)ライセンス
MIT — LICENSE を参照してください。
Available Tools
8 toolsairflow-clear-taskA
Clear specific task instances in an Airflow DAG run (re-run them); supports include_upstream / include_downstream. Write-gated by AIRFLOW_ALLOW_WRITE.
Inputs: dagId (required), dagRunId (required), taskIds (required), includeDownstream, +1 more.
airflow-get-task-instancesB
List task instances for a specific Airflow DAG run with state, try_number, duration
Inputs: dagId (required), dagRunId (required), extractFields.
airflow-get-task-logsB
Fetch the tail (last N kB) of an Airflow task instance log for a specific try_number
Inputs: dagId (required), dagRunId (required), taskId (required), tryNumber, +2 more.
airflow-list-dagsB
List Airflow DAGs (active by default) with optional tag filter and dag_id substring search
Inputs: onlyActive, tag, search, limit, +1 more.
airflow-list-runsA
List recent runs of one Airflow DAG, optionally filtered by state, ordered newest first
Inputs: dagId (required), state, limit, extractFields.
airflow-trigger-dagA
Trigger a new Airflow DAG run with optional conf payload and note. Write-gated by AIRFLOW_ALLOW_WRITE.
Inputs: dagId (required), dagRunId, conf, note, +1 more.
dag-health-rollupA
Aggregated DAG health: success-rate over the last N runs + count breakdown (succeeded/failed/queued) + average duration + last-failed-run id + (optional) failing task instances. Replaces the airflow-list-runs + airflow-get-task-instances combo for 'is this DAG healthy right now?'.
Inputs: dagId (required), recentRuns, includeFailingTasks, extractFields.
search-toolsA
Discover available Airflow MCP tools by natural language query.
Inputs: query (required), category, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool maps to a distinct resource/action: DAGs, runs, task instances, logs, aggregate health, and tool discovery. dag-health-rollup and airflow-list-runs could overlap for health questions, but the description explicitly positions the rollup as the higher-level replacement, so ambiguity remains low.
Most tools follow the airflow-<verb>-<object> pattern (airflow-list-dags, airflow-trigger-dag, airflow-clear-task, airflow-list-runs, airflow-get-task-instances, airflow-get-task-logs), but dag-health-rollup and search-tools break both the airflow- prefix and the verb-noun convention. There is also minor inconsistency between 'list' and 'get' for similar retrieval operations.
Eight tools is well-scoped for an Airflow operations server. Each tool covers a meaningful operation without redundancy or bloat.
The set covers the core operational workflow: discover DAGs, trigger runs, inspect runs/task instances/logs, clear tasks, and get an aggregated health rollup. Minor gaps like pause/unpause DAGs or fetching DAG details exist, but they do not break the primary monitoring and troubleshooting use case.
Maintenance
Related MCP Connectors
Official Airtable MCP server — database and operations layer for agents.
Streamable HTTP MCP server exposing planner flows, tasks, and squads.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Argentic MCP server: run and inspect long-running agents on Argentic.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables inspection and management of Apache Airflow DAGs, runs, and logs across multiple instances. It provides tools for monitoring workflows and performing gated write operations like triggering DAGs or clearing task instances.1673 PyPI2Apache 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
- AlicenseAqualityCmaintenanceMCP server exposing Apache Airflow REST API operations as tools — list DAGs, inspect runs and task instances, trigger DAG runs, and check failed DAGs and scheduler health72MIT
- FlicenseNot gradedqualityDmaintenanceEnables DAG management, monitoring, debugging, and connection testing for Apache Airflow through the MCP protocol.-