astro-airflow-mcp logo

astro-airflow-mcp

Organization
astronomer

MCP server for Apache Airflow instances. Runs standalone or as an Airflow plugin.

Publisherastronomer
Repositoryastro-airflow-mcp
LanguagePython
Forks
5
Stars
13
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    astro-airflow-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    13 stars and 5 forks from the linked repository.

[!WARNING] This project has been relocated to the Astronomer agents monorepo.


Airflow MCP Server

CI Python 3.10+ PyPI - Version License: Apache 2.0

A Model Context Protocol (MCP) server for Apache Airflow that provides AI assistants with access to Airflow's REST API. Built with FastMCP.

Quickstart

IDEs

Add to your MCP settings (Cursor: ~/.cursor/mcp.json, VS Code: .vscode/mcp.json):

json
{
  "mcpServers": {
    "airflow": {
      "command": "uvx",
      "args": ["astro-airflow-mcp", "--transport", "stdio"]
    }
  }
}

CLI Tools

bash
claude mcp add airflow -- uvx astro-airflow-mcp --transport stdio
bash
gemini mcp add airflow -- uvx astro-airflow-mcp --transport stdio
bash
codex mcp add airflow -- uvx astro-airflow-mcp --transport stdio

Desktop Apps

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{
  "mcpServers": {
    "airflow": {
      "command": "uvx",
      "args": ["astro-airflow-mcp", "--transport", "stdio"]
    }
  }
}

Other MCP Clients

Add to your MCP configuration file:

json
{
  "mcpServers": {
    "airflow": {
      "command": "uvx",
      "args": ["astro-airflow-mcp", "--transport", "stdio"]
    }
  }
}

Or connect to a running HTTP server: "url": "http://localhost:8000/mcp"

Note: No installation required - uvx runs directly from PyPI. The --transport stdio flag is required because the server defaults to HTTP mode.

Configuration

By default, the server connects to http://localhost:8080 (Astro CLI default). Set environment variables for custom Airflow instances:

VariableDescription
AIRFLOW_API_URLAirflow webserver URL
AIRFLOW_USERNAMEUsername (Airflow 3.x uses OAuth2 token exchange)
AIRFLOW_PASSWORDPassword
AIRFLOW_AUTH_TOKENBearer token (alternative to username/password)

Example with auth (Claude Code):

bash
claude mcp add airflow -e AIRFLOW_API_URL=https://your-airflow.example.com -e AIRFLOW_USERNAME=admin -e AIRFLOW_PASSWORD=admin -- uvx astro-airflow-mcp --transport stdio

Features

  • Airflow 2.x and 3.x Support: Automatic version detection with adapter pattern
  • MCP Tools for accessing Airflow data:
    • DAG management (list, get details, get source code, stats, warnings, import errors, trigger, pause/unpause)
    • Task management (list, get details, get task instances, get logs)
    • Pool management (list, get details)
    • Variable management (list, get specific variables)
    • Connection management (list connections with credentials excluded)
    • Asset/Dataset management (unified naming across versions, data lineage)
    • Plugin and provider information
    • Configuration and version details
  • Consolidated Tools for agent workflows:
    • explore_dag: Get comprehensive DAG information in one call
    • diagnose_dag_run: Debug failed DAG runs with task instance details
    • get_system_health: System overview with health, errors, and warnings
  • MCP Resources: Static Airflow info exposed as resources (version, providers, plugins, config)
  • MCP Prompts: Guided workflows for common tasks (troubleshooting, health checks, onboarding)
  • Dual deployment modes:
    • Standalone server: Run as an independent MCP server
    • Airflow plugin: Integrate directly into Airflow 3.x webserver
  • Flexible Authentication:
    • Bearer token (Airflow 2.x and 3.x)
    • Username/password with automatic OAuth2 token exchange (Airflow 3.x)
    • Basic auth (Airflow 2.x)

Available Tools

Consolidated Tools (Agent-Optimized)

ToolDescription
explore_dagGet comprehensive DAG info: metadata, tasks, recent runs, source code
diagnose_dag_runDebug a DAG run: run details, failed task instances, logs
get_system_healthSystem overview: health status, import errors, warnings, DAG stats

Core Tools

