@jadenrazo/cloudcost-mcp

general MCP Server

MCP server for multi-cloud cost analysis of Terraform codebases — supports AWS, Azure, and GCP

VerifiedInstall Ready
generalgeneralawsgcpazure
6 views0 stars0 forksv1.0.1MIT

Why This Matters

Discovered via github-topic:model-context-protocol and last synced 3mo ago.

VerifiedInstall Ready
Source
github-topic:model-context-protocol
Stars
0
Last synced
3mo ago
Install
Instructions detected

Install

1. Install the package

npx @jadenrazo/cloudcost-mcp

2. Add to claude_desktop_config.json

{
  "mcpServers": {
    "-jadenrazo-cloudcost-mcp": {
      "command": "npx",
      "args": [
        "@jadenrazo/cloudcost-mcp"
      ]
    }
  }
}

Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows)

49
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (49)

source_provider

`aws \

kubernetes

Yes

provider

`aws \

providers

`string[]`

plan_json

`string`

Storage

$48.00

CLOUDCOST_RESOLVE_MODULES

`true`

azurerm_api_management

`google_api_gateway_api`

tfvars

`string`

scenarios

`object[]`

state_json

`string`

warn_ratio

`number` (0–1)

CLOUDCOST_LOG_LEVEL

`info`

aws_eks_cluster

`azurerm_kubernetes_cluster`

focus

No

instance_type

`string`

Database

$314.64

CLOUDCOST_PRICING_MODEL

`on_demand`

aws_route53_zone

`azurerm_dns_zone`

Yes

### How this compares to Infracost Infracost is the mature choice for **Terraform-on-AWS cost estimation in CI** — PR-comment cost deltas, threshold gating, deep Terragrunt support. If that's your workflow, use it. CloudCostMCP targets a different surface: - **Agent-native via MCP.** Models call it as a tool *during* generation. `check_cost_budget` returns `allow` / `warn` / `block` with the specific blocking resources named, fast enough on a warm pricing cache for an agent to veto an expensive config before writing it to disk. - **Multi-IaC in one server.** Terraform, CloudFormation, Pulumi, Bicep/ARM — one tool, not four. - **Zero credentials.** All pricing comes from public endpoints. No account, no cloud IAM, no API keys. - **Optimization + what-if scenarios built in.** Right-sizing, reserved-pricing, cross-provider switching, and spot modeling are first-class tools. The two are complementary. Use Infracost in CI; use CloudCostMCP inside your agent or editor. --- ## Installation Requires **Node.js 20** or later. ### 60-second quick start (Claude Code) ```bash npm install -g @jadenrazo/cloudcost-mcp claude mcp add cloudcost -- cloudcost-mcp ``` Then, inside a project directory with Terraform files, ask Claude: > *"Use cloudcost to estimate the monthly AWS cost of this Terraform config, then check it against a $2000/month budget with check_cost_budget."* No API keys, no cloud credentials, no separate account. For other MCP clients (Claude Desktop, Cursor, any MCP-compatible agent), see the detailed setup below. ### All install options ```bash # From source git clone https://github.com/jadenrazo/CloudCostMCP.git cd CloudCostMCP npm install npm run build ``` ```bash # Global npm install npm install -g @jadenrazo/cloudcost-mcp ``` ```bash # One-shot, no install npx -y @jadenrazo/cloudcost-mcp ``` ### Claude Desktop Add to your Claude Desktop MCP configuration (`claude_desktop_config.json`): ```json { "mcpServers": { "cloudcost": { "command": "node", "args": ["/path/to/CloudCostMCP/dist/index.js"] } } } ``` If installed globally via npm: ```json { "mcpServers": { "cloudcost": { "command": "cloudcost-mcp" } } } ``` ### Claude Code ```bash claude mcp add cloudcost -- node /path/to/CloudCostMCP/dist/index.js ``` Or if installed globally via npm: ```bash claude mcp add cloudcost -- cloudcost-mcp ``` ### As a standalone MCP server (stdio) ```bash node dist/index.js ``` --- ## Tools The server exposes twelve MCP tools. Each accepts JSON input and returns structured JSON output. For agent-centric workflows, `check_cost_budget` is the headline tool: it returns an `allow` / `warn` / `block` verdict fast enough to be called between IaC generation and disk write — see [docs/guardrails.md](./docs/guardrails.md). ### `analyze_terraform` Parse Terraform files and return a resource inventory. Detects the cloud provider, resolves variables (including `tfvars`), and extracts cost-relevant attributes like instance types, storage sizes, and database engines.

region

`string`

Variable

Default

CLOUDCOST_GUARDRAIL_WARN_RATIO

`0.8`

Type

Required

currency

`string`

resource_type

`string`

service

`string`

files

`{path, content}[]`

budget_monthly

`number`

Parameter

Type

target_provider

`aws \

period_days

`number`

Category

AWS

CLOUDCOST_MONTHLY_HOURS

`730`

aws_ecr_repository

`azurerm_container_registry`

format

`markdown \

Compute

$1,176.48

CLOUDCOST_INCLUDE_DATA_TRANSFER

`false`

aws_secretsmanager_secret

`azurerm_key_vault`

Format

Extensions

gcp

No

Kubernetes

$72.00

CLOUDCOST_BUDGET_WARN_PCT

`80`

aws_wafv2_web_acl

`azurerm_web_application_firewall_policy`

max_monthly

`number`

CLOUDCOST_CACHE_TTL

`86400`

max_per_resource

`number`

CLOUDCOST_CACHE_PATH

`~/.cloudcost/cache.db`

aws_instance

`azurerm_virtual_machine`, `azurerm_linux_virtual_machine`