You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+104-22
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ A Model Context Protocol (MCP) server implementation for Apache Airflow, enablin
8
8
9
9
## About
10
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.
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
12
13
13
## Feature Implementation Status
14
14
@@ -19,40 +19,87 @@ This project implements a [Model Context Protocol](https://modelcontextprotocol.
19
19
| Get DAG Details |`/api/v1/dags/{dag_id}`| ✅ |
20
20
| Pause DAG |`/api/v1/dags/{dag_id}`| ✅ |
21
21
| Unpause DAG |`/api/v1/dags/{dag_id}`| ✅ |
22
-
| Update DAG |`/api/v1/dags/{dag_id}`| ❌ |
23
-
| Delete 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`| ✅ |
24
27
|**DAG Runs**|||
25
28
| List DAG Runs |`/api/v1/dags/{dag_id}/dagRuns`| ✅ |
26
29
| 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 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`| ✅ |
30
37
|**Tasks**|||
31
38
| List DAG Tasks |`/api/v1/dags/{dag_id}/tasks`| ✅ |
32
-
| Get Task Details |`/api/v1/dags/{dag_id}/tasks/{task_id}`|❌|
39
+
| Get Task Details |`/api/v1/dags/{dag_id}/tasks/{task_id}`|✅|
33
40
| Get Task Instance |`/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}`| ✅ |
34
41
| List Task Instances |`/api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances`| ✅ |
This project depends on the official Apache Airflow client library (`apache-airflow-client`). It will be automatically installed when you install this package.
102
+
56
103
### Environment Variables
57
104
58
105
Set the following environment variables:
@@ -107,21 +154,56 @@ Alternative configuration using `uv`:
107
154
108
155
Replace `/path/to/mcp-server-apache-airflow` with the actual path where you've cloned the repository.
109
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
+
110
185
### Manual Execution
111
186
112
187
You can also run the server manually:
113
188
```bash
114
-
python src/server.py
189
+
make run
115
190
```
116
191
192
+
`make run` accepts following options:
193
+
117
194
Options:
118
195
-`--port`: Port to listen on for SSE (default: 8000)
119
196
-`--transport`: Transport type (stdio/sse, default: stdio)
120
197
198
+
Or, you could run the sse server directly, which accepts same parameters:
199
+
```bash
200
+
make run-sse
201
+
```
202
+
121
203
## Contributing
122
204
123
205
Contributions are welcome! Please feel free to submit a Pull Request.
0 commit comments