Terraform Registry MCP Server
by thrashr888
A Model Context Protocol (MCP) server that provides tools for interacting with the Terraform Registry API. This server enables AI agents to query provider information, resource details, and module metadata.
Last updated: N/A
What is Terraform Registry MCP Server?
This is a Model Context Protocol (MCP) server designed to facilitate interactions with the Terraform Registry API. It provides a set of tools that allow AI agents to query and retrieve information about Terraform providers, resources, modules, and policies.
How to use Terraform Registry MCP Server?
The server can be installed and used within environments like Cursor and Claude Desktop by configuring it as an MCP server. It requires setting the server name, type (command), and the command to execute the server (e.g., npx -y terraform-mcp-server
). The server is then enabled and can be used to access various Terraform Registry tools and resources.
Key features of Terraform Registry MCP Server
Provides tools for querying Terraform provider details.
Offers example usage of Terraform resources and related resources.
Enables searching and recommending Terraform modules.
Supports Terraform Cloud integration for private module access and workspace management.
Use cases of Terraform Registry MCP Server
Automating Terraform code generation and optimization.
Assisting with provider version upgrades and breaking changes.
Analyzing Terraform Cloud workspace runs for troubleshooting.
Migrating infrastructure between cloud providers.
Quickly scaffolding new Terraform resources with best practices.
FAQ from Terraform Registry MCP Server
What is an MCP server?
What is an MCP server?
MCP stands for Model Context Protocol. It's a server that provides tools and information to AI agents or other applications, allowing them to interact with specific systems or APIs.
How do I install this server in Cursor?
How do I install this server in Cursor?
Open Cursor settings, navigate to the MCP tab, add a new MCP server with the specified name, type, and command (npx -y terraform-mcp-server
), enable the server, and restart Cursor.
How do I install this server in Claude Desktop?
How do I install this server in Claude Desktop?
Open Claude Desktop settings, navigate to the Developer tab, edit the config file (~/Library/Application Support/Claude/claude_desktop_config.json
) to add the MCP server configuration, and restart Claude Desktop.
What environment variables can I use to configure the server?
What environment variables can I use to configure the server?
You can use environment variables like TERRAFORM_REGISTRY_URL
, DEFAULT_PROVIDER_NAMESPACE
, LOG_LEVEL
, REQUEST_TIMEOUT_MS
, RATE_LIMIT_ENABLED
, RATE_LIMIT_REQUESTS
, RATE_LIMIT_WINDOW_MS
, and TFC_TOKEN
to configure the server's behavior.
What are the core registry tools available?
What are the core registry tools available?
The core registry tools include providerDetails
, resourceUsage
, moduleSearch
, listDataSources
, resourceArgumentDetails
, moduleDetails
, functionDetails
, providerGuides
, policySearch
, and policyDetails
.