Skip to main content
Glama
mwaa-mcp-server

mwaa-mcp-server

by biswasbiplob

mwaa-mcp-server

A Model Context Protocol (MCP) server for Amazon Managed Workflows for Apache Airflow (MWAA).

Features

  • MWAA Environment Management: List, describe, create, update, and delete MWAA environments

  • Airflow DAG Operations: List DAGs, view details, get source code, trigger runs, pause/unpause

  • DAG Run Monitoring: List and inspect DAG runs, task instances, and task logs

  • Configuration Access: View Airflow connections (with password redaction) and variables

  • Error Diagnostics: Retrieve DAG import/parsing errors

  • Secure by Design: All Airflow API operations go through AWS invoke_rest_api — no CLI or web tokens are exposed

  • Read-only by Default: Write operations require the --allow-write flag

  • Airflow 2.x and 3.x: The server detects each environment's Airflow major version and translates API differences (e.g. execution_date vs logical_date) transparently — tools keep one stable interface

Related MCP server: astro-airflow-mcp

Prerequisites

  • Python 3.10+

  • AWS credentials configured (via environment variables, AWS CLI profile, or IAM role)

  • An Amazon MWAA environment (Airflow 2.x or 3.x)

Installation

uvx --from git+https://github.com/biswasbiplob/mwaa-mcp-server mwaa-mcp-server

Using pip

pip install git+https://github.com/biswasbiplob/mwaa-mcp-server

Using Docker

docker build -t mwaa-mcp-server .
docker run -it mwaa-mcp-server

Configuration

Environment Variables

Variable

Description

Default

AWS_REGION

AWS region for API calls

us-east-1

AWS_PROFILE

AWS CLI profile name

Default credential chain

MWAA_ENVIRONMENT

Default MWAA environment name (avoids per-call specification)

Auto-detect

FASTMCP_LOG_LEVEL

Log level (ERROR, WARNING, INFO, DEBUG)

WARNING

CLI Arguments

Argument

Description

--allow-write

Enable write operations (trigger DAG runs, pause/unpause DAGs, create/update/delete environments)

Usage with Claude Desktop

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "mwaa-mcp-server": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/biswasbiplob/mwaa-mcp-server", "mwaa-mcp-server"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_PROFILE": "my-profile",
        "MWAA_ENVIRONMENT": "my-environment",
        "FASTMCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

For write access:

{
  "mcpServers": {
    "mwaa-mcp-server": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/biswasbiplob/mwaa-mcp-server", "mwaa-mcp-server", "--allow-write"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_PROFILE": "my-profile",
        "MWAA_ENVIRONMENT": "my-environment",
        "FASTMCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

Tool Reference

Environment Management Tools

Tool

Description

Access

list-environments

List all MWAA environments in the region

Read

get-environment

Get detailed information about an environment

Read

create-environment

Create a new MWAA environment

Write

update-environment

Update an existing MWAA environment

Write

delete-environment

Delete an MWAA environment

Write

Airflow Tools

Tool

Description

Access

list-dags

List all DAGs in an environment

Read

get-dag

Get details of a specific DAG

Read

get-dag-source

Get the source code of a DAG by DAG ID

Read

list-dag-runs

List DAG runs for a specific DAG

Read

get-dag-run

Get details of a specific DAG run

Read

list-task-instances

List task instances for a DAG run

Read

get-task-instance

Get details of a specific task instance (supports map_index for mapped tasks)

Read

list-mapped-task-instances

List all mapped instances of a dynamically mapped task

Read

get-task-logs

Get logs for a task instance try (supports pagination for large logs)

Read

list-connections

List Airflow connections (passwords redacted)

Read

list-variables

List Airflow variables (sensitive values redacted)

Read

list-pools

List Airflow pools with slot usage (diagnoses tasks stuck in queued)

Read

get-import-errors

Get DAG import/parsing errors

Read

trigger-dag-run

Trigger a new DAG run

Write

pause-dag

Pause a DAG

Write

unpause-dag

Unpause a DAG

Write

clear-task-instances

Clear task instances for a DAG, allowing re-runs

Write

IAM Permissions

Minimum Read-only Policy

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "airflow:GetEnvironment",
        "airflow:ListEnvironments",
        "airflow:InvokeRestApi"
      ],
      "Resource": "*"
    }
  ]
}

