A Model Context Protocol (MCP) server that provides tools for interacting with the Terraform Registry API, enabling AI agents to query provider information, resource details, module metadata, and Terraform Cloud resources. Current stable version is v0.13.0, actively maintained. Key differentiators include a comprehensive set of tools for both public registry (providerDetails, resourceUsage, moduleSearch) and Terraform Cloud (workspaces, runs, organizations), with standardized tool naming and Docker support. Alternatives like terraform-mcp or official Terraform APIs offer more limited scope or require custom integration.
npm install terraform-mcp-serverVerified import paths — ran on the pinned version, not inferred.
Shows how to run the MCP server from CLI with npx and programmatically import and connect it with a transport.
Update tool names to new standardized patterns: e.g., use 'moduleSearch' instead of 'searchModules'.
Use 'resourceUsage' tool for example configurations instead.
Use 'resourceArgumentDetails' tool to get resource argument details.
Set TFC_TOKEN environment variable before starting the server.
Ensure your MCP client supports protocol version 2024-11-05; update client SDK if needed.
Implement client-side rate limiting or exponential backoff; consider caching frequent queries locally.
Use ESM import syntax (import ... from 'terraform-mcp-server') or run via npx (npx terraform-mcp-server) without local install.
Ensure default import: import terraformMcpServer from 'terraform-mcp-server'; (without braces).
Set TFC_TOKEN to your Terraform Cloud API token: export TFC_TOKEN='your_token_here' or pass in config.tfcToken if supported.
Use new standardized names: 'moduleSearch' instead of 'searchModules'; 'resourceUsage' instead of 'exampleConfigGenerator'.
No dependency data recorded yet.