prepare_terraformLABSCO SUMMARY
The bill, before the apply.
The failure this addresses is a demo environment that quietly specifies multi-AZ RDS and NAT gateways in three zones — correct Terraform, wrong money. Pricing the plan at authoring time turns that into a number you see before anything is applied, and the same pass catches the open security group that would otherwise ship alongside it. Only cost queries leave the machine, and only against your token. Worth knowing: security analysis is AWS-only today, so Azure and GCP configurations get the price but not the review.
What it is
A Go MCP server that adds three passes to the Terraform an assistant produces: fill in the missing providers, versions and variables so a fragment becomes runnable; flag insecure defaults such as open access and missing encryption; and price the proposed resources against Binadox's live cloud pricing data.
What you get
- Terraform snippets validated and completed — provider blocks, versions and variables added so the configuration actually runs —
prepare_terraform - Misconfiguration analysis over the generated code: open access, missing encryption at rest, short backup retention —
analyze_terraform - A monthly cloud cost breakdown for the proposed resources, from real pricing data —
calculate_cost - Output organised into logical Terraform files and modules, written under
/tmp/terraform/with a timestamp, and zipped when needed
Requirements
Terraform CLI 1.6+ installed, and a Go toolchain if you build from source (Go 1.22+). A Binadox API token is required for cost analysis: TERRAFORM_ANALYSIS_TOKEN in the client entry, with TERRAFORM_ANALYSIS_URL pointing at the Binadox pricing endpoint. Build with go build -o terraform-mcp-server *.go and give the client that binary's path. It needs write access under /tmp/terraform/ and outbound access to the pricing API; cloud credentials are never read and files are not sent anywhere. Cost data covers AWS, Azure and GCP; the security checks currently cover AWS.
Setup effort
Follow the published steps — git clone https://github.com/binadox-public/binadox-terraform-mcp
USE CASES
Seeing the monthly cost before applying
Price the resources the assistant just wrote and find out that a demo environment costs more than the project it demonstrates.
Turning a snippet into a runnable configuration
Have the missing provider block, version constraints and variables filled in so a fragment stops failing on the first plan.
Catching an insecure default before review
Run the generated code past the misconfiguration checks — open access, no encryption at rest, minimal backup retention.
Comparing two ways of building the same thing
Price both configurations and read the resource-level breakdown to see where the difference actually is.
3 tools
Listed in project docs. Your client may show a different list.
analyze_terraformcalculate_costBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation.
Requires
- Terraform CLI 1.6+
- TERRAFORM_ANALYSIS_TOKEN in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
Prerequisites: Go toolchain (1.22+ per the README compatibility table), Terraform CLI 1.6+, a valid Binadox API token, internet access to the Binadox pricing API, and write access to /tmp/terraform/...
Clone the repository and build the binary:
git clone https://github.com/binadox-public/binadox-terraform-mcp
cd binadox-terraform-mcp
go build -o terraform-mcp-server *.go
chmod +x terraform-mcp-serverAdd the Claude Desktop configuration to claude_desktop_config.json (macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json, Linux ~/.config/Claude/claude_desktop_config.json), using the absolute path of the terraform-mcp-server binary and your Binadox token
Restart your MCP client
MCP Clients
Claude Desktop
{
"mcpServers": {
"terraform": {
"command": "<YOUR_PATH_TO_TERRAFORM_MCP_SERVER>",
"env": {
"TERRAFORM_ANALYSIS_URL": "https://app.binadox.com/api/1/organizations/pricing/terraform/mcp",
"TERRAFORM_ANALYSIS_TOKEN": "<YOUR_TERRAFORM_ANALYSIS_TOKEN>"
}
}
}
}