Full Access Policy (Read + Write)

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "airflow:GetEnvironment",
        "airflow:ListEnvironments",
        "airflow:CreateEnvironment",
        "airflow:UpdateEnvironment",
        "airflow:DeleteEnvironment",
        "airflow:InvokeRestApi"
      ],
      "Resource": "*"
    }
  ]
}

Security

  • No token exposure: Unlike other MWAA tools, this server does not expose create_cli_token or create_web_login_token as tools. All Airflow API operations go through the AWS-native invoke_rest_api.

  • Password redaction: Connection passwords and extra fields are automatically redacted in responses.

  • Variable redaction: Variable values with sensitive keys (matching patterns like secret, password, token, api_key) are automatically redacted.

  • Input validation: Environment names and path parameters are validated to prevent injection.

  • Read-only by default: Write operations are disabled unless --allow-write is explicitly passed.

License

Apache-2.0

Available Tools

21 tools
clear-task-instancesA

Clear task instances for a DAG, allowing them to be re-run.

    Resets task instances to a cleared state so they can be retried. By default
    only clears failed tasks and runs in dry-run mode for safety.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        dag_run_id: Optional DAG run ID to scope the clear.
        task_ids: Optional list of task IDs to clear.
        only_failed: Only clear failed tasks (default: true).
        dry_run: Preview without clearing (default: true).
        reset_dag_runs: Set DAG runs to RUNNING (default: false).
        include_downstream: Also clear downstream tasks.
        include_upstream: Also clear upstream tasks.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the cleared (or previewed) task instances.
    

Inputs: dag_id (required), region, dry_run, task_ids, +7 more.

create-environmentA

Create a new MWAA environment.

    Creates an Amazon MWAA environment with the specified configuration. This operation
    is asynchronous — the environment status will be CREATING until ready.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name for the new environment.
        dag_s3_path: S3 path to the DAGs folder.
        execution_role_arn: IAM execution role ARN.
        source_bucket_arn: S3 bucket ARN for DAGs and plugins.
        network_configuration: VPC network configuration.
        airflow_version: Optional Airflow version.
        environment_class: Optional environment size class.
        max_workers: Optional maximum worker count.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the created environment ARN.
    

Inputs: dag_s3_path (required), environment_name (required), source_bucket_arn (required), execution_role_arn (required), +6 more.

delete-environmentA

Delete an MWAA environment.

    Permanently deletes the specified MWAA environment and all associated resources.
    This operation is irreversible and asynchronous.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name of the environment to delete.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult confirming deletion was initiated.
    

Inputs: environment_name (required), region, profile_name.

get-dagB

Get details of a specific DAG.

    Returns detailed information about a DAG including its schedule, owners,
    tags, and configuration.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with DAG details.
    

Inputs: dag_id (required), region, profile_name, environment_name.

get-dag-runA

Get details of a specific DAG run.

    Returns detailed information about a DAG run including its state, execution date,
    start date, end date, and configuration.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        dag_run_id: The DAG run identifier.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with DAG run details.
    

Inputs: dag_id (required), dag_run_id (required), region, profile_name, +1 more.

get-dag-sourceA

Get the source code of a DAG file.

    Returns the Python source code of the DAG. Works on both Airflow 2.x
    and 3.x environments: on 3.x the source is fetched by DAG ID directly;
    on 2.x the server resolves the DAG's file token first.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the DAG source code.
    

Inputs: dag_id (required), region, profile_name, environment_name.

get-environmentB

