Skip to main content

MCP server for AWS FinOps analysis — cost investigation, idle resources, savings recommendations, and BYaML architecture generation

Project description

byaml-finops-mcp

An MCP server that gives your AI assistant the ability to investigate AWS costs, find waste, recommend savings, and generate architecture-as-code — using your own AWS account data.

Ask your AI: "Why did my AWS bill spike this month?" and get a full investigation with resource IDs, root causes, and CLI commands to fix it.

Tools

Tool What it does
get_cost_by_service Monthly costs by service, current vs previous month
get_cost_anomalies Detected cost spikes with root causes and impact
find_idle_resources EC2 instances with <5% CPU, unattached EBS volumes
get_savings_recommendations Rightsizing + Savings Plans recommendations
detect_missing_tags Resources missing required tags (owner, env, costCenter)
estimate_termination_savings Calculate exact monthly savings from terminating instances
generate_byaml_from_account Scan AWS account → generate BYaML v0.3 architecture file
validate_byaml Validate BYaML against schema + component catalog + policy rules

Install

Option A: uvx (recommended)

uvx byaml-finops-mcp

Option B: pip

pip install byaml-finops-mcp

Configure

Kiro

Add to .kiro/settings/mcp.json:

{
  "mcpServers": {
    "byaml-finops": {
      "command": "uvx",
      "args": ["byaml-finops-mcp"],
      "env": {
        "AWS_PROFILE": "your-profile"
      }
    }
  }
}

Claude Code

Add to ~/.claude/mcp.json:

{
  "mcpServers": {
    "byaml-finops": {
      "command": "uvx",
      "args": ["byaml-finops-mcp"],
      "env": {
        "AWS_PROFILE": "your-profile"
      }
    }
  }
}

Cursor

Add to MCP settings:

{
  "byaml-finops": {
    "command": "uvx",
    "args": ["byaml-finops-mcp"],
    "env": {
      "AWS_PROFILE": "your-profile"
    }
  }
}

Prerequisites

  1. AWS CLI configured (aws configure or aws sso login)
  2. uv installed (docs)
  3. IAM permissions — read-only access:
{
  "Effect": "Allow",
  "Action": [
    "ce:GetCostAndUsage",
    "ce:GetAnomalies",
    "ce:GetRightsizingRecommendation",
    "ec2:DescribeInstances",
    "ec2:DescribeVolumes",
    "cloudwatch:GetMetricStatistics",
    "tag:GetResources",
    "savingsplans:DescribeSavingsPlans",
    "lambda:ListFunctions",
    "s3:ListBuckets",
    "dynamodb:ListTables",
    "apigateway:GetRestApis",
    "cloudfront:ListDistributions",
    "rds:DescribeDBInstances"
  ],
  "Resource": "*"
}

Usage

Once configured, just ask your AI:

  • "Why did my AWS bill spike this month?"
  • "Find idle resources in my account"
  • "Which resources are missing tags?"
  • "How much would I save by terminating these instances?"
  • "Generate a BYaML architecture file from my account"
  • "Validate this BYaML file"

How it works

Your AI (Kiro / Claude Code / Cursor)
        ↓ MCP Protocol
byaml-finops-mcp server (runs locally)
        ↓ boto3
Your AWS Account (read-only)
        ↓
Cost Explorer, EC2, CloudWatch, Lambda, S3, RDS, DynamoDB
  • Local-first — runs on your machine, no data leaves your environment
  • Read-only — never modifies your AWS resources
  • Zero config — uses your existing AWS CLI profile

BYaML Integration

This server can generate and validate BYaML architecture files:

  • generate_byaml_from_account scans your AWS resources and produces a .byaml file
  • validate_byaml checks your .byaml file against the v0.3 schema, component catalog, and FinOps policy rules
  • Schema is fetched from schema.byaml.org (public API, no auth required)

Security

  • No credentials are stored by this tool
  • Uses your local AWS CLI profile/SSO session
  • All API calls are read-only
  • No data is sent to any third party
  • Schema validation fetches from schema.byaml.org (public, read-only)

Built by

Brickstore AI — AI-native cloud architecture platform

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

byaml_finops_mcp-0.1.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

byaml_finops_mcp-0.1.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file byaml_finops_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: byaml_finops_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for byaml_finops_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7e2409b8083712d4d55dc38a3c5871e6e6bc024329e48677b21fa0fbf38fb9e6
MD5 9cdaae0b79022821c2975970c3004787
BLAKE2b-256 b99fb1427a22d5f5f9ce569dba53c8cca03fa8389c21af203d68e7b4935695ef

See more details on using hashes here.

File details

Details for the file byaml_finops_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for byaml_finops_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c303e7908b47dd10012655a956137ce2a1d34d26c55b8937828c642dc39af802
MD5 102f9979d7b2a1fbc0b0bec38be15c1a
BLAKE2b-256 215d8e3a5f547d0362feda8bdecbedc5a62d16bf83e08528ec7bbecc9c443300

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page