Get the FREE Ultimate OpenClaw Setup Guide →

mcp -apache-airflow

MCP server from yangkyeongmo/mcp-server-apache-airflow

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yangkyeongmo-mcp-server-apache-airflow python -m mcp_server_apache_airflow \
  --env DEBUG="true to enable verbose logs (optional)" \
  --env AIRFLOW_BASE_URL="The base URL for the Airflow REST API, e.g. http://localhost:8080" \
  --env AIRFLOW_PASSWORD="Airflow password for authentication" \
  --env AIRFLOW_USERNAME="Airflow username for Basic/Token auth" \
  --env AIRFLOW_VERIFY_SSL="true or false to enable SSL verification"

How to use

This MCP server provides a standardized interface to interact with an Apache Airflow deployment through the Model Context Protocol. It exposes MCP endpoints that map to common Airflow operations such as listing DAGs, retrieving DAG details, managing DAG runs, task details and logs, variables, connections, and pools. Clients can query or manipulate Airflow resources via the MCP API without needing to directly call the Airflow REST API, providing consistent MCP semantics and authentication handling. The server leverages the official Airflow client library to ensure compatibility with Airflow deployments.

To use the server, configure the Airflow REST API connection via environment variables (base URL and credentials) and run the MCP server. Once running, you can browse or invoke endpoints that correspond to Airflow resources, such as GET /dags, POST /dags/{dag_id}/dagRuns to create runs, or GET /dags/{dag_id}/tasks to list tasks. The MCP layer abstracts underlying API paths and returns MCP-compatible payloads, making it easier to integrate with MCP clients and workflows.

How to install

Prerequisites:

  • Python 3.8+ installed on the host
  • Access to a running Apache Airflow instance with REST API enabled
  • Network access from the MCP server to Airflow REST API

Installation steps:

  1. Create and activate a Python virtual environment (optional but recommended):

    python3 -m venv env source env/bin/activate

  2. Install the MCP Apache Airflow server package from PyPI (or via your preferred method):

    pip install mcp-server-apache-airflow

  3. Set up environment variables for Airflow REST API access (adjust values as needed):

    export AIRFLOW_BASE_URL="http://localhost:8080" export AIRFLOW_USERNAME="<your-username>" export AIRFLOW_PASSWORD="<your-password>" export AIRFLOW_VERIFY_SSL="false" # or true

  4. Run the MCP server (example using the Python module entry point):

    python -m mcp_server_apache_airflow

  5. Verify the server starts and is reachable at the default MCP endpoint configured by your environment.

Note: If you prefer Docker or other runtimes, adapt the commands accordingly and ensure network access to Airflow REST API.

Additional notes

Environment variables and configuration:

  • AIRFLOW_BASE_URL: Base URL for the Airflow REST API. Include scheme and host, e.g. https://airflow.example.com
  • AIRFLOW_USERNAME / AIRFLOW_PASSWORD: Credentials used to authenticate to Airflow REST API. Depending on your Airflow setup, you may use basic auth or token-based methods; ensure compatibility with the client library.
  • AIRFLOW_VERIFY_SSL: Set to 'true' to enforce SSL certificate verification; 'false' if using self-signed certificates in development.
  • DEBUG: Enable verbose logging for troubleshooting.

Common issues:

  • Network connectivity between the MCP server and Airflow REST API. Ensure firewall rules allow traffic on the Airflow API port.
  • Airflow API version compatibility. This MCP server relies on the official Airflow client library; verify your Airflow version is supported.
  • Missing or insufficient permissions on Airflow side for the APIs the MCP server will invoke.

Configuration options:

  • You can extend or customize the MCP server environment to map additional Airflow endpoints, such as dagSources or variables, as supported by the underlying Airflow REST API.
  • If your Airflow requires token-based authentication, adapt the AIRFLOW_USERNAME/AIRFLOW_PASSWORD or implement a token provider as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers