mcp-airflow-simple

by chayasin

Not rated
GitHub

About

simple mcp server for Airflow 3 (API version 2)

Details

Author
chayasin
Categories
Developer Tools, Automation, Infrastructure, Other

Setup

Install mcp-airflow-simple in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/chayasin/mcp-airflow-simple

Follow the installation instructions in the repository README, then restart your MCP client.

simple mcp server for Airflow 3 (API version 2)

AModel Context Protocol (MCP) serverfor Apache Airflow 3 that provides essential tools for DAG management, monitoring, debugging, and connection testing through the Airflow REST API v2.

it will return a token, copy the token and paste it to the .env file

make sure your airflow is running and accessible at the configured URL

curl -X POST "{your_ariflow_url}/auth/token" -H "Content-Type: application/json" -d '{"username":"{your_airflow_username}","password":"{your_airflow_password}"}'
curl -X POST "http://localhost:8080/auth/token" -H "Content-Type: application/json" -d '{"username":"airflow","password":"airflow"}'
{ "mcpServers": { "airflow": { "command": "python", "args": ["c:\\{path_to_your_folder}\\mcp-airflow-simple\\server.py"], "env": { "GIT_AUTO_UPDATE": "true" } } } }

- List all DAGs with filtering options
- Get tasks within a specific DAG
- Trigger DAG runs with optional configuration
- Clear/retry failed DAG runs

- Check DAG run history and status
- View task instances for specific runs
- Get aggregate DAG statistics

- Retrieve task execution logs
- Check DAG import/parsing errors

- List all Airflow connections
- Get connection details
- Test connection accessibility

- Monitor Airflow Scheduler, Metadatabase, Triggerer, and DagProcessor status
-

Clone or navigate to the project directory:

Configure environment variables:Edit the.envfile with your Airflow instance details:

airflow_baseurl=http://localhost:8080 airflow_api_url=http://localhost:8080/api/v2 airflow_username=airflow airflow_password=airflow airflow_jwt_token=your_jwt_token_here

The server supports two authentication methods:
- JWT Token (Preferred): Setairflow_jwt_tokenin.env
- Basic Auth (Fallback): Usesairflow_usernameandairflow_password

The server will automatically use JWT if available, otherwise fall back to basic authentication.

{ "only_active": false, "limit": 100 }
{ "dag_id": "example_dag" }
{ "dag_id": "example_dag", "conf": {"key": "value"}, "logical_date": "2026-01-05T00:00:00Z" }

Clear/retry a DAG run (resets failed tasks).

{ "dag_id": "example_dag", "dag_run_id": "manual__2026-01-05T00:00:00+00:00", "dry_run": false }
{ "dag_id": "example_dag", "is_paused": true }

Get DAG run history with optional state filtering.

{ "dag_id": "example_dag", "state": "failed", "limit": 25 }

Get task instances for a specific DAG run.

{ "dag_id": "example_dag", "dag_run_id": "manual__2026-01-05T00:00:00+00:00" }

Get execution logs for a specific task instance.

{ "dag_id": "example_dag", "dag_run_id": "manual__2026-01-05T00:00:00+00:00", "task_id": "example_task", "try_number": 1 }
{ "connection_id": "postgres_default" }
{ "connection_id": "postgres_default" }

Check Airflow system health (includes Metadatabase, Scheduler, Triggerer, and DagProcessor).

The server runs as a stdio-based MCP server:

To use this server with MCP clients like Claude Desktop, add to your MCP configuration:

Windows(%APPDATA%\Claude\claude_desktop_config.json):

{ "mcpServers": { "airflow": { "command": "python", "args": ["c:\\{path_to_your_folder}\\mcp-airflow\\server.py"], "env": { "airflow_api_url": "http://localhost:8080/api/v2", "airflow_jwt_token": "your_token_here" } } } }

macOS/Linux(~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "airflow": { "command": "python3", "args": ["{path_to_your_folder}/mcp-airflow/server.py"] } } }

- Verify Airflow is running and accessible at the configured URL
- Check authentication credentials (JWT token or username/password)
- Ensure the Airflow REST API is enabled

- Confirm JWT token is valid and not expired
- Verify username and password are correct
- Check that the user has necessary permissions in Airflow

- Ensure DAG IDs and run IDs are correct
- Check that the requested resources exist in Airflow
- Review Airflow logs for additional context

This MCP server uses theAirflow REST API v2. For detailed API documentation, see:

- Airflow REST API Documentation
- Local OpenAPI spec:openapi.json

- Python 3.8+
- Apache Airflow 3.x with REST API enabled
- Network access to Airflow instance

MIT License - feel free to use and modify as needed.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Interact with your MLOps and LLMOps pipelines through your ZenML MCP server

Interact with Apache Airflow using natural language to manage and monitor your data workflows.

Search and run capsules, execute pipelines, and manage data assets on the Code Ocean platform.

Scout's official MCP pipes error, trace and metric data from production to your AI agent

Set up and interact with your unstructured data processing workflows in Unstructured Platform

Control Apache Airflow via its API using JWT authentication.

Provides tools to interact with the Ansible Automation Platform API for automation tasks.

Provides quality control for biological sequence data using the FastQC and MultiQC tools.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.