Skip to main content
Glama

Infracost MCP Server

infracost_cloud_create_guardrail

Create cost guardrails to notify stakeholders or block pull requests when infrastructure spending exceeds defined thresholds, helping control cloud costs.

Instructions

Create cost guardrails in Infracost Cloud that notify stakeholders or block PRs when cost thresholds are exceeded. Requires INFRACOST_SERVICE_TOKEN environment variable.

Input Schema

NameRequiredDescriptionDefault
orgSlugNoOrganization slug from Infracost Cloud (defaults to INFRACOST_ORG env var)
nameYesName for the guardrail
scopeYesScope configuration
increaseThresholdNoThreshold for cost increases (monthly dollar amount)
increasePercentThresholdNoThreshold for cost increases (percentage)
totalThresholdNoThreshold for total cost (monthly dollar amount)
messageNoCustom message to display when threshold is exceeded
webhookUrlNoWebhook URL to notify when threshold is exceeded
blockPullRequestNoWhether to block PR when threshold is exceeded
commentOnPullRequestNoWhether to comment on PR when threshold is exceeded

Input Schema (JSON Schema)

{ "properties": { "blockPullRequest": { "description": "Whether to block PR when threshold is exceeded", "type": "boolean" }, "commentOnPullRequest": { "description": "Whether to comment on PR when threshold is exceeded", "type": "boolean" }, "increasePercentThreshold": { "description": "Threshold for cost increases (percentage)", "type": "number" }, "increaseThreshold": { "description": "Threshold for cost increases (monthly dollar amount)", "type": "number" }, "message": { "description": "Custom message to display when threshold is exceeded", "type": "string" }, "name": { "description": "Name for the guardrail", "type": "string" }, "orgSlug": { "description": "Organization slug from Infracost Cloud (defaults to INFRACOST_ORG env var)", "type": "string" }, "scope": { "description": "Scope configuration", "properties": { "projects": { "description": "Project names (for PROJECT scope)", "items": { "type": "string" }, "type": "array" }, "repositories": { "description": "Repository names (for REPO scope)", "items": { "type": "string" }, "type": "array" }, "type": { "description": "Scope type for the guardrail", "enum": [ "ALL_PROJECTS", "REPO", "PROJECT" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "totalThreshold": { "description": "Threshold for total cost (monthly dollar amount)", "type": "number" }, "webhookUrl": { "description": "Webhook URL to notify when threshold is exceeded", "type": "string" } }, "required": [ "name", "scope" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phildougherty/infracost_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server