Terraform Registry MCP Server
@MCP-Mirror
Mirror of
Overview
What is Terraform Registry MCP Server?
A Model Context Protocol (MCP) server that provides tools for interacting with the Terraform Registry API. It enables AI agents to query provider information, resource details, and module metadata, and optionally integrates with Terraform Cloud for workspace and run management.
How to use Terraform Registry MCP Server?
Install and run via npx -y terraform-mcp-server. Configure in Cursor by adding a command‑type MCP server, or in Claude Desktop by editing claude_desktop_config.json. The server runs using stdio transport and can be customised with environment variables.
Key features of Terraform Registry MCP Server
- Query provider details, resource usage, and module search
- List provider data sources, functions, and guides
- Fetch comprehensive resource argument details
- Search and view policy libraries in the Terraform Registry
- Manage Terraform Cloud workspaces, runs, and organizations
- Provides prompts for migration, resource scaffolding, and optimisation
Use cases of Terraform Registry MCP Server
- AI‑assisted Terraform provider and module discovery
- Automating Terraform Cloud workspace and run management
- Generating resource skeletons and migrating infrastructure across clouds
- Analysing provider version upgrades and breaking changes
- Troubleshooting run failures with contextual guidance
FAQ from Terraform Registry MCP Server
What tools does the server provide?
It offers core registry tools (e.g., providerDetails, resourceUsage, moduleSearch) and Terraform Cloud tools (e.g., listOrganizations, createRun, lockWorkspace). A full tool list is available in the README.
Does it require authentication?
Public Terraform Registry tools do not need authentication. Terraform Cloud tools require a Terraform Cloud API token set via the TFC_TOKEN environment variable.
Is there a known issue with prompts?
Yes – the getPrompt method may cause server crashes. It is recommended to use listPrompts to see available prompts but avoid direct getPrompt calls until the issue is resolved.
What transport does the server use?
It uses stdio transport for MCP communication.
How can I configure the server?
Via environment variables: TERRAFORM_REGISTRY_URL, DEFAULT_PROVIDER_NAMESPACE, LOG_LEVEL, REQUEST_TIMEOUT_MS, RATE_LIMIT_ENABLED, RATE_LIMIT_REQUESTS, RATE_LIMIT_WINDOW_MS, and TFC_TOKEN. Defaults are documented in the README.