Designing an AI-Native FinOps Layer on AWS with Official MCP Servers (No Custom Code Needed)

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 of r6g.large in ap-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)

LayerTools/Services Used
AI AgentClaude, Amazon Q, Cursor
 MCP Connectors AWS Pricing MCP
pgsql
 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 in eu-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:

bash
docker run -p 5000:5000 ghcr.io/awslabs/aws-pricing-mcp-server

🐳 Run AWS API MCP:

bash
docker run -p 5001:5000 ghcr.io/awslabs/aws-api-mcp-server

Run Cost Explorer MCP:

bash
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:

json
{
"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:

PromptRouted ToReturned
“How much did Lambda cost in June in us-west-2?”Cost Explorer MCPJSON summary by service, region
“What is the on-demand price of c7g.xlarge in Mumbai?”Pricing MCPLive price w/ region, offering class
“Do I have unused EC2 RIs?”Cost Explorer MCPRI utilization metrics
“How do I list S3 buckets?”AWS API MCPCLI syntax & docs

No glue code. No API wrappers. All managed through the MCP interfaces.


Real Prompt Examples

Use CasePrompt
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 GetHow
Live AWS pricing insightsPricing MCP
Cost trends, breakdownsCost Explorer MCP
API reasoning, CLI helpAWS API MCP
No code, no wrappersFully MCP-based
AI-ready promptsVia Claude / Q / any LLM with MCP plugin support

 

Author: Ashutosh Shandilya

I am an Experienced FinOps Professional and Cloud Engineer developing Automated Processes to get the best ROI on the Cloud with innovative MO. Over the past six years, I’ve helped enterprises build FinOps practices from the ground up—designing operating models, conducting stakeholder workshops, and aligning cloud governance with real Business KPIs. I empower businesses to understand, embrace, and act on the value of cloud cost optimisation—not as a technical checkbox, but as a strategic growth lever.

Leave a Reply

Your email address will not be published. Required fields are marked *