Get detailed information about an MWAA environment.

    Returns comprehensive details including environment status, Airflow version,
    execution role, network configuration, logging settings, and more.

    IMPORTANT: Use this tool instead of 'aws mwaa get-environment' CLI command.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with environment details.
    

Inputs: environment_name (required), region, profile_name.

get-import-errorsA

Get DAG import errors in an MWAA environment.

    Returns a list of import/parsing errors for DAG files. Useful for diagnosing
    why DAGs are not appearing or are broken.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with import errors.
    

Inputs: region, profile_name, environment_name.

get-task-instanceA

Get details of a specific task instance.

    Returns detailed information about a task instance including its state,
    start/end dates, duration, try number, and execution details.

    For dynamically mapped tasks, pass map_index to get a specific mapped instance.
    Without map_index, returns the parent task summary.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        dag_run_id: The DAG run identifier.
        task_id: The task identifier.
        map_index: Map index for mapped task instances (must be >= 0).
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with task instance details.
    

Inputs: dag_id (required), task_id (required), dag_run_id (required), region, +3 more.

get-task-logsA

Get logs for a specific task instance try.

    Returns the execution logs for a task instance at a specific try number.
    Useful for debugging failed or problematic task executions.

    Supports pagination for large logs via the full_content and token parameters.
    If the request times out (common with large logs >80MB), automatically retries
    with chunked mode (full_content=false) and returns the first chunk with a
    continuation token for fetching subsequent chunks.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        dag_run_id: The DAG run identifier.
        task_id: The task identifier.
        try_number: The try number (starts at 1).
        full_content: Whether to return full content or paginated chunks.
        token: Continuation token for fetching subsequent log chunks.
        map_index: Map index for mapped task instances.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the task logs.
    

Inputs: dag_id (required), task_id (required), dag_run_id (required), try_number (required), +6 more.

list-connectionsA

List Airflow connections in an MWAA environment.

    Returns a list of connections with sensitive fields (password, extra) redacted.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        limit: Maximum number of results.
        offset: Pagination offset.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the list of connections (passwords redacted).
    

Inputs: limit, offset, region, profile_name, +1 more.

list-dag-runsB

List DAG runs for a specific DAG.

    Returns a list of DAG runs with their execution dates, states, and run IDs.
    Results are sorted by execution date descending (newest first) by default.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        limit: Maximum number of results.
        offset: Pagination offset.
        state: Filter by run state.
        order_by: Sort order (default: "-execution_date", newest first).
        execution_date_gte: Filter runs on or after this date (ISO 8601).
        execution_date_lte: Filter runs on or before this date (ISO 8601).
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the list of DAG runs.
    

Inputs: dag_id (required), limit, state, offset, +6 more.

list-dagsA

List all DAGs in an MWAA environment.

    Returns a list of DAGs with their metadata including DAG ID, description,
    schedule interval, paused status, and more.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        limit: Maximum number of results.
        offset: Pagination offset.
        paused: Filter by paused status.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the list of DAGs.
    

Inputs: limit, offset, paused, region, +2 more.

list-environmentsA

List all MWAA environments in the specified region.

    Returns a list of environment names available in your AWS account for the given region.
    Use get-environment to retrieve detailed information about a specific environment.

    IMPORTANT: Use this tool instead of 'aws mwaa list-environments' CLI command.

    Args:
        ctx: The MCP context.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with list of environment names.
    

Inputs: region, profile_name.

list-mapped-task-instancesA

List all mapped instances for a dynamically mapped task.

    Returns all mapped task instances for a task that uses Airflow's dynamic
    task mapping (expand()). Each instance includes its map_index, state,
    start/end times, and execution details.

    Use this to discover which map indices exist and their states before
    fetching logs with get-task-logs or details with get-task-instance.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        dag_run_id: The DAG run identifier.
        task_id: The mapped task identifier.
        limit: Maximum number of mapped instances to return.
        offset: Number of mapped instances to skip for pagination.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the list of mapped task instances.
    

