Skip to main content

MCP-Airflow-API

Use Claude, OpenWebUI, and other MCP clients to inspect and operate Apache Airflow through its REST API.

License: MIT PyPI Docker Pulls Release workflow

What is MCP-Airflow-API?

MCP-Airflow-API turns plain-language requests into Apache Airflow REST API calls. One server supports Airflow 2.x API v1 and Airflow 3.x API v2, selected with AIRFLOW_API_VERSION.

  • Inspect DAGs, DAG runs, task instances, pools, variables, connections, and cluster health.
  • Trigger, pause, and manage supported Airflow resources using the permissions of the configured Airflow account.
  • Use local stdio or Streamable HTTP transport.
  • Run with Claude Desktop, OpenWebUI, any MCP client, or the optional MCPO OpenAPI compatibility proxy.

Example requests:

Show the currently running DAGs.
List failed task instances from the last 24 hours.
Trigger the example_etl DAG with today's processing date.
Show assets updated by data_ingestion.  # Airflow 3.x only

Quick Start

Choose one path. Both require an Airflow account and network access to its API. For a test cluster, see Airflow-Docker-Compose.

Option A: Claude Desktop with MCPB

  1. Download mcp-airflow-api-<version>.mcpb from the latest GitHub Release.
  2. In Claude Desktop, open Settings → Extensions → Advanced settings → Install Extension… and select the bundle.
  3. Choose API v1 for Airflow 2.x or v2 for Airflow 3.x, then enter the API base URL, user name, and password.
  4. Ask: Show the health of my Airflow cluster.

The base URL excludes the version suffix, for example http://localhost:8080/api. See the Claude Desktop guide for uvx, source, and remote alternatives.

Option B: OpenWebUI with Docker Compose

Requirements: Git, Docker with the Compose plugin, and a model provider whose model supports tool calling.

git clone https://github.com/call518/MCP-Airflow-API.git
cd MCP-Airflow-API
cp .env.example .env
cp mcp-config.json.http mcp-config.json.http.local
chmod 600 mcp-config.json.http.local
# Edit .env for your Airflow cluster, then start the stack.
docker compose up -d
docker compose ps

The default stack exposes only localhost:

  • OpenWebUI: http://localhost:3002
  • MCP server: http://localhost:18002/mcp
  • Optional MCPO/OpenAPI proxy: http://localhost:8002

In OpenWebUI, add an external tool server of type MCP (Streamable HTTP) with the internal Docker URL http://mcp-server:8000/mcp. Do not use the host URL from inside the Docker network.

OpenWebUI connects directly to MCP; MCPO is optional and exists for OpenAPI clients. Start without it using:

docker compose up -d mcp-server open-webui

The example enables reasoning_effort: none globally to avoid tool-call errors with some reasoning models. Existing OpenWebUI volumes retain their saved model settings. See the OpenWebUI guide for exact menus, MCPO setup, authentication, and troubleshooting.

Other installation methods

Method Command or guide
PyPI with uvx uvx --python 3.12 mcp-airflow-api
Claude Desktop JSON configuration Claude Desktop guide
Local development uv sync --frozen && uv run mcp-airflow-api
Streamable HTTP uv run mcp-airflow-api --type streamable-http
OpenWebUI and MCPO OpenWebUI guide

Configuration

Variable Required Description
AIRFLOW_API_VERSION No v1 for Airflow 2.x (default), v2 for Airflow 3.x
AIRFLOW_API_BASE_URL Yes API root without /v1 or /v2, such as http://localhost:8080/api
AIRFLOW_API_USERNAME Yes Airflow API user name
AIRFLOW_API_PASSWORD Yes Airflow API password
MCP_LOG_LEVEL No DEBUG, INFO, WARNING, ERROR, or CRITICAL
FASTMCP_TYPE No stdio (default) or streamable-http
FASTMCP_HOST HTTP only Bind address; defaults to 127.0.0.1
FASTMCP_PORT HTTP only Listen port; defaults to 8000
REMOTE_AUTH_ENABLE HTTP only Enable Bearer authentication
REMOTE_SECRET_KEY When auth enabled Bearer token shared with MCP clients

See Configuration and security for Docker port settings, authentication, and client examples.

Safety and security

  • The server can change Airflow state when the configured account permits it. Review tool calls and use a least-privilege Airflow account.
  • Keep .env and mcp-config.json.*.local files out of Git. Tracked examples contain placeholders only.
  • Compose binds HTTP ports to 127.0.0.1 by default. Before exposing the MCP server remotely, enable Bearer authentication and put it behind HTTPS.
  • MCPB runs locally over stdio and does not use the HTTP Bearer settings.

Compatibility

  • Python 3.12 or newer
  • Airflow 2.x through REST API v1
  • Airflow 3.x through REST API v2; asset tools are v2-only
  • Claude Desktop MCPB, generic stdio/Streamable HTTP MCP clients, OpenWebUI, and optional MCPO/OpenAPI clients

Exact endpoint availability still depends on the Airflow version and the configured account's permissions.

Documentation

Guide Contents
Claude Desktop MCPB, uvx, source, and remote connections
OpenWebUI Direct MCP, optional MCPO, reasoning models, troubleshooting
Configuration and security Environment variables, ports, Bearer authentication
API coverage Detailed tool and Airflow endpoint coverage
Prompt and tool catalog Registered tools and example requests

Development

uv sync --frozen
uv run pytest -ra

Run locally over stdio:

AIRFLOW_API_VERSION=v1 \
AIRFLOW_API_BASE_URL=http://localhost:8080/api \
AIRFLOW_API_USERNAME=airflow \
AIRFLOW_API_PASSWORD=airflow \
uv run mcp-airflow-api

Build an MCPB without including local configuration or credentials:

scripts/build-mcpb.sh 0.0.0 /tmp/mcp-airflow-api-mcpb-check
unzip -l /tmp/mcp-airflow-api-mcpb-check/mcp-airflow-api-0.0.0.mcpb

License

MIT

Metadata

Release files for mcp-airflow-api 3.7.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-airflow-api 3.7.9
File Size Uploaded Provenance Actions
mcp_airflow_api-3.7.9.tar.gz 788.3 kB With provenance Details for mcp_airflow_api-3.7.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-airflow-api 3.7.9
File Interpreter ABI Platform Actions
mcp_airflow_api-3.7.9-py3-none-any.whl Python 3 none any Details for mcp_airflow_api-3.7.9-py3-none-any.whl

Total release size: 821.4 kB

Release files / mcp_airflow_api-3.7.9.tar.gz

Download URL mcp_airflow_api-3.7.9.tar.gz
Size 788.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2bf86d1bee320b6a281478691a7a3cd6cc629080a61d8c3072046c685d9d1fe5
BLAKE2b-256 checksum
How to use checksums
336a211da09a6890ea1444ee3b4719dc3f71875263d0c657d531b446bcd3aff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / mcp_airflow_api-3.7.9-py3-none-any.whl

Download URL mcp_airflow_api-3.7.9-py3-none-any.whl
Size 33.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b187174506b248bbb08ddb604310f656f4317bf9865b6b0022ba832efab0aef
BLAKE2b-256 checksum
How to use checksums
1b0f286bdbd3bb3f70949d8cf8f23fe53caaac958ea2271b41a53d807fa7d7dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for mcp-airflow-api 3.7.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_airflow_api-3.7.9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.7.9 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page