What This Guide Covers
This is a step-by-step architecture and implementation blog to build an AI-powered FinOps system on AWS using official or supported MCP servers, without writing custom boto3 code or scripts.
We’ll walk through:
Choosing and deploying the right MCP servers
Wiring them into a single intelligent layer
Letting AI agents query cost, usage, pricing, and optimization data
Real prompts and architecture patterns
Outcome: You can ask Claude or Amazon Q:
“Which services had the highest cost increase over the last quarter?”
“What’s the hourly price ofr6g.large
inap-south-1
right now?”
“Do I have underutilized EC2 reservations?”
And get back live, structured responses from your real AWS accounts.
The Stack (No Custom Code Required)
Layer | Tools/Services Used |
---|---|
AI Agent | Claude, Amazon Q, Cursor |
MCP Connectors | AWS Pricing MCP |
AWS API MCP Server Cost Explorer MCP Server |
| Data Sources | CUR (via Athena), Cost Explorer, Budgets, Pricing API |
| Permissions & IAM | IAM Role for MCP agents (Read-only) |
| Optional Dashboard | Streamlit, VS Code UI, or CLI |
MCP Servers You Will Use
1. AWS Pricing MCP Server
Purpose: Live price queries for any AWS service/SKU/region
Repo: github.com/awslabs/aws-pricing-mcp-server
Example Prompt:
“What is the hourly rate of
m5.4xlarge
ineu-central-1
with Linux on-demand?”
2. AWS API MCP Server
Purpose: Exposes AWS service documentation, CLI syntax, parameter structure
Use case: Helps LLM reason through what APIs exist and how they can be used
Example Prompt:
“How do I list EC2 volumes and their sizes using the AWS CLI?”
3. Cost Explorer MCP Server
Purpose: Surface high-level usage and cost insights from Cost Explorer
Features:
Filter by service, time, account, tag
Summarize costs by dimension
Built-in natural language routing
Example Prompt:
“Show me EC2 cost trend for ap-south-1 over the last 3 months”
“Which account had the highest spend growth between Q1 and Q2?”
Deploying MCP Servers
Step 1: Clone and Run the Official MCP Servers
All servers are containerized and work with Claude/Amazon Q clients.
Run Pricing MCP:
docker run -p 5000:5000 ghcr.io/awslabs/aws-pricing-mcp-server
🐳 Run AWS API MCP:
docker run -p 5001:5000 ghcr.io/awslabs/aws-api-mcp-server
Run Cost Explorer MCP:
docker run -p 5002:5000 ghcr.io/ravikiranvm/aws-cost-explorer-mcp-server
🛡 For security: mount an AWS profile or use environment variables with read-only permissions.
IAM Role Setup
You need an IAM role or user that allows:
{
"Effect": "Allow",
"Action": [
"ce:GetCostAndUsage",
"ce:GetReservationUtilization",
"pricing:*",
"servicequotas:*"
],
"Resource": "*"
}
Use this in an AWS profile like
ai-finops-role
and configure each MCP container to use this.
How the AI Workflow Works (No Boto3)
User Prompt → Agent → MCP Server → Result
Here’s what actually happens:
Prompt | Routed To | Returned |
---|---|---|
“How much did Lambda cost in June in us-west-2?” | Cost Explorer MCP | JSON summary by service, region |
“What is the on-demand price of c7g.xlarge in Mumbai?” | Pricing MCP | Live price w/ region, offering class |
“Do I have unused EC2 RIs?” | Cost Explorer MCP | RI utilization metrics |
“How do I list S3 buckets?” | AWS API MCP | CLI syntax & docs |
No glue code. No API wrappers. All managed through the MCP interfaces.
Real Prompt Examples
Use Case | Prompt |
---|---|
Cost trend | “Show EC2 spend trend over last 6 months in ap-south-1” |
Tag filter | “Give me costs for resources with tag project:alpha in May” |
Optimization | “Which account had low RI utilization last month?” |
Forecast | “What’s the projected spend for July 2025?” |
Live pricing | “Current spot and on-demand prices for r6i.large in us-east-1” |
API syntax | “How to call GetCostAndUsage from AWS CLI?” |
🛡 Security Notes
No write permissions needed
Every MCP server logs requests to local console for audit
Optional: Run servers inside secure ECS cluster with endpoint routing
🧩 Optional: Frontend or CLI Integration
You can plug your MCP stack into:
Claude Desktop or Claude API Agent
Amazon Q Developer CLI
Internal VS Code Extension
Streamlit-based frontend for FinOps stakeholders
If you want, I can help build these on top—zero boto3 required.
✅ Summary
What You Get | How |
---|---|
Live AWS pricing insights | Pricing MCP |
Cost trends, breakdowns | Cost Explorer MCP |
API reasoning, CLI help | AWS API MCP |
No code, no wrappers | Fully MCP-based |
AI-ready prompts | Via Claude / Q / any LLM with MCP plugin support |