Skip to main content
Glama
airflow-mcp-server

airflow-mcp-server

by us-all

@us-all/airflow-mcp

Servidor MCP de Airflow: lee DAGs, ejecuciones, instancias de tareas, logs; dispara y limpia (protegido contra escritura). Construido sobre @us-all/mcp-toolkit.

Un MCP enfocado en la API REST estable de Airflow. Lectura por defecto; airflow-trigger-dag y airflow-clear-task están protegidos detrás de AIRFLOW_ALLOW_WRITE=true.

Para una integración más profunda con dbt (análisis de manifiestos, historial de resultados de ejecución, frescura de fuentes, cobertura de pruebas por columna, recorridos de linaje, tablas de resultados de DQ personalizadas), instala el compañero @us-all/dbt-mcp junto a este.

  • 7 herramientas en las categorías airflow + meta

  • 2 Prompts de MCP para flujos de trabajo de triaje de DAGs

  • 1 herramienta de agregación que reemplaza la combinación list-runs → get-task-instances

Instalación

pnpm add -D @us-all/airflow-mcp

Related MCP server: Apache Airflow MCP Server

Ejecución

AIRFLOW_API_URL=http://airflow.example.com:8080/api/v1 \
AIRFLOW_USERNAME=admin AIRFLOW_PASSWORD=... \
npx @us-all/airflow-mcp

El servidor utiliza MCP stdio; conéctalo a Claude Desktop / Cursor / cualquier cliente MCP. Configura MCP_TRANSPORT=http para optar por el transporte HTTP transmitible (autenticación Bearer, endpoint /health).

Herramientas

airflow (6 + 1 agregación)

Herramienta

Descripción

airflow-list-dags

Lista DAGs activos con filtros de etiqueta/búsqueda

airflow-list-runs

Ejecuciones recientes de un DAG (filtro de estado, ordenadas de más reciente a más antigua)

airflow-get-task-instances

Instancias de tarea para una ejecución de DAG específica

airflow-get-task-logs

Tail (últimos N kB) del log de una instancia de tarea

airflow-trigger-dag

Dispara una nueva ejecución (protegido contra escritura)

airflow-clear-task

Limpia instancias de tarea específicas → re-ejecuta (protegido contra escritura)

dag-health-rollup

Salud agregada del DAG: tasa de éxito + duración promedio + última ejecución fallida + tareas fallidas

meta

search-tools — descubrimiento de herramientas mediante lenguaje natural.

Prompts

Prompt

Usar cuando

dag-failure-triage

"¿Por qué falló el DAG X?" — extrae ejecuciones, aísla el fallo, vuelca logs, propone remediación

dag-schedule-audit

"Revisar todos los DAGs en busca de baja tasa de éxito y ejecuciones bloqueadas"

Variables de entorno

Env

Requerido

Notas

AIRFLOW_API_URL

sí

Base de la API REST de Airflow, ej. http://airflow.example.com:8080/api/v1

AIRFLOW_USERNAME

no

Nombre de usuario para autenticación básica

AIRFLOW_PASSWORD

no

Contraseña para autenticación básica (secreto)

AIRFLOW_ALLOW_WRITE

no

true habilita airflow-trigger-dag / airflow-clear-task

AIRFLOW_TOOLS / AIRFLOW_DISABLE

no

Interruptores de categoría

Esquemas probados

  • API REST estable de Airflow (2.x). Airflow 3.x expone la misma superficie a través de los endpoints estables /api/v1/, por lo que este servidor funciona tanto con despliegues 2.x como 3.x.

Servidor complementario

Para el análisis de artefactos de dbt, historial de resultados de ejecución y tablas de resultados de DQ, instala @us-all/dbt-mcp junto a este.

Construcción

pnpm install
pnpm run build      # tsc → dist/
pnpm test           # vitest
pnpm run smoke      # spawns dist/index.js, calls initialize + tools/list (set env first)

Licencia

MIT — ver LICENSE.

Available Tools

8 tools
airflow-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

    A3.6/5.0

    Scored across 8 tools

    Disambiguation4/5

    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.

    Naming Consistency3/5

    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.

    Tool Count5/5

    Eight tools is well-scoped for an Airflow operations server. Each tool covers a meaningful operation without redundancy or bloat.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      16
      56 PyPI
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      An 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