Logo: Airflow MCP

Airflow MCP

Organisatioun
hipposys-ltd

This repository has been transferred to new ownership and is no longer actively maintained in this location.

Editeurhipposys-ltd
Repositoryairflow-mcp
SproochPython
Forks
4
Stären
10
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Airflow MCP bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 10, Forks: 4.

⚠️ REPOSITORY MOVED - NO LONGER MAINTAINED HERE

This repository has been transferred to new ownership and is no longer actively maintained in this location.

🔄 Migration Notice

This repository and all associated open-source packages have been moved to a new GitHub organization.

New Location: https://github.com/ponderedw

📍 What This Means

  • ✅ Active development continues at the new location
  • ✅ Latest updates and releases are published there
  • ✅ Issues and pull requests should be submitted to the new repository
  • ⚠️ This repository will no longer receive updates

🔗 Find the Updated Repository

Please visit https://github.com/ponderedw to:

  • Access the latest version of this package
  • Report issues or contribute
  • View updated documentation
  • Get support from the maintainers

Thank you for your understanding during this transition.

Airflow MCP

This project implements an MCP server for Apache Airflow, enabling users to interact with their orchestration platform using natural language.

With a few minutes of setup, you should be able to use Claude Desktop or any MCP-enabled LLM to ask questions like:

  • "What DAGs do we have in our Airflow cluster?"
  • "What is our latest failed DAG?"

And more!

About MCP and Airflow MCP

The Model Context Protocol (MCP) is an open standard creating secure connections between data sources and AI applications. This repository provides a custom MCP server for Apache Airflow that transforms how teams interact with their orchestration platform through natural language.

🚀 Features

  • Query pipeline statuses through natural language
  • Troubleshoot DAG failures efficiently
  • Retrieve comprehensive DAG information
  • Trigger DAGs based on their status
  • Monitor execution results
  • Analyze DAG components and configurations

🛠️ Getting Started

Prerequisites

If you already have an Airflow instance and want to use our prebuilt Docker image, you only need:

  • Docker
  • Access to your Apache Airflow instance
  • LLM access (Claude, ChatGPT, or AWS Bedrock)

This repository also provides a local setup for Apache Airflow, which you can use for demo purposes.

You can also build the MCP server from source, detailed below.

Quick Start - Using the Prebuilt Docker Image

If you have an Airflow instance and want to use our prebuilt Docker image, simply follow these steps:

You'll need to configure Claude Desktop to connect to your Airflow instance. If you haven't configured Claude Desktop for use with MCP before, we recommend following the Claude Desktop documentation.

Here are the steps to configure Claude Desktop to connect to your Airflow instance, using our prebuilt Docker image:

  • Open Claude Desktop
  • Go to Settings → Developer tab
  • Edit the MCP config with:
json
{
   "mcpServers": {
         "airflow_mcp": {
            "command": "docker",
            "args": ["run", "-i", "--rm", "-e", "airflow_api_url", "-e", "airflow", "-e", "airflow", "hipposysai/airflow-mcp:latest"],
            "env": {
               "airflow_api_url": "http://host.docker.internal:8088/api/v1",
               "airflow_username": "airflow",
               "airflow_password": "airflow"
            }
         }
   }
}

Running MCP Locally with Claude Desktop

  1. Clone this repository:

    git clone https://github.com/hipposys-ltd/airflow-mcp
  2. If you don't have a running Airflow environment, start one with:

    just airflow

    This will start an Airflow instance on port 8088, with username airflow and password airflow.

    You can access Airflow at http://localhost:8088/ and see multiple DAGs configured:

    Airflow DAGs.

    These DAGs have complex dependencies, some running on a schedule and some using Airflow's Dataset functionality.

  3. Configure Claude Desktop:

    You'll need to configure Claude Desktop to connect to your Airflow instance. If you haven't configured Claude Desktop for use with MCP before, we recommend following the Claude Desktop documentation.

    Here are the steps to configure Claude Desktop to connect to your Airflow instance:

    • Open Claude Desktop
    • Go to Settings → Developer tab
    • Edit the MCP config with:
    json
    {
       "mcpServers": {
           "airflow_mcp": {
               "command": "docker",
               "args": ["run", "-i", "--rm", "-e", "airflow_api_url", "-e", "airflow", "-e", "airflow", "hipposysai/airflow-mcp:latest"],
               "env": {
                 "airflow_api_url": "http://host.docker.internal:8088/api/v1",
                 "airflow_username": "airflow",
                 "airflow_password": "airflow"
               }
           }
       }
    }
  4. Test your setup by asking Claude: "What DAGs do we have in our Airflow cluster?"

