Infracost · Capability

Infracost Cloud Pricing API

The Infracost Cloud Pricing API provides programmatic access to cloud cost estimation for Terraform plans. The Plan JSON API exposes breakdown and diff endpoints used by the Infracost CLI and CI/CD integrations to surface cost breakdowns and changes directly inside pull requests.

Run with Naftiko InfracostAPI

What You Can Do

POST
Generatebreakdown — Generate Cost Breakdown
/breakdown
POST
Generatediff — Generate Cost Diff
/diff

MCP Tools

generatebreakdown

Generate Cost Breakdown

generatediff

Generate Cost Diff

Capability Spec

infracost-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Infracost Cloud Pricing API
  description: The Infracost Cloud Pricing API provides programmatic access to cloud cost estimation for Terraform plans.
    The Plan JSON API exposes breakdown and diff endpoints used by the Infracost CLI and CI/CD integrations to surface cost
    breakdowns and changes directly inside pull requests.
  tags:
  - Infracost
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: infracost
    baseUri: https://pricing.api.infracost.io
    description: Infracost Cloud Pricing API HTTP API.
    authentication:
      type: apikey
      in: header
      name: x-api-key
      value: '{{INFRACOST_TOKEN}}'
    resources:
    - name: breakdown
      path: /breakdown
      operations:
      - name: generatebreakdown
        method: POST
        description: Generate Cost Breakdown
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: diff
      path: /diff
      operations:
      - name: generatediff
        method: POST
        description: Generate Cost Diff
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: infracost-rest
    description: REST adapter for Infracost Cloud Pricing API.
    resources:
    - path: /breakdown
      name: generatebreakdown
      operations:
      - method: POST
        name: generatebreakdown
        description: Generate Cost Breakdown
        call: infracost.generatebreakdown
        outputParameters:
        - type: object
          mapping: $.
    - path: /diff
      name: generatediff
      operations:
      - method: POST
        name: generatediff
        description: Generate Cost Diff
        call: infracost.generatediff
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: infracost-mcp
    transport: http
    description: MCP adapter for Infracost Cloud Pricing API for AI agent use.
    tools:
    - name: generatebreakdown
      description: Generate Cost Breakdown
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: infracost.generatebreakdown
      outputParameters:
      - type: object
        mapping: $.
    - name: generatediff
      description: Generate Cost Diff
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: infracost.generatediff
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    INFRACOST_TOKEN: INFRACOST_TOKEN