MWAA MCP Server
Enables management of Amazon Managed Workflows for Apache Airflow (MWAA) environments and operations including DAG management, workflow execution monitoring, and access to Airflow connections and variables through a unified interface.
README
MWAA MCP Server
Model Context Protocol (MCP) server for Amazon Managed Workflows for Apache Airflow (MWAA).
This MCP server provides comprehensive tools for managing MWAA environments and interacting with Apache Airflow through a unified interface. It enables AI assistants to help with workflow orchestration, DAG management, and operational tasks.
Features
MWAA Environment Management
- List and describe environments - View all MWAA environments and their configurations
- Create and update environments - Deploy new environments or modify existing ones
- Delete environments - Clean up unused environments
- Generate access tokens - Create CLI and web UI access tokens
Airflow Operations
- DAG Management - List, view, and trigger DAGs
- DAG Runs - Monitor and manage workflow executions
- Task Instances - Track individual task status and logs
- Connections & Variables - View Airflow connections and variables
- Import Errors - Diagnose DAG parsing issues
Expert Guidance
- Best Practices - Get MWAA and Airflow best practices
- DAG Design - Expert guidance on workflow design patterns
Prerequisites
- AWS Credentials: Configure AWS credentials with appropriate permissions for MWAA
- Python: Python 3.10 or higher
- uv: Install uv for package management (recommended)
Installation
Configuration
Environment Variables
AWS_PROFILE- AWS credential profile to use (default: uses AWS credential chain)AWS_REGION- AWS region for MWAA operations (default: us-east-1)MWAA_MCP_READONLY- Set to "true" for read-only modeFASTMCP_LOG_LEVEL- Logging level: ERROR, WARNING, INFO, DEBUG (default: ERROR)
MCP Client Configuration
Add to your MCP client configuration file:
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
%APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mwaa": {
"command": "uvx",
"args": ["path/to/mwaa-mcp-server"],
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1",
"MWAA_MCP_READONLY": "false",
"FASTMCP_LOG_LEVEL": "ERROR"
}
}
}
}
or docker after a successful docker build -t mwaa-mcp-server .:
{
"mcpServers": {
"mwaa": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"--env",
"AWS_PROFILE=your-profile",
"--env",
"AWS_REGION=us-east-1",
"--env",
"MWAA_MCP_READONLY=false",
"--env",
"FASTMCP_LOG_LEVEL=ERROR",
"-v",
"~/.aws:/home/app/.aws:ro",
"mwaa-mcp-server:latest"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
Other MCP Clients
Refer to your MCP client's documentation for configuration details.
Usage Examples
Environment Management
"List all MWAA environments in my account"
"Show me details about the 'production-airflow' environment"
"Create a new MWAA environment called 'dev-airflow' with 2 schedulers"
"Update the production environment to use Airflow 2.7.2"
DAG Operations
"List all DAGs in the production environment"
"Show me the source code for the 'etl_pipeline' DAG"
"Trigger the 'daily_report' DAG with config {'date': '2024-01-01'}"
"Check the status of the latest run for 'data_processing' DAG"
Monitoring and Troubleshooting
"Show me failed DAG runs from the last 24 hours"
"Get logs for the 'extract_data' task that failed"
"List all import errors in the development environment"
"Show me all Airflow connections configured in production"
Best Practices
"What are the best practices for MWAA environment sizing?"
"How should I design a DAG for parallel data processing?"
"Give me guidance on handling errors in Airflow tasks"
Required AWS Permissions
The IAM user or role needs the following permissions:
MWAA Permissions
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"airflow:CreateCliToken",
"airflow:CreateWebLoginToken",
"airflow:GetEnvironment",
"airflow:ListEnvironments"
],
"Resource": "*"
}
]
}
Additional Permissions for Write Operations
{
"Effect": "Allow",
"Action": [
"airflow:CreateEnvironment",
"airflow:UpdateEnvironment",
"airflow:DeleteEnvironment"
],
"Resource": "*"
}
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/paschmaria/mwaa-mcp-server.git
cd mwaa-mcp-server
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in development mode with all dev dependencies
uv sync --dev
# Or using pip
pip install -r requirements-dev.txt
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=awslabs.mwaa_mcp_server
# Run specific test
pytest tests/test_tools.py::test_list_environments
Building Docker Image
# Build image
docker build -t mwaa-mcp-server .
# Run container with all environment variables
docker run -it --rm \
-e AWS_PROFILE=default \
-e AWS_REGION=us-east-1 \
-e MWAA_MCP_READONLY=false \
-e FASTMCP_LOG_LEVEL=ERROR \
-v ~/.aws:/home/app/.aws:ro \
mwaa-mcp-server
Troubleshooting
Common Issues
-
Authentication Errors
- Verify AWS credentials are configured correctly
- Check IAM permissions for MWAA operations
- Ensure the correct AWS region is specified
-
Connection Timeouts
- Check VPC and security group configurations
- Verify MWAA environment is in AVAILABLE state
- Ensure your network can reach MWAA endpoints
-
Import Errors in DAGs
- Use the
get_import_errorstool to diagnose - Check CloudWatch logs for detailed error messages
- Verify all dependencies are in requirements.txt
- Use the
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。