Integrating with LangChain

  1. Set up environment:

    cp template.env .env
  2. Configure your LLM model in .env:

    • For AWS Bedrock: LLM_MODEL_ID=bedrock:...
    • For Anthropic: LLM_MODEL_ID=anthropic:...
    • For OpenAI: LLM_MODEL_ID=openai:...
  3. Add your API credentials to .env:

    • AWS credentials for Bedrock
    • ANTHROPIC_API_KEY for Claude
    • OPENAI_API_KEY for ChatGPT
  4. (Optional) Connect to your own Airflow:

    airflow_api_url=your_airflow_api_url
    airflow_username=your_airflow_username
    airflow_password=your_airflow_password
  5. Start the project:

    • With bundled Airflow: just project
    • With existing Airflow: just project_no_airflow
  6. Open web interfaces:

    just open_web_tabs
  7. Try it out by asking "How many DAGs failed today?" in the Chat UI

📝 Example Usage

  • "What DAGs do we have in our Airflow cluster?"
  • "Identify all DAGs with failed status in their most recent execution and trigger a new run for each one"
  • "What operators are used by the transform_forecast_attendance DAG?"
  • "Has the transform_forecast_attendance DAG ever completed successfully?"

Running MCP with LangChain

You can use from langchain_mcp_adapters.client import MultiServerMCPClient in order to add our Airflow MCP as one of your tools in your LangChain app.

Option 1: Separate Container (SSE Transport)

If you run our Airflow MCP as a separate container, use SSE transport:

python
mcp_host = os.environ.get('mcp_host', 'mcp_sse_server:8000')
mcps = {
    "AirflowMCP": {
        "url": f"http://{mcp_host}/sse",
        "transport": "sse",
        "headers": {"Authorization": f"""Bearer {
            os.environ.get('MCP_TOKEN')}"""}
    }
}

Option 2: Embedded Server (STDIO Transport)

If you want to run our MCP server as part of the LangChain code, without any outside code, use STDIO and make sure you install our library first (airflow-mcp-hipposys = "0.1.0a11"):

python
mcps = {
    "AirflowMCP":
    {
        'command': "python",
        'args': ["-m", "airflow_mcp_hipposys.mcp_airflow"],
        "transport": "stdio",
        'env': {k: v for k, v in {
            'AIRFLOW_ASSISTENT_AI_CONN': os.getenv(
                'AIRFLOW_ASSISTENT_AI_CONN'),
            'airflow_api_url': os.getenv('airflow_api_url'),
            'airflow_username': os.getenv('airflow_username'),
            'airflow_password': os.getenv('airflow_password'),
            'AIRFLOW_INSIGHTS_MODE':
                os.getenv('AIRFLOW_INSIGHTS_MODE'),
            'POST_MODE': os.getenv('POST_MODE'),
            'TRANSPORT_TYPE': 'stdio',
            '_AIRFLOW_WWW_USER_USERNAME':
                os.getenv('_AIRFLOW_WWW_USER_USERNAME'),
            '_AIRFLOW_WWW_USER_PASSWORD':
                os.getenv('_AIRFLOW_WWW_USER_PASSWORD')
        }.items() if v is not None}
    }
}

Using the Tools

Then in both cases, pass it to the tools:

python
client = MultiServerMCPClient(mcps)
tools = await client.get_tools()

🤝 Contributing

We enthusiastically invite the community to contribute to this open-source initiative! Whether you're interested in:

  • Adding new features
  • Improving documentation
  • Enhancing compatibility with different LLM providers
  • Reporting bugs
  • Suggesting improvements

Please feel free to submit pull requests or open issues on our GitHub repository.

🔗 Links


Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "hipposys-ltd-airflow-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "airflow-mcp-hipposys"
      ]
    }
  }
}

Airflow MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Airflow MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung, fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Airflow MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir Airflow MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "hipposys-ltd-airflow-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "airflow-mcp-hipposys"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun Airflow MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun Airflow MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat Airflow MCP bei dëser Aufgab hëllefen?
Airflow MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat Airflow MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server Airflow MCP benotzt?

Airflow MCP ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Airflow MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Airflow MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat Airflow MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Airflow MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech Airflow MCP MCP mat TypingMind?

Airflow MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann den MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Airflow MCP MCP an TypingMind zur Verfügung?

Airflow MCP stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Airflow MCP MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Airflow MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