Labsco
chayasin logo

mcp-airflow-simple

from chayasin

simple mcp server for Airflow 3 (API version 2)

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

Airflow MCP Server

A Model Context Protocol (MCP) server for Apache Airflow 3 that provides essential tools for DAG management, monitoring, debugging, and connection testing through the Airflow REST API v2.

Features

๐Ÿš€ DAG Management

  • List all DAGs with filtering options
  • Get tasks within a specific DAG
  • Trigger DAG runs with optional configuration
  • Clear/retry failed DAG runs

๐Ÿ” Monitoring & Status

  • Check DAG run history and status
  • View task instances for specific runs
  • Get aggregate DAG statistics

๐Ÿ› Debugging & Logs

  • Retrieve task execution logs
  • Check DAG import/parsing errors

๐Ÿ”Œ Connection Management

  • List all Airflow connections
  • Get connection details
  • Test connection accessibility

๐Ÿฅ Health Checks

  • Monitor Airflow Scheduler, Metadatabase, Triggerer, and DagProcessor status

Available MCP Tools

DAG Management

get_dags

List all DAGs in Airflow.

{
  "only_active": false,
  "limit": 100
}

get_dag_tasks

Get all tasks in a specific DAG.

{
  "dag_id": "example_dag"
}

trigger_dag_run

Trigger a new DAG run.

{
  "dag_id": "example_dag",
  "conf": {"key": "value"},
  "logical_date": "2026-01-05T00:00:00Z"
}

clear_dag_run

Clear/retry a DAG run (resets failed tasks).

{
  "dag_id": "example_dag",
  "dag_run_id": "manual__2026-01-05T00:00:00+00:00",
  "dry_run": false
}

set_dag_state

Pause or unpause a DAG.

{
  "dag_id": "example_dag",
  "is_paused": true
}

Monitoring & Status

get_dag_runs

Get DAG run history with optional state filtering.

{
  "dag_id": "example_dag",
  "state": "failed",
  "limit": 25
}

get_task_instances

Get task instances for a specific DAG run.

{
  "dag_id": "example_dag",
  "dag_run_id": "manual__2026-01-05T00:00:00+00:00"
}

get_dag_stats

Get aggregate statistics for all DAGs.

{}

Debugging & Logs

get_task_logs

Get execution logs for a specific task instance.

{
  "dag_id": "example_dag",
  "dag_run_id": "manual__2026-01-05T00:00:00+00:00",
  "task_id": "example_task",
  "try_number": 1
}

get_import_errors

Get DAG import/parsing errors.

{}

Connection Management

get_connections

List all Airflow connections.

{
  "limit": 100
}

get_connection

Get details of a specific connection.

{
  "connection_id": "postgres_default"
}

test_connection

Test connection accessibility.

{
  "connection_id": "postgres_default"
}

Health Check

check_health

Check Airflow system health (includes Metadatabase, Scheduler, Triggerer, and DagProcessor).

{}

API Reference

This MCP server uses the Airflow REST API v2. For detailed API documentation, see: