Skip to content
Back to search

mcp-server-apache-airflow

A Model Context Protocol (MCP) server implementation for Apache Airflow, enabling seamless integration with MCP clients. This project provides a standardized way to interact with Apache Airflow…

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/yangkyeongmo/mcp-server-apache-airflow with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/yangkyeongmo/mcp-server-apache-airflow'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/yangkyeongmo--mcp-server-apache-airflow/badge.svg)](/listings/yangkyeongmo--mcp-server-apache-airflow)

HTML

<a href="/listings/yangkyeongmo--mcp-server-apache-airflow"><img src="/api/listings/yangkyeongmo--mcp-server-apache-airflow/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Dependencies

This project depends on the official Apache Airflow client library (`apache-airflow-client`). It will be automatically installed when you install this package.

Environment Variables

Set the following environment variables:

AIRFLOW_HOST=<your-airflow-host>        # Optional, defaults to http://localhost:8080
AIRFLOW_API_VERSION=v1                  # Optional, defaults to v1
READ_ONLY=true                          # Optional, enables read-only mode (true/false, defaults to false)

Authentication

Choose one of the following authentication methods:

**Basic Authentication (default):**

AIRFLOW_USERNAME=<your-airflow-username>
AIRFLOW_PASSWORD=<your-airflow-password>

**JWT Token Authentication:**

AIRFLOW_JWT_TOKEN=<your-jwt-token>

To obtain a JWT token, you can use Airflow's authentication endpoint:

ENDPOINT_URL="http://localhost:8080"  # Replace with your Airflow endpoint
curl -X 'POST' \
  "${ENDPOINT_URL}/auth/token" \
  -H 'Content-Type: application/json' \
  -d '{ "username": "<your-username>", "password": "<your-password>" }'

> **Note**: If both JWT token and basic authentication credentials are provided, JWT token takes precedence.

Usage with Claude Desktop

Add to your `claude_desktop_config.json`:

**Basic Authentication:**

{
  "mcpServers": {
    "mcp-server-apache-airflow": {
      "command": "uvx",
      "args": ["mcp-server-apache-airflow"],
      "env": {
        "AIRFLOW_HOST": "https://your-airflow-host",
        "AIRFLOW_USERNAME": "your-username",
        "AIRFLOW_PASSWORD": "your-password"
      }
    }
  }
}

**JWT Token Authentication:**

{
  "mcpServers": {
    "mcp-server-apache-airflow": {
      "command": "uvx",
      "args": ["mcp-server-apache-airflow"],
      "env": {
        "AIRFLOW_HOST": "https://your-airflow-host",
        "AIRFLOW_JWT_TOKEN": "your-jwt-token"
      }
    }
  }
}

For read-only mode (recommended for safety):

**Basic Authentication:**

{
  "mcpServers": {
    "mcp-server-apache-airflow": {
      "command": "uvx",
      "args": ["mcp-server-apache-airflow"],
      "env": {
        "AIRFLOW_HOST": "https://your-airflow-host",
        "AIRFLOW_USERNAME": "your-username",
        "AIRFLOW_PASSWORD": "your-password",
        "READ_ONLY": "true"
      }
    }
  }
}

**JWT Token Authentication:**

{
  "mcpServers": {
    "mcp-server-apache-airflow": {
      "command": "uvx",
      "args": ["mcp-server-apache-airflow", "--read-only"],
      "env": {
        "AIRFLOW_HOST": "https://your-airflow-host",
        "AIRFLOW_JWT_TOKEN": "your-jwt-token"
      }
    }
  }
}

Alternative configuration using `uv`:

**Basic Authentication:**

{
  "mcpServers": {
    "mcp-server-apache-airflow": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-apache-airflow",
        "run",
        "mcp-server-apache-airflow"
      ],
      "env": {
        "AIRFLOW_HOST": "https://your-airflow-host",
        "AIRFLOW_USERNAME": "your-username",
        "AIRFLOW_PASSWORD": "your-password"
      }
    }
  }
}

**JWT Token Authentication:**

{
  "mcpServers": {
    "mcp-server-apache-airflow": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-apache-airflow",
        "run",
        "mcp-server-apache-airflow"
      ],
      "env": {
        "AIRFLOW_HOST": "https://your-airflow-host",
        "AIRFLOW_JWT_TOKEN": "your-jwt-token"
      }
    }
  }
}

Replace `/path/to/mcp-server-apache-airflow` with the actual path where you've cloned the repository.

Selecting the API groups

You can select the API groups you want to use by setting the `--apis` flag.

uv run mcp-server-apache-airflow --apis dag --apis dagrun

The default is to use all APIs.

Allowed values are:

- config - connections - dag - dagrun - dagstats - dataset - eventlog - importerror - monitoring - plugin - pool

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 430 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/yangkyeongmo-mcp-server-apache-airflow-badge.png)](https://mseep.ai/app/yangkyeongmo-mcp-server-apache-airflow)
  2. # mcp-server-apache-airflow
  3. [![smithery badge](https://smithery.ai/badge/@yangkyeongmo/mcp-server-apache-airflow)](https://smithery.ai/server/@yangkyeongmo/mcp-server-apache-airflow)
  4. ![PyPI - Downloads](https://img.shields.io/pypi/dm/mcp-server-apache-airflow)
  5. A Model Context Protocol (MCP) server implementation for Apache Airflow, enabling seamless integration with MCP clients. This project provides a standardized way to interact with Apache Airflow through the Model Context Protocol.
  6. <a href="https://glama.ai/mcp/servers/e99b6vx9lw">
  7. <img width="380" height="200" src="https://glama.ai/mcp/servers/e99b6vx9lw/badge" alt="Server for Apache Airflow MCP server" />
  8. </a>
  9. ## About
  10. This project implements a [Model Context Protocol](https://modelcontextprotocol.io/introduction) server that wraps Apache Airflow's REST API, allowing MCP clients to interact with Airflow in a standardized way. It uses the official Apache Airflow client library to ensure compatibility and maintainability.
  11. ## Feature Implementation Status
  12. | Feature | API Path | Status |
  13. | -------------------------------- | --------------------------------------------------------------------------------------------- | ------ |
  14. | **DAG Management** | | |
  15. | List DAGs | `/api/v1/dags` | ✅ |
  16. | Get DAG Details | `/api/v1/dags/{dag_id}` | ✅ |
  17. | Pause DAG | `/api/v1/dags/{dag_id}` | ✅ |
  18. | Unpause DAG | `/api/v1/dags/{dag_id}` | ✅ |
  19. | Update DAG | `/api/v1/dags/{dag_id}` | ✅ |
  20. | Delete DAG | `/api/v1/dags/{dag_id}` | ✅ |
  21. | Get DAG Source | `/api/v1/dagSources/{file_token}` | ✅ |
  22. | Patch Multiple DAGs | `/api/v1/dags` | ✅ |
  23. | Reparse DAG File | `/api/v1/dagSources/{file_token}/reparse` | ✅ |
  24. | **DAG Runs** | | |
  25. | List DAG Runs | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
  26. | Create DAG Run | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
  27. | Get DAG Run Details | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
  28. | Update DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
  29. | Delete DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
  30. | Get DAG Runs Batch | `/api/v1/dags/~/dagRuns/list` | ✅ |
  31. | Clear DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear` | ✅ |
  32. | Set DAG Run Note | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/setNote` | ✅ |
  33. | Get Upstream Dataset Events | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents` | ✅ |
  34. | **Tasks** | | |
  35. | List DAG Tasks | `/api/v1/dags/{dag_id}/tasks` | ✅ |
  36. | Get Task Details | `/api/v1/dags/{dag_id}/tasks/{task_id}` | ✅ |
  37. | Get Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
  38. | List Task Instances | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances` | ✅ |
  39. | Update Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
  40. | Get Task Instance Log | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/logs/{task_try_number}` | ✅ |
  41. | Clear Task Instances | `/api/v1/dags/{dag_id}/clearTaskInstances` | ✅ |
  42. | Set Task Instances State | `/api/v1/dags/{dag_id}/updateTaskInstancesState` | ✅ |
  43. | List Task Instance Tries | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/tries` | ✅ |
  44. | **Variables** | | |
  45. | List Variables | `/api/v1/variables` | ✅ |
  46. | Create Variable | `/api/v1/variables` | ✅ |
  47. | Get Variable | `/api/v1/variables/{variable_key}` | ✅ |
  48. | Update Variable | `/api/v1/variables/{variable_key}` | ✅ |
  49. | Delete Variable | `/api/v1/variables/{variable_key}` | ✅ |
  50. | **Connections** | | |
  51. | List Connections | `/api/v1/connections` | ✅ |
  52. | Create Connection | `/api/v1/connections` | ✅ |
  53. | Get Connection | `/api/v1/connections/{connection_id}` | ✅ |
  54. | Update Connection | `/api/v1/connections/{connection_id}` | ✅ |
  55. | Delete Connection | `/api/v1/connections/{connection_id}` | ✅ |
  56. | Test Connection | `/api/v1/connections/test` | ✅ |
  57. | **Pools** | | |
  58. | List Pools | `/api/v1/pools` | ✅ |
  59. | Create Pool | `/api/v1/pools` | ✅ |
  60. | Get Pool | `/api/v1/pools/{pool_name}` | ✅ |
  61. | Update Pool | `/api/v1/pools/{pool_name}` | ✅ |
  62. | Delete Pool | `/api/v1/pools/{pool_name}` | ✅ |
  63. | **XComs** | | |
  64. | List XComs | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries` | ✅ |
  65. | Get XCom Entry | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}` | ✅ |
  66. | **Datasets** | | |
  67. | List Datasets | `/api/v1/datasets` | ✅ |
  68. | Get Dataset | `/api/v1/datasets/{uri}` | ✅ |
  69. | Get Dataset Events | `/api/v1/datasetEvents` | ✅ |
  70. | Create Dataset Event | `/api/v1/datasetEvents` | ✅ |
  71. | Get DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
  72. | Get DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
  73. | Delete DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
  74. | Delete DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
  75. | Get Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
  76. | Delete Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
  77. | **Monitoring** | | |
  78. | Get Health | `/api/v1/health` | ✅ |
  79. | **DAG Stats** | | |
  80. | Get DAG Stats | `/api/v1/dags/statistics` | ✅ |
  81. | **Config** | | |
  82. | Get Config | `/api/v1/config` | ✅ |
  83. | **Plugins** | | |
  84. | Get Plugins | `/api/v1/plugins` | ✅ |
  85. | **Providers** | | |
  86. | List Providers | `/api/v1/providers` | ✅ |
  87. | **Event Logs** | | |
  88. | List Event Logs | `/api/v1/eventLogs` | ✅ |
  89. | Get Event Log | `/api/v1/eventLogs/{event_log_id}` | ✅ |
  90. | **System** | | |
  91. | Get Import Errors | `/api/v1/importErrors` | ✅ |
  92. | Get Import Error Details | `/api/v1/importErrors/{import_error_id}` | ✅ |
  93. | Get Health Status | `/api/v1/health` | ✅ |
  94. | Get Version | `/api/v1/version` | ✅ |
  95. ## Setup
  96. ### Dependencies
  97. This project depends on the official Apache Airflow client library (`apache-airflow-client`). It will be automatically installed when you install this package.
  98. ### Environment Variables
  99. Set the following environment variables:
  100. ```
  101. AIRFLOW_HOST=<your-airflow-host> # Optional, defaults to http://localhost:8080
  102. AIRFLOW_API_VERSION=v1 # Optional, defaults to v1
  103. READ_ONLY=true # Optional, enables read-only mode (true/false, defaults to false)
  104. ```
  105. #### Authentication
  106. Choose one of the following authentication methods:
  107. **Basic Authentication (default):**
  108. ```
  109. AIRFLOW_USERNAME=<your-airflow-username>
  110. AIRFLOW_PASSWORD=<your-airflow-password>
  111. ```
  112. **JWT Token Authentication:**
  113. ```
  114. AIRFLOW_JWT_TOKEN=<your-jwt-token>
  115. ```
  116. To obtain a JWT token, you can use Airflow's authentication endpoint:
  117. ```bash
  118. ENDPOINT_URL="http://localhost:8080" # Replace with your Airflow endpoint
  119. curl -X 'POST' \
  120. "${ENDPOINT_URL}/auth/token" \
  121. -H 'Content-Type: application/json' \
  122. -d '{ "username": "<your-username>", "password": "<your-password>" }'
  123. ```
  124. > **Note**: If both JWT token and basic authentication credentials are provided, JWT token takes precedence.
  125. ### Usage with Claude Desktop
  126. Add to your `claude_desktop_config.json`:
  127. **Basic Authentication:**
  128. ```json
  129. {
  130. "mcpServers": {
  131. "mcp-server-apache-airflow": {
  132. "command": "uvx",
  133. "args": ["mcp-server-apache-airflow"],
  134. "env": {
  135. "AIRFLOW_HOST": "https://your-airflow-host",
  136. "AIRFLOW_USERNAME": "your-username",
  137. "AIRFLOW_PASSWORD": "your-password"
  138. }
  139. }
  140. }
  141. }
  142. ```
  143. **JWT Token Authentication:**
  144. ```json
  145. {
  146. "mcpServers": {
  147. "mcp-server-apache-airflow": {
  148. "command": "uvx",
  149. "args": ["mcp-server-apache-airflow"],
  150. "env": {
  151. "AIRFLOW_HOST": "https://your-airflow-host",
  152. "AIRFLOW_JWT_TOKEN": "your-jwt-token"
  153. }
  154. }
  155. }
  156. }
  157. ```
  158. For read-only mode (recommended for safety):
  159. **Basic Authentication:**
  160. ```json
  161. {
  162. "mcpServers": {
  163. "mcp-server-apache-airflow": {
  164. "command": "uvx",
  165. "args": ["mcp-server-apache-airflow"],
  166. "env": {
  167. "AIRFLOW_HOST": "https://your-airflow-host",
  168. "AIRFLOW_USERNAME": "your-username",
  169. "AIRFLOW_PASSWORD": "your-password",
  170. "READ_ONLY": "true"
  171. }
  172. }
  173. }
  174. }
  175. ```
  176. **JWT Token Authentication:**
  177. ```json
  178. {
  179. "mcpServers": {
  180. "mcp-server-apache-airflow": {
  181. "command": "uvx",
  182. "args": ["mcp-server-apache-airflow", "--read-only"],
  183. "env": {
  184. "AIRFLOW_HOST": "https://your-airflow-host",
  185. "AIRFLOW_JWT_TOKEN": "your-jwt-token"
  186. }
  187. }
  188. }
  189. }
  190. ```
  191. Alternative configuration using `uv`:
  192. **Basic Authentication:**
  193. ```json
  194. {
  195. "mcpServers": {
  196. "mcp-server-apache-airflow": {
  197. "command": "uv",
  198. "args": [
  199. "--directory",
  200. "/path/to/mcp-server-apache-airflow",
  201. "run",
  202. "mcp-server-apache-airflow"
  203. ],
  204. "env": {
  205. "AIRFLOW_HOST": "https://your-airflow-host",
  206. "AIRFLOW_USERNAME": "your-username",
  207. "AIRFLOW_PASSWORD": "your-password"
  208. }
  209. }
  210. }
  211. }
  212. ```
  213. **JWT Token Authentication:**
  214. ```json
  215. {
  216. "mcpServers": {
  217. "mcp-server-apache-airflow": {
  218. "command": "uv",
  219. "args": [
  220. "--directory",
  221. "/path/to/mcp-server-apache-airflow",
  222. "run",
  223. "mcp-server-apache-airflow"
  224. ],
  225. "env": {
  226. "AIRFLOW_HOST": "https://your-airflow-host",
  227. "AIRFLOW_JWT_TOKEN": "your-jwt-token"
  228. }
  229. }
  230. }
  231. }
  232. ```
  233. Replace `/path/to/mcp-server-apache-airflow` with the actual path where you've cloned the repository.
  234. ### Selecting the API groups
  235. You can select the API groups you want to use by setting the `--apis` flag.
  236. ```bash
  237. uv run mcp-server-apache-airflow --apis dag --apis dagrun
  238. ```
  239. The default is to use all APIs.
  240. Allowed values are:
  241. - config
  242. - connections
  243. - dag
  244. - dagrun
  245. - dagstats
  246. - dataset
  247. - eventlog
  248. - importerror
  249. - monitoring
  250. - plugin
  251. - pool
  252. - provider
  253. - taskinstance
  254. - variable
  255. - xcom
  256. ### Read-Only Mode
  257. You can run the server in read-only mode by using the `--read-only` flag or by setting the `READ_ONLY=true` environment variable. This will only expose tools that perform read operations (GET requests) and exclude any tools that create, update, or delete resources.
  258. Using the command-line flag:
  259. ```bash
  260. uv run mcp-server-apache-airflow --read-only
  261. ```
  262. Using the environment variable:
  263. ```bash
  264. READ_ONLY=true uv run mcp-server-apache-airflow
  265. ```
  266. In read-only mode, the server will only expose tools like:
  267. - Listing DAGs, DAG runs, tasks, variables, connections, etc.
  268. - Getting details of specific resources
  269. - Reading configurations and monitoring information
  270. - Testing connections (non-destructive)
  271. Write operations like creating, updating, deleting DAGs, variables, connections, triggering DAG runs, etc. will not be available in read-only mode.
  272. You can combine read-only mode with API group selection:
  273. ```bash
  274. uv run mcp-server-apache-airflow --read-only --apis dag --apis variable
  275. ```
  276. ### Manual Execution
  277. You can also run the server manually:
  278. ```bash
  279. make run
  280. ```
  281. `make run` accepts following options:
  282. Options:
  283. - `--port`: Port to listen on for SSE (default: 8000)
  284. - `--transport`: Transport type (stdio/sse/http, default: stdio)
  285. Or, you could run the sse server directly, which accepts same parameters:
  286. ```bash
  287. make run-sse
  288. ```
  289. Also, you could start service directly using `uv` like in the following command:
  290. ```bash
  291. uv run src --transport http --port 8080
  292. ```
  293. ### Installing via Smithery
  294. To install Apache Airflow MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@yangkyeongmo/mcp-server-apache-airflow):
  295. ```bash
  296. npx -y @smithery/cli install @yangkyeongmo/mcp-server-apache-airflow --client claude
  297. ```
  298. ## Development
  299. ### Setting up Development Environment
  300. 1. Clone the repository:
  301. ```bash
  302. git clone https://github.com/yangkyeongmo/mcp-server-apache-airflow.git
  303. cd mcp-server-apache-airflow
  304. ```
  305. 2. Install development dependencies:
  306. ```bash
  307. uv sync --dev
  308. ```
  309. 3. Create a `.env` file for environment variables (optional for development):
  310. ```bash
  311. touch .env
  312. ```
  313. > **Note**: No environment variables are required for running tests. The `AIRFLOW_HOST` defaults to `http://localhost:8080` for development and testing purposes.
  314. ### Running Tests
  315. ```bash
  316. # Unit tests plus OpenAPI contract tests (no live Airflow)
  317. make test
  318. # Contract tests only
  319. make test-contract
  320. # Live Airflow integration tests (needs Docker; see CONTRIBUTING.md)
  321. make airflow-up
  322. make test-integration
  323. make airflow-down
  324. ```
  325. ### Code Quality
  326. ```bash
  327. # Check formatting and lint (CI mode: no --fix)
  328. make lint
  329. # Apply ruff fixes and formatting
  330. make lint-fix
  331. # Typecheck
  332. make typecheck
  333. ```
  334. ### Continuous Integration
  335. GitHub Actions (`.github/workflows/ci.yml`) runs on every push and pull request to `main`:
  336. - `lint` — ruff format `--check` and ruff check (no `--fix`)
  337. - `typecheck` — mypy
  338. - `test (3.10|3.11|3.12)` — unit + contract tests
  339. - `contract` — Airflow 2.10.5 stable REST OpenAPI contract tests
  340. - `integration (2.10.5)` — live tool calls against docker-compose Airflow 2.x
  341. - `integration (3.4.0)` — skipped / allowed-failure until `apache-airflow-client` supports 3.x
  342. - `factory-gate` — aggregator for the required checks
  343. See [CONTRIBUTING.md](CONTRIBUTING.md) for the issue → draft PR → required checks → human merge flow.
  344. ## Contributing
  345. Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) and open a draft PR.
  346. Releases are cut from `vX.Y.Z` tags using PyPI trusted publishing. See [RELEASING.md](RELEASING.md).
  347. ## License
  348. [MIT License](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.