ToolDescription
list_dagsGet all DAGs and their metadata
get_dag_detailsGet detailed info about a specific DAG
get_dag_sourceGet the source code of a DAG
get_dag_statsGet DAG run statistics (Airflow 3.x only)
list_dag_warningsGet DAG import warnings
list_import_errorsGet import errors from DAG files that failed to parse
list_dag_runsGet DAG run history
get_dag_runGet specific DAG run details
trigger_dagTrigger a new DAG run (start a workflow execution)
pause_dagPause a DAG to prevent new scheduled runs
unpause_dagUnpause a DAG to resume scheduled runs
list_tasksGet all tasks in a DAG
get_taskGet details about a specific task
get_task_instanceGet task instance execution details
get_task_logsGet logs for a specific task instance execution
list_poolsGet all resource pools
get_poolGet details about a specific pool
list_variablesGet all Airflow variables
get_variableGet a specific variable by key
list_connectionsGet all connections (credentials excluded for security)
list_assetsGet assets/datasets (unified naming across versions)
list_pluginsGet installed Airflow plugins
list_providersGet installed provider packages
get_airflow_configGet Airflow configuration
get_airflow_versionGet Airflow version information

MCP Resources

Resource URIDescription
airflow://versionAirflow version information
airflow://providersInstalled provider packages
airflow://pluginsInstalled Airflow plugins
airflow://configAirflow configuration

MCP Prompts

PromptDescription
troubleshoot_failed_dagGuided workflow for diagnosing DAG failures
daily_health_checkMorning health check routine
onboard_new_dagGuide for understanding a new DAG

Advanced Usage

Running as Standalone Server

For HTTP-based integrations or connecting multiple clients to one server:

bash
# Run server (HTTP mode is default)
uvx astro-airflow-mcp --airflow-url https://my-airflow.example.com --username admin --password admin

Connect MCP clients to: http://localhost:8000/mcp

Airflow Plugin Mode

Install into your Airflow 3.x environment to expose MCP at http://your-airflow:8080/mcp/v1:

bash
# Add to your Astro project
echo astro-airflow-mcp >> requirements.txt

CLI Options

FlagEnvironment VariableDefaultDescription
--transportMCP_TRANSPORTstdioTransport mode (stdio or http)
--hostMCP_HOSTlocalhostHost to bind to (HTTP mode only)
--portMCP_PORT8000Port to bind to (HTTP mode only)
--airflow-urlAIRFLOW_API_URLAuto-discovered or http://localhost:8080Airflow webserver URL
--airflow-project-dirAIRFLOW_PROJECT_DIR$PWDAstro project directory for auto-discovering Airflow URL from .astro/config.yaml
--auth-tokenAIRFLOW_AUTH_TOKENNoneBearer token for authentication
--usernameAIRFLOW_USERNAMENoneUsername for authentication (Airflow 3.x uses OAuth2 token exchange)
--passwordAIRFLOW_PASSWORDNonePassword for authentication

Architecture

The server is built using FastMCP with an adapter pattern for Airflow version compatibility:

Core Components

  • Adapters (adapters/): Version-specific API implementations
    • AirflowAdapter (base): Abstract interface for all Airflow API operations
    • AirflowV2Adapter: Airflow 2.x API (/api/v1) with basic auth
    • AirflowV3Adapter: Airflow 3.x API (/api/v2) with OAuth2 token exchange
  • Version Detection: Automatic detection at startup by probing API endpoints
  • Models (models.py): Pydantic models for type-safe API responses

Version Handling Strategy

  1. Major versions (2.x vs 3.x): Adapter pattern with runtime version detection
  2. Minor versions (3.1 vs 3.2): Runtime feature detection with graceful fallbacks
  3. New API parameters: Pass-through **kwargs for forward compatibility

Deployment Modes

  • Standalone: Independent ASGI application with HTTP/SSE transport
  • Plugin: Mounted into Airflow 3.x FastAPI webserver

Development

bash
# Setup development environment
make install-dev

# Run tests
make test

# Run all checks
make check

# Local testing with Astro CLI
astro dev start  # Start Airflow
make run         # Run MCP server (connects to localhost:8080)

Contributing

Contributions welcome! Please ensure:

  • All tests pass (make test)
  • Code passes linting (make check)
  • prek hooks pass (make prek)

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "airflow": {
      "command": "uvx",
      "args": [
        "astro-airflow-mcp",
        "--transport",
        "stdio"
      ]
    }
  }
}

Use astro-airflow-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once astro-airflow-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add astro-airflow-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the astro-airflow-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "astro-airflow-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "astro-airflow-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the astro-airflow-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the astro-airflow-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use astro-airflow-mcp to help me with this task?
astro-airflow-mcp
Sure. I read it.
Here is what I found using astro-airflow-mcp.

Frequently asked questions

What is the astro-airflow-mcp MCP server used for?

astro-airflow-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use astro-airflow-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use astro-airflow-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use astro-airflow-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With astro-airflow-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect astro-airflow-mcp MCP to TypingMind?

astro-airflow-mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does astro-airflow-mcp MCP provide in TypingMind?

astro-airflow-mcp exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use astro-airflow-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If astro-airflow-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