Infracost MCP Server

MCP server for Infracost CLI integration - cloud cost estimates for Infrastructure as Code

Local serverstdioTypeScript

What is the Infracost MCP Server?

MCP server for Infracost CLI integration - cloud cost estimates for Infrastructure as Code

What you get

A Model Context Protocol (MCP) server for running the Infracost CLI to estimate, compare, and publish infrastructure cost changes from Terraform and other Infrastructure as Code projects.

This server provides eight MCP tools across estimation, reporting, collaboration, and operations workflows:

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
resourceTypes["aws_lambda_function", "aws_s3_bucket", "aws_dynamodb_table"]
outputFilePath./infracost-usage.json
includeGuidancetrue
infracost_breakdown
infracost_diff
infracost_output
infracost_comment
infracost_upload
infracost_configure
infracost_auth
infracost_generate_usageGenerates an Infracost usage file with sensible defaults for specified resource types. This is a utility tool that complements infracost_configure by providing pre-filled templates you can customize for your workloads. R

How to install the Infracost MCP Server

{
  "mcpServers": {
    "infracost": {
      "command": "npx",
      "args": ["-y", "npm"],
      "env": {
        "INFRACOST_BINARY_PATH": "your-value",
        "INFRACOST_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
INFRACOST_BINARY_PATHFilesystem location the server is allowed to use.Optional
INFRACOST_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • “Use Infracost to resourceTypes.”
  • “Use Infracost to outputFilePath.”
  • “Use Infracost to includeGuidance.”

Frequently asked questions

MCP server for Infracost CLI integration - cloud cost estimates for Infrastructure as Code Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.