Inputs: dag_id (required), task_id (required), dag_run_id (required), limit, +4 more.

list-task-instancesA

List task instances for a specific DAG run.

    Returns all task instances within a DAG run, including their states,
    start/end times, and execution details.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        dag_run_id: The DAG run identifier.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the list of task instances.
    

Inputs: dag_id (required), dag_run_id (required), region, profile_name, +1 more.

list-variablesA

List Airflow variables in an MWAA environment.

    Returns a list of Airflow variables with their keys and values.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        limit: Maximum number of results.
        offset: Pagination offset.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the list of variables.
    

Inputs: limit, offset, region, profile_name, +1 more.

pause-dagA

Pause a DAG.

    Sets the DAG's paused status to true, preventing new scheduled runs.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier to pause.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult confirming the DAG was paused.
    

Inputs: dag_id (required), region, profile_name, environment_name.

trigger-dag-runA

Trigger a new DAG run.

    Creates a new DAG run for the specified DAG. Optionally pass configuration
    and a logical date.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier to trigger.
        conf: Optional configuration dict for the DAG run.
        logical_date: Optional logical date in ISO 8601 format.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the triggered DAG run details.
    

Inputs: dag_id (required), conf, region, logical_date, +2 more.

unpause-dagA

Unpause a DAG.

    Sets the DAG's paused status to false, allowing scheduled runs to resume.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier to unpause.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult confirming the DAG was unpaused.
    

Inputs: dag_id (required), region, profile_name, environment_name.

update-environmentA

Update an existing MWAA environment.

    Updates the specified MWAA environment configuration. Only provided parameters
    will be updated. This operation is asynchronous.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name of the environment to update.
        airflow_version: Optional new Airflow version.
        environment_class: Optional new environment class.
        max_workers: Optional new max workers.
        dag_s3_path: Optional new DAG S3 path.
        execution_role_arn: Optional new execution role ARN.
        source_bucket_arn: Optional new source bucket ARN.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the update confirmation.
    

Inputs: environment_name (required), region, dag_s3_path, max_workers, +5 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 21 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action (e.g., get-environment vs list-environments, get-dag vs get-dag-source, list-task-instances vs get-task-instance). There is no meaningful overlap or ambiguity between tool purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb-object pattern with hyphens (e.g., get-environment, list-dag-runs, trigger-dag-run). Even multi-word resources like 'dag-run' and 'task-instance' are consistently hyphenated, and verbs are uniform (get, list, create, update, delete, pause, unpause, clear, trigger).

    Tool Count4/5

    21 tools is slightly on the heavy side but still within a reasonable range for a comprehensive MWAA/Airflow management server. The tool count reflects the many resource types (environments, DAGs, runs, tasks, logs, connections, variables) that need coverage.

    Completeness3/5

    Environment CRUD, DAG listing/triggering/pausing, and run/task/log read operations are well covered. However, there are notable gaps: connections and variables only have list operations with no get/create/update/delete, and DAG runs lack a direct clear/delete operation (though clear-task-instances partially fills this). This leaves some Airflow management workflows incomplete.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      maintenance
      Monitor and manage Apache Airflow clusters through natural language queries via MCP tools: DAG inspection, task monitoring, health checks, and cluster analytics without API complexity. * Guide: https://call518.medium.com/mcp-airflow-api-a-model-context-protocol-mcp-server-for-apache-airflow-5dfdfb2
      53
      54
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      An MCP server that enables AI assistants to interact with Apache Airflow's REST API for DAG management, task monitoring, and system diagnostics. It provides comprehensive tools for triggering workflows, retrieving logs, and inspecting system health across Airflow 2.x and 3.x versions.
      31
      13
      Apache 2.0
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server that wraps the Apache Airflow REST API, enabling clients to manage DAGs, monitor task instances, and handle workflows through a standardized interface. It provides comprehensive access to Airflow features including DAG runs, variables, connections, and XComs.
      MIT