{
  "markdown": "# @us-all/airflow-mcp\n\n> Airflow MCP server — read DAGs, runs, task instances, log tails; trigger and clear (write-gated). Built on `@us-all/mcp-toolkit`.\n\nA focused MCP for the Airflow 3.x REST API (`/api/v2`). Read by default; `airflow-trigger-dag` and `airflow-clear-task` are gated behind `AIRFLOW_ALLOW_WRITE=true`. Auth is JWT via SimpleAuthManager — supply `AIRFLOW_USERNAME` + `AIRFLOW_PASSWORD` and the server mints/refreshes the token transparently.\n\nFor deeper dbt integration (manifest parsing, run-results history, source freshness, per-column test coverage, lineage walks, custom DQ result tables), install the companion **[@us-all/dbt-mcp](https://www.npmjs.com/package/@us-all/dbt-mcp)** alongside.\n\n- 7 tools in `airflow` + `meta` categories\n- 2 MCP Prompts for DAG triage workflows\n- 1 aggregation tool that replaces the list-runs → get-task-instances combo\n\n## Install\n\n```bash\npnpm add -D @us-all/airflow-mcp\n```\n\n## Run\n\n```bash\nAIRFLOW_API_URL=http://airflow.example.com:8080 \\\nAIRFLOW_USERNAME=admin AIRFLOW_PASSWORD=... \\\nnpx @us-all/airflow-mcp\n```\n\nPass the host base only — the server prepends `/api/v2` internally. A trailing `/api/v1` or `/api/v2` is stripped if supplied. JWT tokens are cached for the lifetime of the session and refreshed 1 minute before they expire.\n\nThe server speaks MCP stdio; wire it into Claude Desktop / Cursor / any MCP client. Set `MCP_TRANSPORT=http` to opt in to Streamable HTTP transport (Bearer auth, `/health` endpoint).\n\n## Tools\n\n### `airflow` (6 + 1 aggregation)\n\n| Tool | Description |\n|------|-------------|\n| `airflow-list-dags` | List active DAGs with tag/search filters |\n| `airflow-list-runs` | Recent runs of one DAG (state filter, ordered newest first) |\n| `airflow-get-task-instances` | Task instances for a specific DAG run |\n| `airflow-get-task-logs` | Tail (last N kB) of one task instance log |\n| `airflow-trigger-dag` | Trigger a new run (write-gated) |\n| `airflow-clear-task` | Clear specific task instances → re-run (write-gated) |\n| `dag-health-rollup` | Aggregated DAG health: success rate + avg duration + last failed run + failing tasks |\n\n### `meta`\n\n`search-tools` — natural-language tool discovery.\n\n### Prompts\n\n| Prompt | Use when |\n|--------|----------|\n| `dag-failure-triage` | \"Why did DAG X fail?\" — pulls runs, isolates failure, dumps logs, proposes remediation |\n| `dag-schedule-audit` | \"Sweep all DAGs for low success rate and stuck runs\" |\n\n## Environment variables\n\n| Env | Required | Notes |\n|-----|----------|-------|\n| `AIRFLOW_API_URL` | yes | Airflow host base, e.g. `http://airflow.example.com:8080`. Trailing `/api/v1` or `/api/v2` is stripped if present |\n| `AIRFLOW_USERNAME` | yes | Username for JWT minting via SimpleAuthManager `/auth/token` |\n| `AIRFLOW_PASSWORD` | yes | Password for JWT minting (secret) |\n| `AIRFLOW_ALLOW_WRITE` | no | `true` enables `airflow-trigger-dag` / `airflow-clear-task` |\n| `AIRFLOW_TOOLS` / `AIRFLOW_DISABLE` | no | Category toggles |\n\n## Tested-against schemas\n\n- Airflow 3.0–3.2 `/api/v2` (verified against 3.2.1, current Airflow release as of 2026-05). Airflow 2.x is **not** supported by v0.2+ because basic auth + `/api/v1` were removed; pin to `@us-all/airflow-mcp@0.1.0` for Airflow 2.x deployments.\n\n## Companion server\n\nFor dbt artifact parsing, run-results history, and DQ result tables, install [`@us-all/dbt-mcp`](https://www.npmjs.com/package/@us-all/dbt-mcp) alongside.\n\n## Build\n\n```bash\npnpm install\npnpm run build      # tsc → dist/\npnpm test           # vitest\npnpm run smoke      # spawns dist/index.js, calls initialize + tools/list (set env first)\n```\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n",
  "bytes": 3661,
  "sha": "ef2daf046554ffb0bc8f8d77887257bfb56cfe4543dcd5df6ac7ec033c8a98c3",
  "repo_slug": "us-all/airflow-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_us_all_airflow_0807115b/readme"
}