mcp-server-apache-airflow
by yangkyeongmo
pypi.org/project/mcp-server-apache-airflow/
What is mcp-server-apache-airflow
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 through the Model Context Protocol.
About
This project implements a Model Context Protocol 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.
Feature Implementation Status
Feature | API Path | Status |
---|---|---|
DAG Management | ||
List DAGs | /api/v1/dags |
โ |
Get DAG Details | /api/v1/dags/{dag_id} |
โ |
Pause DAG | /api/v1/dags/{dag_id} |
โ |
Unpause DAG | /api/v1/dags/{dag_id} |
โ |
Update DAG | /api/v1/dags/{dag_id} |
โ |
Delete DAG | /api/v1/dags/{dag_id} |
โ |
Get DAG Source | /api/v1/dagSources/{file_token} |
โ |
Patch Multiple DAGs | /api/v1/dags |
โ |
Reparse DAG File | /api/v1/dagSources/{file_token}/reparse |
โ |
DAG Runs | ||
List DAG Runs | /api/v1/dags/{dag_id}/dagRuns |
โ |
Create DAG Run | /api/v1/dags/{dag_id}/dagRuns |
โ |
Get DAG Run Details | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id} |
โ |
Update DAG Run | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id} |
โ |
Delete DAG Run | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id} |
โ |
Get DAG Runs Batch | /api/v1/dags/~/dagRuns/list |
โ |
Clear DAG Run | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear |
โ |
Set DAG Run Note | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/setNote |
โ |
Get Upstream Dataset Events | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents |
โ |
Tasks | ||
List DAG Tasks | /api/v1/dags/{dag_id}/tasks |
โ |
Get Task Details | /api/v1/dags/{dag_id}/tasks/{task_id} |
โ |
Get Task Instance | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id} |
โ |
List Task Instances | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances |
โ |
Update Task Instance | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id} |
โ |
Clear Task Instances | /api/v1/dags/{dag_id}/clearTaskInstances |
โ |
Set Task Instances State | /api/v1/dags/{dag_id}/updateTaskInstancesState |
โ |
Variables | ||
List Variables | /api/v1/variables |
โ |
Create Variable | /api/v1/variables |
โ |
Get Variable | /api/v1/variables/{variable_key} |
โ |
Update Variable | /api/v1/variables/{variable_key} |
โ |
Delete Variable | /api/v1/variables/{variable_key} |
โ |
Connections | ||
List Connections | /api/v1/connections |
โ |
Create Connection | /api/v1/connections |
โ |
Get Connection | /api/v1/connections/{connection_id} |
โ |
Update Connection | /api/v1/connections/{connection_id} |
โ |
Delete Connection | /api/v1/connections/{connection_id} |
โ |
Test Connection | /api/v1/connections/test |
โ |
Pools | ||
List Pools | /api/v1/pools |
โ |
Create Pool | /api/v1/pools |
โ |
Get Pool | /api/v1/pools/{pool_name} |
โ |
Update Pool | /api/v1/pools/{pool_name} |
โ |
Delete Pool | /api/v1/pools/{pool_name} |
โ |
XComs | ||
List XComs | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries |
โ |
Get XCom Entry | /api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key} |
โ |
Datasets | ||
List Datasets | /api/v1/datasets |
โ |
Get Dataset | /api/v1/datasets/{uri} |
โ |
Get Dataset Events | /api/v1/datasetEvents |
โ |
Create Dataset Event | /api/v1/datasetEvents |
โ |
Get DAG Dataset Queued Event | /api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri} |
โ |
Get DAG Dataset Queued Events | /api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents |
โ |
Delete DAG Dataset Queued Event | /api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents/{uri} |
โ |
Delete DAG Dataset Queued Events | /api/v1/dags/{dag_id}/dagRuns/queued/datasetEvents |
โ |
Get Dataset Queued Events | /api/v1/datasets/{uri}/dagRuns/queued/datasetEvents |
โ |
Delete Dataset Queued Events | /api/v1/datasets/{uri}/dagRuns/queued/datasetEvents |
โ |
Monitoring | ||
Get Health | /api/v1/health |
โ |
DAG Stats | ||
Get DAG Stats | /api/v1/dags/statistics |
โ |
Config | ||
Get Config | /api/v1/config |
โ |
Plugins | ||
Get Plugins | /api/v1/plugins |
โ |
Providers | ||
List Providers | /api/v1/providers |
โ |
Event Logs | ||
List Event Logs | /api/v1/eventLogs |
โ |
Get Event Log | /api/v1/eventLogs/{event_log_id} |
โ |
System | ||
Get Import Errors | /api/v1/importErrors |
โ |
Get Import Error Details | /api/v1/importErrors/{import_error_id} |
โ |
Get Health Status | /api/v1/health |
โ |
Get Version | /api/v1/version |
โ |
Setup
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>
AIRFLOW_USERNAME=<your-airflow-username>
AIRFLOW_PASSWORD=<your-airflow-password>
Usage with Claude Desktop
Add to your claude_desktop_config.json
:
{
"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"
}
}
}
}
Alternative configuration using uv
:
{
"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"
}
}
}
}
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,dagrun"
The default is to use all APIs.
Allowed values are:
- config
- connections
- dag
- dagrun
- dagstats
- dataset
- eventlog
- importerror
- monitoring
- plugin
- pool
- provider
- taskinstance
- variable
- xcom
Manual Execution
You can also run the server manually:
make run
make run
accepts following options:
Options:
--port
: Port to listen on for SSE (default: 8000)--transport
: Transport type (stdio/sse, default: stdio)
Or, you could run the sse server directly, which accepts same parameters:
make run-sse
Installing via Smithery
To install Apache Airflow MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @yangkyeongmo/mcp-server-apache-airflow --client claude
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Leave a Comment
Comments section will be available soon. Stay tuned!
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
Ableton Live MCP Server
MCP Server implementation for Ableton Live OSC control
Airbnb MCP Server
AI Agent Marketplace Index Search MCP Server
MCP Server for AI Agent Marketplace Index from DeepNLP
Algorand MCP Implementation
Algorand Model Context Protocol (Server & Client)
airtable-mcp-server
๐๏ธ๐ค Airtable Model Context Protocol Server, for allowing AI systems to interact with your Airtable bases
Airtable MCP Server
Search, create and update Airtable bases, tables, fields, and records using Claude Desktop and MCP (Model Context Protocol) clients
Alphavantage MCP Server
A MCP server for the stock market data API, Alphavantage API.
Amadeus MCP Server
Amadeus MCP(Model Context Protocol) Server
Anki MCP Server
An MCP server for Anki
any-chat-completions-mcp MCP Server
Submit Your MCP Server
Share your MCP server with the community
Submit Now