AWS Well-Architected Framework MCP Server
This project provides an MCP (Model Context Protocol) server that offers guidance based on AWS Well-Architected Frameworkβs six pillars: Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, and Sustainability.
Prerequisites
- Python 3.10 or higher
- pip (Python package installer)
Installation
- Clone the repository:
git clone https://github.com/aws-samples/aws-well-architected-mcp.git
cd aws-well-architected-mcp
- Create and activate a virtual environment:
# Create virtual environment
python -m venv venv
# Activate on Windows
.\venv\Scripts\activate
# Activate on macOS/Linux
source venv/bin/activate
- Install the package and dependencies:
pip install -e .
Running the Server
Start the MCP server:
mcp dev src/well_architected/server.py
The server will start and listen on port 3001 by default.
Available Endpoints
Resources
pillars://list
- Lists all AWS Well-Architected Framework pillarspillar://{name}
- Gets detailed information about a specific pillar (e.g., security, reliability)
Tools
analyze_architecture
- Analyzes an architecture description and provides recommendations based on the Well-Architected Framework
Prompts
review_architecture
- Provides a template for gathering architecture information
Testing the Endpoints
You can test the endpoints using curl:
# List all pillars
curl http://localhost:3001/resource/pillars://list
# Get details about a specific pillar
curl http://localhost:3001/resource/pillar://security
# Use the analyze tool
curl -X POST http://localhost:3001/tool/analyze_architecture \
-H "Content-Type: application/json" \
-d '{"description": "My architecture uses EC2 instances in a single AZ with an RDS database"}'
# Get the review prompt
curl http://localhost:3001/prompt/review_architecture
Project Structure
aws-well-architected-mcp/
βββ pyproject.toml
βββ src/
βββ well_architected/
βββ __init__.py
βββ server.py
βββ data/
βββ __init__.py
βββ pillars.py
Last updated on