mcp-server-apache-airflow 0.2.2__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. mcp_server_apache_airflow-0.2.4/PKG-INFO +258 -0
  2. mcp_server_apache_airflow-0.2.4/README.md +229 -0
  3. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/pyproject.toml +2 -2
  4. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/airflow_client.py +9 -2
  5. mcp_server_apache_airflow-0.2.4/src/envs.py +7 -0
  6. mcp_server_apache_airflow-0.2.2/PKG-INFO +0 -238
  7. mcp_server_apache_airflow-0.2.2/README.md +0 -209
  8. mcp_server_apache_airflow-0.2.2/src/envs.py +0 -5
  9. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/.gitignore +0 -0
  10. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/LICENSE +0 -0
  11. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/__init__.py +0 -0
  12. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/__main__.py +0 -0
  13. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/__init__.py +0 -0
  14. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/config.py +0 -0
  15. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/connection.py +0 -0
  16. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/dag.py +0 -0
  17. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/dagrun.py +0 -0
  18. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/dagstats.py +0 -0
  19. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/dataset.py +0 -0
  20. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/eventlog.py +0 -0
  21. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/importerror.py +0 -0
  22. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/monitoring.py +0 -0
  23. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/plugin.py +0 -0
  24. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/pool.py +0 -0
  25. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/provider.py +0 -0
  26. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/taskinstance.py +0 -0
  27. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/variable.py +0 -0
  28. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/airflow/xcom.py +0 -0
  29. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/enums.py +0 -0
  30. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/main.py +0 -0
  31. {mcp_server_apache_airflow-0.2.2 → mcp_server_apache_airflow-0.2.4}/src/server.py +0 -0
