apache-airflow-mcp-server

BShraman/apache-airflow-mcp-server

3.2

If you are the rightful owner of apache-airflow-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Apache Airflow MCP Server is a specialized server designed to handle model context protocols, facilitating the integration and management of machine learning models within workflows.

Apache Airflow MCP Server

The Apache Airflow MCP Server enables users to orchestrate and manage Airflow workflows using natural language, powered by Claude Desktop. All source code is containerized for easy deployment and integration. This solution lets users interact with Airflow DAGs, assets, and management tools through conversational prompts, streamlining workflow automation and monitoring.


🚀 Features

  • Natural Language Workflow Orchestration: Control and query Airflow using plain English.
  • Containerized Architecture: All components run in Docker for portability and reproducibility.
  • Claude Desktop Integration: Seamless communication between MCP server and Claude Desktop.
  • Visual Code Studio: Seamless communication between MCP server and Visual Code Studio.
  • Auto-Discovery of Tools: Registered Airflow tools are automatically available in Claude Desktop.
  • Easy Setup: Minimal prerequisites and simple configuration.

🛠 Prerequisites

  • Docker Desktop - All-in-one container runtime for building and running Dockerized apps
  • Docker Compose – for managing multi-container apps
  • Claude Desktop – for local LLM interaction
  • (Optional) Python 3.10+ for local development
  • A running Apache Airflow instance (local or remote)

⚡ Quick Start

1. Clone the Repository

git clone https://github.com/BShraman/apache-airflow-mcp-server.git
cd apache-airflow-mcp-server

2. Build the Docker Image

docker build -t airflow-mcp-server .

3. Start Airflow Instance Locally

docker-compose up -d

4. Access Airflow UI

Open http://localhost:8080 in your browser.

5. Configuration

Claude Desktop

To connect Claude Desktop to your MCP server, follow these steps:

  1. Open Claude Desktop
  • Launch the Claude Desktop application.
  1. Navigate to Settings
  • Click on the Settings icon (usually a gear ⚙️) in the sidebar.
  1. Go to Developer Section
  • In the Settings menu, scroll down and select Developer.
  1. Edit Configuration
  • Click on Edit Config to open the configuration file in the built-in editor.
  1. Add MCP Server Entry
  • In the configuration file, locate the "claude_desktop_config.json" file.
  • Insert the following block (update the image name if needed):
{
  "mcpServers": {
    "airflow-custom-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "airflow-custom-mcp"
      ]
    }
  }
}
  1. Save Changes
  • Click Save to apply your changes.
  1. Restart Claude Desktop
  • Restart Claude Desktop to ensure the new MCP server configuration is loaded.

For more details, refer to the Claude Desktop documentation.

Visual Studio Code

To connect Visual Studio Code to your MCP server, follow these steps:

  1. Create the MCP Configuration File
  • In your project root, create a file named .vscode/mcp.json.
  1. Add MCP Server Configuration
  • Open mcp.json and add the following configuration (update the image name or command if needed):
{
  "mcpServers": {
   "airflow-mcp-server": {
    "command": "docker",
    "args": [
      "run",
      "-i",
      "--rm",
      "airflow-mcp-server"
    ]
   }
  }
}
  1. Save the Configuration
  • Save the mcp.json file in your project directory.
  1. Restart Visual Studio Code
  • Close and reopen Visual Studio Code to ensure the new MCP configuration is loaded.
  1. Verify MCP Server Connection
  • Use the command palette (Cmd+Shift+P or Ctrl+Shift+P) to search for MCP-related commands.
  • You should now be able to interact with the MCP server from within Visual Studio Code.

Tip:
If you need to pass environment variables or use a custom Docker image, adjust the "args" array in your .json accordingly.


💬 Using MCP with Claude Desktop or Visual Studio Code

Once connected, you can list all available Airflow tools directly in Claude Desktop by entering a prompt such as List available MCP tools. Claude Desktop will display the registered tools and their descriptions.

Claude Desktop will send your requests to the MCP server, which translates them into Airflow API calls and returns the results conversationally. This enables intuitive workflow management and monitoring without needing to write code or use the Airflow UI.

Example Prompts:

  • List all Airflow DAGs
  • Get details for dag_id example_bash_operator
  • Show all workflow assets
  • Trigger the daily_report DAG
  • What is the status of the example_bash_operator DAG?

How it works:

  • Application sends your prompt to the MCP server.
  • The MCP server translates your request to Airflow's REST API.
  • Results are returned conversationally in requested application.

🧩 Advanced Usage

  • Register Custom Tools: Add Python modules to the /tools directory to extend MCP capabilities.
  • Environment Variables: Configure Airflow API URL, credentials, and MCP server settings in .env.
  • Security: Use dedicated Airflow credentials and restrict network access as needed.

Testing

MCP Server Tools List Dags Trigger Dags Running Dags Delete Dags


📝 Troubleshooting

  • Can't find MCP tools: Ensure the MCP server is running and correctly configured.
  • Authentication errors: Check your Airflow credentials in the .env file.
  • Docker issues: Use docker logs to view error messages.

📚 Resources