@@ -0,0 +1,258 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-server-apache-airflow
3
+ Version: 0.2.4
4
+ Summary: Model Context Protocol (MCP) server for Apache Airflow
5
+ Project-URL: Homepage, https://github.com/yangkyeongmo/mcp-server-apache-airflow
6
+ Project-URL: Repository, https://github.com/yangkyeongmo/mcp-server-apache-airflow.git
7
+ Project-URL: Bug Tracker, https://github.com/yangkyeongmo/mcp-server-apache-airflow/issues
8
+ Author-email: Gyeongmo Yang <me@gmyang.dev>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: airflow,apache-airflow,mcp,model-context-protocol
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: apache-airflow-client<3,>=2.7.0
22
+ Requires-Dist: click>=8.1.7
23
+ Requires-Dist: httpx>=0.24.1
24
+ Requires-Dist: mcp>=0.1.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: build>=1.2.2.post1; extra == 'dev'
27
+ Requires-Dist: twine>=6.1.0; extra == 'dev'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # mcp-server-apache-airflow
31
+
32
+ [![smithery badge](https://smithery.ai/badge/@yangkyeongmo/mcp-server-apache-airflow)](https://smithery.ai/server/@yangkyeongmo/mcp-server-apache-airflow)
33
+
34
+ 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.
35
+
36
+ <a href="https://glama.ai/mcp/servers/e99b6vx9lw">
37
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/e99b6vx9lw/badge" alt="Server for Apache Airflow MCP server" />
38
+ </a>
39
+
40
+ ## About
41
+
42
+ 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.
43
+
44
+ ## Feature Implementation Status
45
+
46
+ | Feature | API Path | Status |
47
+ | -------------------------------- | --------------------------------------------------------------------------------------------- | ------ |
48
+ | **DAG Management** | | |
49
+ | List DAGs | `/api/v1/dags` | ✅ |
50
+ | Get DAG Details | `/api/v1/dags/{dag_id}` | ✅ |
51
+ | Pause DAG | `/api/v1/dags/{dag_id}` | ✅ |
52
+ | Unpause DAG | `/api/v1/dags/{dag_id}` | ✅ |
53
+ | Update DAG | `/api/v1/dags/{dag_id}` | ✅ |
54
+ | Delete DAG | `/api/v1/dags/{dag_id}` | ✅ |
55
+ | Get DAG Source | `/api/v1/dagSources/{file_token}` | ✅ |
56
+ | Patch Multiple DAGs | `/api/v1/dags` | ✅ |
57
+ | Reparse DAG File | `/api/v1/dagSources/{file_token}/reparse` | ✅ |
58
+ | **DAG Runs** | | |
59
+ | List DAG Runs | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
60
+ | Create DAG Run | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
61
+ | Get DAG Run Details | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
62
+ | Update DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
63
+ | Delete DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
64
+ | Get DAG Runs Batch | `/api/v1/dags/~/dagRuns/list` | ✅ |
65
+ | Clear DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear` | ✅ |
66
+ | Set DAG Run Note | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/setNote` | ✅ |
67
+ | Get Upstream Dataset Events | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents` | ✅ |
68
+ | **Tasks** | | |
69
+ | List DAG Tasks | `/api/v1/dags/{dag_id}/tasks` | ✅ |
70
+ | Get Task Details | `/api/v1/dags/{dag_id}/tasks/{task_id}` | ✅ |
71
+ | Get Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
72
+ | List Task Instances | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances` | ✅ |
73
+ | Update Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
74
+ | Clear Task Instances | `/api/v1/dags/{dag_id}/clearTaskInstances` | ✅ |
75
+ | Set Task Instances State | `/api/v1/dags/{dag_id}/updateTaskInstancesState` | ✅ |
76
+ | **Variables** | | |
77
+ | List Variables | `/api/v1/variables` | ✅ |
78
+ | Create Variable | `/api/v1/variables` | ✅ |
79
+ | Get Variable | `/api/v1/variables/{variable_key}` | ✅ |
80
+ | Update Variable | `/api/v1/variables/{variable_key}` | ✅ |
81
+ | Delete Variable | `/api/v1/variables/{variable_key}` | ✅ |
82
+ | **Connections** | | |
83
+ | List Connections | `/api/v1/connections` | ✅ |
84
+ | Create Connection | `/api/v1/connections` | ✅ |
85
+ | Get Connection | `/api/v1/connections/{connection_id}` | ✅ |
86
+ | Update Connection | `/api/v1/connections/{connection_id}` | ✅ |
87
+ | Delete Connection | `/api/v1/connections/{connection_id}` | ✅ |
88
+ | Test Connection | `/api/v1/connections/test` | ✅ |
89
+ | **Pools** | | |
90
+ | List Pools | `/api/v1/pools` | ✅ |
91
+ | Create Pool | `/api/v1/pools` | ✅ |
92
+ | Get Pool | `/api/v1/pools/{pool_name}` | ✅ |
93
+ | Update Pool | `/api/v1/pools/{pool_name}` | ✅ |
94
+ | Delete Pool | `/api/v1/pools/{pool_name}` | ✅ |
95
+ | **XComs** | | |
96
+ | List XComs | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries` | ✅ |
97
+ | Get XCom Entry | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}` | ✅ |
98
+ | **Datasets** | | |
99
+ | List Datasets | `/api/v1/datasets` | ✅ |
100
+ | Get Dataset | `/api/v1/datasets/{uri}` | ✅ |
101
+ | Get Dataset Events | `/api/v1/datasetEvents` | ✅ |
102
+ | Create Dataset Event | `/api/v1/datasetEvents` | ✅ |
103
+ | Get DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
104
+ | Get DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
105
+ | Delete DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
106
+ | Delete DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
107
+ | Get Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
108
+ | Delete Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
109
+ | **Monitoring** | | |
110
+ | Get Health | `/api/v1/health` | ✅ |
111
+ | **DAG Stats** | | |
112
+ | Get DAG Stats | `/api/v1/dags/statistics` | ✅ |
113
+ | **Config** | | |
114
+ | Get Config | `/api/v1/config` | ✅ |
115
+ | **Plugins** | | |
116
+ | Get Plugins | `/api/v1/plugins` | ✅ |
117
+ | **Providers** | | |
118
+ | List Providers | `/api/v1/providers` | ✅ |
119
+ | **Event Logs** | | |
120
+ | List Event Logs | `/api/v1/eventLogs` | ✅ |
121
+ | Get Event Log | `/api/v1/eventLogs/{event_log_id}` | ✅ |
122
+ | **System** | | |
123
+ | Get Import Errors | `/api/v1/importErrors` | ✅ |
124
+ | Get Import Error Details | `/api/v1/importErrors/{import_error_id}` | ✅ |
125
+ | Get Health Status | `/api/v1/health` | ✅ |
126
+ | Get Version | `/api/v1/version` | ✅ |
127
+
128
+ ## Setup
129
+
130
+ ### Dependencies
131
+
132
+ This project depends on the official Apache Airflow client library (`apache-airflow-client`). It will be automatically installed when you install this package.
133
+
134
+ ### Environment Variables
135
+
136
+ Set the following environment variables:
137
+
138
+ ```
139
+ AIRFLOW_HOST=<your-airflow-host>
140
+ AIRFLOW_USERNAME=<your-airflow-username>
141
+ AIRFLOW_PASSWORD=<your-airflow-password>
142
+ AIRFLOW_API_VERSION=v1 # Optional, defaults to v1
143
+ ```
144
+
145
+ ### Usage with Claude Desktop
146
+
147
+ Add to your `claude_desktop_config.json`:
148
+
149
+ ```json
150
+ {
151
+ "mcpServers": {
152
+ "mcp-server-apache-airflow": {
153
+ "command": "uvx",
154
+ "args": ["mcp-server-apache-airflow"],
155
+ "env": {
156
+ "AIRFLOW_HOST": "https://your-airflow-host",
157
+ "AIRFLOW_USERNAME": "your-username",
158
+ "AIRFLOW_PASSWORD": "your-password"
159
+ }
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ Alternative configuration using `uv`:
166
+
167
+ ```json
168
+ {
169
+ "mcpServers": {
170
+ "mcp-server-apache-airflow": {
171
+ "command": "uv",
172
+ "args": [
173
+ "--directory",
174
+ "/path/to/mcp-server-apache-airflow",
175
+ "run",
176
+ "mcp-server-apache-airflow"
177
+ ],
178
+ "env": {
179
+ "AIRFLOW_HOST": "https://your-airflow-host",
180
+ "AIRFLOW_USERNAME": "your-username",
181
+ "AIRFLOW_PASSWORD": "your-password"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ ```
187
+
188
+ Replace `/path/to/mcp-server-apache-airflow` with the actual path where you've cloned the repository.
189
+
190
+ ### Selecting the API groups
191
+
192
+ You can select the API groups you want to use by setting the `--apis` flag.
193
+
194
+ ```bash
195
+ uv run mcp-server-apache-airflow --apis "dag,dagrun"
196
+ ```
197
+
198
+ The default is to use all APIs.
199
+
200
+ Allowed values are:
201
+
202
+ - config
203
+ - connections
204
+ - dag
205
+ - dagrun
206
+ - dagstats
207
+ - dataset
208
+ - eventlog
209
+ - importerror
210
+ - monitoring
211
+ - plugin
212
+ - pool
213
+ - provider
214
+ - taskinstance
215
+ - variable
216
+ - xcom
217
+
218
+ ### Manual Execution
219
+
220
+ You can also run the server manually:
221
+
222
+ ```bash
223
+ make run
224
+ ```
225
+
226
+ `make run` accepts following options:
227
+
228
+ Options:
229
+
230
+ - `--port`: Port to listen on for SSE (default: 8000)
231
+ - `--transport`: Transport type (stdio/sse, default: stdio)
232
+
233
+ Or, you could run the sse server directly, which accepts same parameters:
234
+
235
+ ```bash
236
+ make run-sse
237
+ ```
238
+
239
+ ### Installing via Smithery
240
+
241
+ To install Apache Airflow MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@yangkyeongmo/mcp-server-apache-airflow):
242
+
243
+ ```bash
244
+ npx -y @smithery/cli install @yangkyeongmo/mcp-server-apache-airflow --client claude
245
+ ```
246
+
247
+ ## Contributing
248
+
249
+ Contributions are welcome! Please feel free to submit a Pull Request.
250
+
251
+ The package is deployed automatically to PyPI when project.version is updated in `pyproject.toml`.
252
+ Follow semver for versioning.
253
+
254
+ Please include version update in the PR in order to apply the changes to core logic.
255
+
256
+ ## License
257
+
258
+ [MIT License](LICENSE)
@@ -0,0 +1,229 @@
1
+ # mcp-server-apache-airflow
2
+
3
+ [![smithery badge](https://smithery.ai/badge/@yangkyeongmo/mcp-server-apache-airflow)](https://smithery.ai/server/@yangkyeongmo/mcp-server-apache-airflow)
4
+
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
+
7
+ <a href="https://glama.ai/mcp/servers/e99b6vx9lw">
8
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/e99b6vx9lw/badge" alt="Server for Apache Airflow MCP server" />
9
+ </a>
10
+
11
+ ## About
12
+
13
+ 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.
14
+
15
+ ## Feature Implementation Status
16
+
17
+ | Feature | API Path | Status |
18
+ | -------------------------------- | --------------------------------------------------------------------------------------------- | ------ |
19
+ | **DAG Management** | | |
20
+ | List DAGs | `/api/v1/dags` | ✅ |
21
+ | Get DAG Details | `/api/v1/dags/{dag_id}` | ✅ |
22
+ | Pause DAG | `/api/v1/dags/{dag_id}` | ✅ |
23
+ | Unpause DAG | `/api/v1/dags/{dag_id}` | ✅ |
24
+ | Update DAG | `/api/v1/dags/{dag_id}` | ✅ |
25
+ | Delete DAG | `/api/v1/dags/{dag_id}` | ✅ |
26
+ | Get DAG Source | `/api/v1/dagSources/{file_token}` | ✅ |
27
+ | Patch Multiple DAGs | `/api/v1/dags` | ✅ |
28
+ | Reparse DAG File | `/api/v1/dagSources/{file_token}/reparse` | ✅ |
29
+ | **DAG Runs** | | |
30
+ | List DAG Runs | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
31
+ | Create DAG Run | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
32
+ | Get DAG Run Details | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
33
+ | Update DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
34
+ | Delete DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
35
+ | Get DAG Runs Batch | `/api/v1/dags/~/dagRuns/list` | ✅ |
36
+ | Clear DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear` | ✅ |
37
+ | Set DAG Run Note | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/setNote` | ✅ |
38
+ | Get Upstream Dataset Events | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents` | ✅ |
39
+ | **Tasks** | | |
40
+ | List DAG Tasks | `/api/v1/dags/{dag_id}/tasks` | ✅ |
41
+ | Get Task Details | `/api/v1/dags/{dag_id}/tasks/{task_id}` | ✅ |
42
+ | Get Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
43
+ | List Task Instances | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances` | ✅ |
44
+ | Update Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
45
+ | Clear Task Instances | `/api/v1/dags/{dag_id}/clearTaskInstances` | ✅ |
46
+ | Set Task Instances State | `/api/v1/dags/{dag_id}/updateTaskInstancesState` | ✅ |
47
+ | **Variables** | | |
48
+ | List Variables | `/api/v1/variables` | ✅ |
49
+ | Create Variable | `/api/v1/variables` | ✅ |
50
+ | Get Variable | `/api/v1/variables/{variable_key}` | ✅ |
51
+ | Update Variable | `/api/v1/variables/{variable_key}` | ✅ |
52
+ | Delete Variable | `/api/v1/variables/{variable_key}` | ✅ |
53
+ | **Connections** | | |
54
+ | List Connections | `/api/v1/connections` | ✅ |
55
+ | Create Connection | `/api/v1/connections` | ✅ |
56
+ | Get Connection | `/api/v1/connections/{connection_id}` | ✅ |
57
+ | Update Connection | `/api/v1/connections/{connection_id}` | ✅ |
58
+ | Delete Connection | `/api/v1/connections/{connection_id}` | ✅ |
59
+ | Test Connection | `/api/v1/connections/test` | ✅ |
60
+ | **Pools** | | |
61
+ | List Pools | `/api/v1/pools` | ✅ |
62
+ | Create Pool | `/api/v1/pools` | ✅ |
63
+ | Get Pool | `/api/v1/pools/{pool_name}` | ✅ |
64
+ | Update Pool | `/api/v1/pools/{pool_name}` | ✅ |
65
+ | Delete Pool | `/api/v1/pools/{pool_name}` | ✅ |
66
+ | **XComs** | | |
67
+ | List XComs | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries` | ✅ |
68
+ | Get XCom Entry | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}` | ✅ |
69
+ | **Datasets** | | |
70
+ | List Datasets | `/api/v1/datasets` | ✅ |
71
+ | Get Dataset | `/api/v1/datasets/{uri}` | ✅ |
72
+ | Get Dataset Events | `/api/v1/datasetEvents` | ✅ |
73
+ | Create Dataset Event | `/api/v1/datasetEvents` | ✅ |
74
+ | Get DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
75
+ | Get DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
76
+ | Delete DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
77
+ | Delete DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
78
+ | Get Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
79
+ | Delete Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
80
+ | **Monitoring** | | |
81
+ | Get Health | `/api/v1/health` | ✅ |
82
+ | **DAG Stats** | | |
83
+ | Get DAG Stats | `/api/v1/dags/statistics` | ✅ |
84
+ | **Config** | | |
85
+ | Get Config | `/api/v1/config` | ✅ |
86
+ | **Plugins** | | |
87
+ | Get Plugins | `/api/v1/plugins` | ✅ |
88
+ | **Providers** | | |
89
+ | List Providers | `/api/v1/providers` | ✅ |
90
+ | **Event Logs** | | |
91
+ | List Event Logs | `/api/v1/eventLogs` | ✅ |
92
+ | Get Event Log | `/api/v1/eventLogs/{event_log_id}` | ✅ |
93
+ | **System** | | |
94
+ | Get Import Errors | `/api/v1/importErrors` | ✅ |
95
+ | Get Import Error Details | `/api/v1/importErrors/{import_error_id}` | ✅ |
96
+ | Get Health Status | `/api/v1/health` | ✅ |
97
+ | Get Version | `/api/v1/version` | ✅ |
98
+
99
+ ## Setup
100
+
101
+ ### Dependencies
102
+
103
+ This project depends on the official Apache Airflow client library (`apache-airflow-client`). It will be automatically installed when you install this package.
104
+
105
+ ### Environment Variables
106
+
107
+ Set the following environment variables:
108
+
109
+ ```
110
+ AIRFLOW_HOST=<your-airflow-host>
111
+ AIRFLOW_USERNAME=<your-airflow-username>
112
+ AIRFLOW_PASSWORD=<your-airflow-password>
113
+ AIRFLOW_API_VERSION=v1 # Optional, defaults to v1
114
+ ```
115
+
116
+ ### Usage with Claude Desktop
117
+
118
+ Add to your `claude_desktop_config.json`:
119
+
120
+ ```json
121
+ {
122
+ "mcpServers": {
123
+ "mcp-server-apache-airflow": {
124
+ "command": "uvx",
125
+ "args": ["mcp-server-apache-airflow"],
126
+ "env": {
127
+ "AIRFLOW_HOST": "https://your-airflow-host",
128
+ "AIRFLOW_USERNAME": "your-username",
129
+ "AIRFLOW_PASSWORD": "your-password"
130
+ }
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+ Alternative configuration using `uv`:
137
+
138
+ ```json
139
+ {
140
+ "mcpServers": {
141
+ "mcp-server-apache-airflow": {
142
+ "command": "uv",
143
+ "args": [
144
+ "--directory",
145
+ "/path/to/mcp-server-apache-airflow",
146
+ "run",
147
+ "mcp-server-apache-airflow"
148
+ ],
149
+ "env": {
150
+ "AIRFLOW_HOST": "https://your-airflow-host",
151
+ "AIRFLOW_USERNAME": "your-username",
152
+ "AIRFLOW_PASSWORD": "your-password"
153
+ }
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ Replace `/path/to/mcp-server-apache-airflow` with the actual path where you've cloned the repository.
160
+
161
+ ### Selecting the API groups
162
+
163
+ You can select the API groups you want to use by setting the `--apis` flag.
164
+
165
+ ```bash
166
+ uv run mcp-server-apache-airflow --apis "dag,dagrun"
167
+ ```
168
+
169
+ The default is to use all APIs.
170
+
171
+ Allowed values are:
172
+
173
+ - config
174
+ - connections
175
+ - dag
176
+ - dagrun
177
+ - dagstats
178
+ - dataset
179
+ - eventlog
180
+ - importerror
181
+ - monitoring
182
+ - plugin
183
+ - pool
184
+ - provider
185
+ - taskinstance
186
+ - variable
187
+ - xcom
188
+
189
+ ### Manual Execution
190
+
191
+ You can also run the server manually:
192
+
193
+ ```bash
194
+ make run
195
+ ```
196
+
197
+ `make run` accepts following options:
198
+
199
+ Options:
200
+
201
+ - `--port`: Port to listen on for SSE (default: 8000)
202
+ - `--transport`: Transport type (stdio/sse, default: stdio)
203
+
204
+ Or, you could run the sse server directly, which accepts same parameters:
205
+
206
+ ```bash
207
+ make run-sse
208
+ ```
209
+
210
+ ### Installing via Smithery
211
+
212
+ To install Apache Airflow MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@yangkyeongmo/mcp-server-apache-airflow):
213
+
214
+ ```bash
215
+ npx -y @smithery/cli install @yangkyeongmo/mcp-server-apache-airflow --client claude
216
+ ```
217
+
218
+ ## Contributing
219
+
220
+ Contributions are welcome! Please feel free to submit a Pull Request.
221
+
222
+ The package is deployed automatically to PyPI when project.version is updated in `pyproject.toml`.
223
+ Follow semver for versioning.
224
+
225
+ Please include version update in the PR in order to apply the changes to core logic.
226
+
227
+ ## License
228
+
229
+ [MIT License](LICENSE)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp-server-apache-airflow"
3
- version = "0.2.2"
3
+ version = "0.2.4"
4
4
  description = "Model Context Protocol (MCP) server for Apache Airflow"
5
5
  authors = [
6
6
  { name = "Gyeongmo Yang", email = "me@gmyang.dev" }
@@ -9,7 +9,7 @@ dependencies = [
9
9
  "httpx>=0.24.1",
10
10
  "click>=8.1.7",
11
11
  "mcp>=0.1.0",
12
- "apache-airflow-client>=2.7.0",
12
+ "apache-airflow-client>=2.7.0,<3",
13
13
  ]
14
14
  requires-python = ">=3.10"
15
15
  readme = "README.md"
@@ -1,10 +1,17 @@
1
+ from urllib.parse import urljoin
2
+
1
3
  from airflow_client.client import ApiClient, Configuration
2
4
 
3
- from src.envs import AIRFLOW_HOST, AIRFLOW_PASSWORD, AIRFLOW_USERNAME
5
+ from src.envs import (
6
+ AIRFLOW_API_VERSION,
7
+ AIRFLOW_HOST,
8
+ AIRFLOW_PASSWORD,
9
+ AIRFLOW_USERNAME,
10
+ )
4
11
 
5
12
  # Create a configuration and API client
6
13
  configuration = Configuration(
7
- host=AIRFLOW_HOST,
14
+ host=urljoin(AIRFLOW_HOST, f"/api/{AIRFLOW_API_VERSION}"),
8
15
  username=AIRFLOW_USERNAME,
9
16
  password=AIRFLOW_PASSWORD,
10
17
  )
@@ -0,0 +1,7 @@
1
+ import os
2
+ from urllib.parse import urlparse
3
+
4
+ AIRFLOW_HOST = urlparse(os.getenv("AIRFLOW_HOST"))._replace(path="").geturl().rstrip("/")
5
+ AIRFLOW_USERNAME = os.getenv("AIRFLOW_USERNAME")
6
+ AIRFLOW_PASSWORD = os.getenv("AIRFLOW_PASSWORD")
7
+ AIRFLOW_API_VERSION = os.getenv("AIRFLOW_API_VERSION", "v1")
@@ -1,238 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: mcp-server-apache-airflow
3
- Version: 0.2.2
4
- Summary: Model Context Protocol (MCP) server for Apache Airflow
5
- Project-URL: Homepage, https://github.com/yangkyeongmo/mcp-server-apache-airflow
6
- Project-URL: Repository, https://github.com/yangkyeongmo/mcp-server-apache-airflow.git
7
- Project-URL: Bug Tracker, https://github.com/yangkyeongmo/mcp-server-apache-airflow/issues
8
- Author-email: Gyeongmo Yang <me@gmyang.dev>
9
- License: MIT
10
- License-File: LICENSE
11
- Keywords: airflow,apache-airflow,mcp,model-context-protocol
12
- Classifier: Development Status :: 3 - Alpha
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
- Requires-Python: >=3.10
21
- Requires-Dist: apache-airflow-client>=2.7.0
22
- Requires-Dist: click>=8.1.7
23
- Requires-Dist: httpx>=0.24.1
24
- Requires-Dist: mcp>=0.1.0
25
- Provides-Extra: dev
26
- Requires-Dist: build>=1.2.2.post1; extra == 'dev'
27
- Requires-Dist: twine>=6.1.0; extra == 'dev'
28
- Description-Content-Type: text/markdown
29
-
30
- # mcp-server-apache-airflow
31
-
32
- 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.
33
-
34
- <a href="https://glama.ai/mcp/servers/e99b6vx9lw">
35
- <img width="380" height="200" src="https://glama.ai/mcp/servers/e99b6vx9lw/badge" alt="Server for Apache Airflow MCP server" />
36
- </a>
37
-
38
- ## About
39
-
40
- 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.
41
-
42
- ## Feature Implementation Status
43
-
44
- | Feature | API Path | Status |
45
- |---------|----------|--------|
46
- | **DAG Management** | | |
47
- | List DAGs | `/api/v1/dags` | ✅ |
48
- | Get DAG Details | `/api/v1/dags/{dag_id}` | ✅ |
49
- | Pause DAG | `/api/v1/dags/{dag_id}` | ✅ |
50
- | Unpause DAG | `/api/v1/dags/{dag_id}` | ✅ |
51
- | Update DAG | `/api/v1/dags/{dag_id}` | ✅ |
52
- | Delete DAG | `/api/v1/dags/{dag_id}` | ✅ |
53
- | Get DAG Source | `/api/v1/dagSources/{file_token}` | ✅ |
54
- | Patch Multiple DAGs | `/api/v1/dags` | ✅ |
55
- | Reparse DAG File | `/api/v1/dagSources/{file_token}/reparse` | ✅ |
56
- | **DAG Runs** | | |
57
- | List DAG Runs | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
58
- | Create DAG Run | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
59
- | Get DAG Run Details | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
60
- | Update DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
61
- | Delete DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
62
- | Get DAG Runs Batch | `/api/v1/dags/~/dagRuns/list` | ✅ |
63
- | Clear DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear` | ✅ |
64
- | Set DAG Run Note | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/setNote` | ✅ |
65
- | Get Upstream Dataset Events | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents` | ✅ |
66
- | **Tasks** | | |
67
- | List DAG Tasks | `/api/v1/dags/{dag_id}/tasks` | ✅ |
68
- | Get Task Details | `/api/v1/dags/{dag_id}/tasks/{task_id}` | ✅ |
69
- | Get Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
70
- | List Task Instances | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances` | ✅ |
71
- | Update Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
72
- | Clear Task Instances | `/api/v1/dags/{dag_id}/clearTaskInstances` | ✅ |
73
- | Set Task Instances State | `/api/v1/dags/{dag_id}/updateTaskInstancesState` | ✅ |
74
- | **Variables** | | |
75
- | List Variables | `/api/v1/variables` | ✅ |
76
- | Create Variable | `/api/v1/variables` | ✅ |
77
- | Get Variable | `/api/v1/variables/{variable_key}` | ✅ |
78
- | Update Variable | `/api/v1/variables/{variable_key}` | ✅ |
79
- | Delete Variable | `/api/v1/variables/{variable_key}` | ✅ |
80
- | **Connections** | | |
81
- | List Connections | `/api/v1/connections` | ✅ |
82
- | Create Connection | `/api/v1/connections` | ✅ |
83
- | Get Connection | `/api/v1/connections/{connection_id}` | ✅ |
84
- | Update Connection | `/api/v1/connections/{connection_id}` | ✅ |
85
- | Delete Connection | `/api/v1/connections/{connection_id}` | ✅ |
86
- | Test Connection | `/api/v1/connections/test` | ✅ |
87
- | **Pools** | | |
88
- | List Pools | `/api/v1/pools` | ✅ |
89
- | Create Pool | `/api/v1/pools` | ✅ |
90
- | Get Pool | `/api/v1/pools/{pool_name}` | ✅ |
91
- | Update Pool | `/api/v1/pools/{pool_name}` | ✅ |
92
- | Delete Pool | `/api/v1/pools/{pool_name}` | ✅ |
93
- | **XComs** | | |
94
- | List XComs | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries` | ✅ |
95
- | Get XCom Entry | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}` | ✅ |
96
- | **Datasets** | | |
97
- | List Datasets | `/api/v1/datasets` | ✅ |
98
- | Get Dataset | `/api/v1/datasets/{uri}` | ✅ |
99
- | Get Dataset Events | `/api/v1/datasetEvents` | ✅ |
100
- | Create Dataset Event | `/api/v1/datasetEvents` | ✅ |
101
- | Get DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
102
- | Get DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
103
- | Delete DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
104
- | Delete DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
105
- | Get Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
106
- | Delete Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
107
- | **Monitoring** | | |
108
- | Get Health | `/api/v1/health` | ✅ |
109
- | **DAG Stats** | | |
110
- | Get DAG Stats | `/api/v1/dags/statistics` | ✅ |
111
- | **Config** | | |
112
- | Get Config | `/api/v1/config` | ✅ |
113
- | **Plugins** | | |
114
- | Get Plugins | `/api/v1/plugins` | ✅ |
115
- | **Providers** | | |
116
- | List Providers | `/api/v1/providers` | ✅ |
117
- | **Event Logs** | | |
118
- | List Event Logs | `/api/v1/eventLogs` | ✅ |
119
- | Get Event Log | `/api/v1/eventLogs/{event_log_id}` | ✅ |
120
- | **System** | | |
121
- | Get Import Errors | `/api/v1/importErrors` | ✅ |
122
- | Get Import Error Details | `/api/v1/importErrors/{import_error_id}` | ✅ |
123
- | Get Health Status | `/api/v1/health` | ✅ |
124
- | Get Version | `/api/v1/version` | ✅ |
125
-
126
- ## Setup
127
-
128
- ### Dependencies
129
-
130
- This project depends on the official Apache Airflow client library (`apache-airflow-client`). It will be automatically installed when you install this package.
131
-
132
- ### Environment Variables
133
-
134
- Set the following environment variables:
135
- ```
136
- AIRFLOW_HOST=<your-airflow-host>
137
- AIRFLOW_USERNAME=<your-airflow-username>
138
- AIRFLOW_PASSWORD=<your-airflow-password>
139
- ```
140
-
141
- ### Usage with Claude Desktop
142
-
143
- Add to your `claude_desktop_config.json`:
144
-
145
- ```json
146
- {
147
- "mcpServers": {
148
- "mcp-server-apache-airflow": {
149
- "command": "uvx",
150
- "args": ["mcp-server-apache-airflow"],
151
- "env": {
152
- "AIRFLOW_HOST": "https://your-airflow-host",
153
- "AIRFLOW_USERNAME": "your-username",
154
- "AIRFLOW_PASSWORD": "your-password"
155
- }
156
- }
157
- }
158
- }
159
- ```
160
-
161
- Alternative configuration using `uv`:
162
-
163
- ```json
164
- {
165
- "mcpServers": {
166
- "mcp-server-apache-airflow": {
167
- "command": "uv",
168
- "args": [
169
- "--directory",
170
- "/path/to/mcp-server-apache-airflow",
171
- "run",
172
- "mcp-server-apache-airflow"
173
- ],
174
- "env": {
175
- "AIRFLOW_HOST": "https://your-airflow-host",
176
- "AIRFLOW_USERNAME": "your-username",
177
- "AIRFLOW_PASSWORD": "your-password"
178
- }
179
- }
180
- }
181
- }
182
- ```
183
-
184
- Replace `/path/to/mcp-server-apache-airflow` with the actual path where you've cloned the repository.
185
-
186
- ### Selecting the API groups
187
-
188
- You can select the API groups you want to use by setting the `--apis` flag.
189
-
190
- ```bash
191
- uv run mcp-server-apache-airflow --apis "dag,dagrun"
192
- ```
193
-
194
- The default is to use all APIs.
195
-
196
- Allowed values are:
197
-
198
- - config
199
- - connections
200
- - dag
201
- - dagrun
202
- - dagstats
203
- - dataset
204
- - eventlog
205
- - importerror
206
- - monitoring
207
- - plugin
208
- - pool
209
- - provider
210
- - taskinstance
211
- - variable
212
- - xcom
213
-
214
- ### Manual Execution
215
-
216
- You can also run the server manually:
217
- ```bash
218
- make run
219
- ```
220
-
221
- `make run` accepts following options:
222
-
223
- Options:
224
- - `--port`: Port to listen on for SSE (default: 8000)
225
- - `--transport`: Transport type (stdio/sse, default: stdio)
226
-
227
- Or, you could run the sse server directly, which accepts same parameters:
228
- ```bash
229
- make run-sse
230
- ```
231
-
232
- ## Contributing
233
-
234
- Contributions are welcome! Please feel free to submit a Pull Request.
235
-
236
- ## License
237
-
238
- [MIT License](LICENSE)
@@ -1,209 +0,0 @@
1
- # mcp-server-apache-airflow
2
-
3
- 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.
4
-
5
- <a href="https://glama.ai/mcp/servers/e99b6vx9lw">
6
- <img width="380" height="200" src="https://glama.ai/mcp/servers/e99b6vx9lw/badge" alt="Server for Apache Airflow MCP server" />
7
- </a>
8
-
9
- ## About
10
-
11
- 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.
12
-
13
- ## Feature Implementation Status
14
-
15
- | Feature | API Path | Status |
16
- |---------|----------|--------|
17
- | **DAG Management** | | |
18
- | List DAGs | `/api/v1/dags` | ✅ |
19
- | Get DAG Details | `/api/v1/dags/{dag_id}` | ✅ |
20
- | Pause DAG | `/api/v1/dags/{dag_id}` | ✅ |
21
- | Unpause DAG | `/api/v1/dags/{dag_id}` | ✅ |
22
- | Update DAG | `/api/v1/dags/{dag_id}` | ✅ |
23
- | Delete DAG | `/api/v1/dags/{dag_id}` | ✅ |
24
- | Get DAG Source | `/api/v1/dagSources/{file_token}` | ✅ |
25
- | Patch Multiple DAGs | `/api/v1/dags` | ✅ |
26
- | Reparse DAG File | `/api/v1/dagSources/{file_token}/reparse` | ✅ |
27
- | **DAG Runs** | | |
28
- | List DAG Runs | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
29
- | Create DAG Run | `/api/v1/dags/{dag_id}/dagRuns` | ✅ |
30
- | Get DAG Run Details | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
31
- | Update DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
32
- | Delete DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}` | ✅ |
33
- | Get DAG Runs Batch | `/api/v1/dags/~/dagRuns/list` | ✅ |
34
- | Clear DAG Run | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear` | ✅ |
35
- | Set DAG Run Note | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/setNote` | ✅ |
36
- | Get Upstream Dataset Events | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents` | ✅ |
37
- | **Tasks** | | |
38
- | List DAG Tasks | `/api/v1/dags/{dag_id}/tasks` | ✅ |
39
- | Get Task Details | `/api/v1/dags/{dag_id}/tasks/{task_id}` | ✅ |
40
- | Get Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
41
- | List Task Instances | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances` | ✅ |
42
- | Update Task Instance | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}` | ✅ |
43
- | Clear Task Instances | `/api/v1/dags/{dag_id}/clearTaskInstances` | ✅ |
44
- | Set Task Instances State | `/api/v1/dags/{dag_id}/updateTaskInstancesState` | ✅ |
45
- | **Variables** | | |
46
- | List Variables | `/api/v1/variables` | ✅ |
47
- | Create Variable | `/api/v1/variables` | ✅ |
48
- | Get Variable | `/api/v1/variables/{variable_key}` | ✅ |
49
- | Update Variable | `/api/v1/variables/{variable_key}` | ✅ |
50
- | Delete Variable | `/api/v1/variables/{variable_key}` | ✅ |
51
- | **Connections** | | |
52
- | List Connections | `/api/v1/connections` | ✅ |
53
- | Create Connection | `/api/v1/connections` | ✅ |
54
- | Get Connection | `/api/v1/connections/{connection_id}` | ✅ |
55
- | Update Connection | `/api/v1/connections/{connection_id}` | ✅ |
56
- | Delete Connection | `/api/v1/connections/{connection_id}` | ✅ |
57
- | Test Connection | `/api/v1/connections/test` | ✅ |
58
- | **Pools** | | |
59
- | List Pools | `/api/v1/pools` | ✅ |
60
- | Create Pool | `/api/v1/pools` | ✅ |
61
- | Get Pool | `/api/v1/pools/{pool_name}` | ✅ |
62
- | Update Pool | `/api/v1/pools/{pool_name}` | ✅ |
63
- | Delete Pool | `/api/v1/pools/{pool_name}` | ✅ |
64
- | **XComs** | | |
65
- | List XComs | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries` | ✅ |
66
- | Get XCom Entry | `/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}` | ✅ |
67
- | **Datasets** | | |
68
- | List Datasets | `/api/v1/datasets` | ✅ |
69
- | Get Dataset | `/api/v1/datasets/{uri}` | ✅ |
70
- | Get Dataset Events | `/api/v1/datasetEvents` | ✅ |
71
- | Create Dataset Event | `/api/v1/datasetEvents` | ✅ |
72
- | Get DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
73
- | Get DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
74
- | Delete DAG Dataset Queued Event | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri}` | ✅ |
75
- | Delete DAG Dataset Queued Events | `/api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents` | ✅ |
76
- | Get Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
77
- | Delete Dataset Queued Events | `/api/v1/datasets/{uri}/dagRuns/queued/datasetEvents` | ✅ |
78
- | **Monitoring** | | |
79
- | Get Health | `/api/v1/health` | ✅ |
80
- | **DAG Stats** | | |
81
- | Get DAG Stats | `/api/v1/dags/statistics` | ✅ |
82
- | **Config** | | |
83
- | Get Config | `/api/v1/config` | ✅ |
84
- | **Plugins** | | |
85
- | Get Plugins | `/api/v1/plugins` | ✅ |
86
- | **Providers** | | |
87
- | List Providers | `/api/v1/providers` | ✅ |
88
- | **Event Logs** | | |
89
- | List Event Logs | `/api/v1/eventLogs` | ✅ |
90
- | Get Event Log | `/api/v1/eventLogs/{event_log_id}` | ✅ |
91
- | **System** | | |
92
- | Get Import Errors | `/api/v1/importErrors` | ✅ |
93
- | Get Import Error Details | `/api/v1/importErrors/{import_error_id}` | ✅ |
94
- | Get Health Status | `/api/v1/health` | ✅ |
95
- | Get Version | `/api/v1/version` | ✅ |
96
-
97
- ## Setup
98
-
99
- ### Dependencies
100
-
101
- This project depends on the official Apache Airflow client library (`apache-airflow-client`). It will be automatically installed when you install this package.
102
-
103
- ### Environment Variables
104
-
105
- Set the following environment variables:
106
- ```
107
- AIRFLOW_HOST=<your-airflow-host>
108
- AIRFLOW_USERNAME=<your-airflow-username>
109
- AIRFLOW_PASSWORD=<your-airflow-password>
110
- ```
111
-
112
- ### Usage with Claude Desktop
113
-
114
- Add to your `claude_desktop_config.json`:
115
-
116
- ```json
117
- {
118
- "mcpServers": {
119
- "mcp-server-apache-airflow": {
120
- "command": "uvx",
121
- "args": ["mcp-server-apache-airflow"],
122
- "env": {
123
- "AIRFLOW_HOST": "https://your-airflow-host",
124
- "AIRFLOW_USERNAME": "your-username",
125
- "AIRFLOW_PASSWORD": "your-password"
126
- }
127
- }
128
- }
129
- }
130
- ```
131
-
132
- Alternative configuration using `uv`:
133
-
134
- ```json
135
- {
136
- "mcpServers": {
137
- "mcp-server-apache-airflow": {
138
- "command": "uv",
139
- "args": [
140
- "--directory",
141
- "/path/to/mcp-server-apache-airflow",
142
- "run",
143
- "mcp-server-apache-airflow"
144
- ],
145
- "env": {
146
- "AIRFLOW_HOST": "https://your-airflow-host",
147
- "AIRFLOW_USERNAME": "your-username",
148
- "AIRFLOW_PASSWORD": "your-password"
149
- }
150
- }
151
- }
152
- }
153
- ```
154
-
155
- Replace `/path/to/mcp-server-apache-airflow` with the actual path where you've cloned the repository.
156
-
157
- ### Selecting the API groups
158
-
159
- You can select the API groups you want to use by setting the `--apis` flag.
160
-
161
- ```bash
162
- uv run mcp-server-apache-airflow --apis "dag,dagrun"
163
- ```
164
-
165
- The default is to use all APIs.
166
-
167
- Allowed values are:
168
-
169
- - config
170
- - connections
171
- - dag
172
- - dagrun
173
- - dagstats
174
- - dataset
175
- - eventlog
176
- - importerror
177
- - monitoring
178
- - plugin
179
- - pool
180
- - provider
181
- - taskinstance
182
- - variable
183
- - xcom
184
-
185
- ### Manual Execution
186
-
187
- You can also run the server manually:
188
- ```bash
189
- make run
190
- ```
191
-
192
- `make run` accepts following options:
193
-
194
- Options:
195
- - `--port`: Port to listen on for SSE (default: 8000)
196
- - `--transport`: Transport type (stdio/sse, default: stdio)
197
-
198
- Or, you could run the sse server directly, which accepts same parameters:
199
- ```bash
200
- make run-sse
201
- ```
202
-
203
- ## Contributing
204
-
205
- Contributions are welcome! Please feel free to submit a Pull Request.
206
-
207
- ## License
208
-
209
- [MIT License](LICENSE)
@@ -1,5 +0,0 @@
1
- import os
2
-
3
- AIRFLOW_HOST = os.getenv("AIRFLOW_HOST").rstrip("/")
4
- AIRFLOW_USERNAME = os.getenv("AIRFLOW_USERNAME")
5
- AIRFLOW_PASSWORD = os.getenv("AIRFLOW_PASSWORD")