Terraform Registry

v1.0.0Developer Toolsstable

Enables AI assistants to search and retrieve information about Terraform providers and modules from the public Terraform registry, including detailed documentation, version information, and resource specifications.

terraform-registry-mcp-servermcpai-integration
Share:
120
Stars
0
Downloads
0
Weekly
0/5

What is Terraform Registry?

Terraform Registry is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai assistants to search and retrieve information about terraform providers and modules from the public terraform registry, including detailed documentation, version information, and resource s...

Enables AI assistants to search and retrieve information about Terraform providers and modules from the public Terraform registry, including detailed documentation, version information, and resource specifications.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables AI assistants to search and retrieve information abo

Use Cases

Search and retrieve Terraform providers and modules from the public registry.
Access detailed documentation, versions, and resource specifications for Terraform.
Reference and integrate Terraform modules and providers into your infrastructure code.
thrashr888

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedApr 7, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx terraform-registry-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Terraform Registry

Terraform Registry MCP Server gives AI assistants direct, structured access to the public Terraform Registry, exposing 10 read-only tools for searching providers, retrieving resource documentation, inspecting module details, and listing data sources and functions. An additional 13 Terraform Cloud tools (activated with a TFC_TOKEN) enable live workspace management, run execution, and infrastructure state queries. Platform engineers and DevOps teams use it to let Claude look up accurate provider resource arguments and write correct Terraform configurations without having to paste docs into the conversation.

Prerequisites

  • Node.js 18 or later
  • An MCP-compatible client such as Claude Desktop, Claude Code, or Cursor
  • A Terraform Cloud API token (TFC_TOKEN) only if you need the workspace management tools — the registry read tools work without authentication
1

Add the server to your MCP client configuration

No global installation is required. Add the server directly to your MCP client config using npx. It will be downloaded and started on demand.

{
  "mcpServers": {
    "terraform-registry": {
      "command": "npx",
      "args": ["-y", "terraform-mcp-server"]
    }
  }
}
2

Add a Terraform Cloud token for workspace management (optional)

To unlock the 13 Terraform Cloud tools (list workspaces, create runs, apply, cancel, etc.), add your TFC_TOKEN to the server's environment block.

{
  "mcpServers": {
    "terraform-registry": {
      "command": "npx",
      "args": ["-y", "terraform-mcp-server"],
      "env": {
        "TFC_TOKEN": "your-terraform-cloud-token",
        "DEFAULT_PROVIDER_NAMESPACE": "hashicorp"
      }
    }
  }
}
3

Restart your MCP client

Quit and relaunch Claude Desktop or reload your editor. The Terraform Registry server will start automatically and the registry tools will appear in the tool list.

4

Verify by searching for a provider

Ask your AI assistant to look up the AWS provider documentation. A successful response will return the provider namespace, version, and resource list from the live Terraform Registry API.

5

Configure optional rate limiting

For shared team environments or CI usage, enable rate limiting via environment variables to avoid hitting registry API limits.

RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=60
RATE_LIMIT_WINDOW_MS=60000

Terraform Registry Examples

Client configuration (with Terraform Cloud)

Claude Desktop config for Terraform Registry MCP Server with both registry and Terraform Cloud access enabled.

{
  "mcpServers": {
    "terraform-registry": {
      "command": "npx",
      "args": ["-y", "terraform-mcp-server"],
      "env": {
        "TFC_TOKEN": "your-terraform-cloud-token",
        "DEFAULT_PROVIDER_NAMESPACE": "hashicorp",
        "LOG_LEVEL": "info",
        "REQUEST_TIMEOUT_MS": "10000"
      }
    }
  }
}

Prompts to try

Example prompts that leverage the Terraform Registry and Terraform Cloud tools.

- "Show me the arguments for the aws_s3_bucket resource in the hashicorp/aws provider."
- "Find Terraform modules for deploying a Kubernetes cluster on GCP."
- "List all data sources available in the azurerm provider."
- "What version of the kubernetes provider supports the kubernetes_deployment resource?"
- "List all workspaces in my Terraform Cloud organization and show which ones are locked."

Troubleshooting Terraform Registry

Terraform Cloud tools return 'TFC_TOKEN not set' or authorization errors

Add the TFC_TOKEN environment variable to the env block in your MCP client config. The token must have at least read access to the target organization. Generate tokens at app.terraform.io/app/settings/tokens.

Server crashes when using getPrompt

There is a known bug in getPrompt that causes crashes. Use listPrompts instead to browse available prompts, and avoid calling getPrompt directly until the issue is resolved upstream.

Registry API requests time out for large providers

Increase the REQUEST_TIMEOUT_MS environment variable (default 10000 ms). Large providers like hashicorp/aws have extensive documentation that may take longer to fetch. Setting it to 30000 (30 seconds) resolves most timeout issues.

Frequently Asked Questions about Terraform Registry

What is Terraform Registry?

Terraform Registry is a Model Context Protocol (MCP) server that enables ai assistants to search and retrieve information about terraform providers and modules from the public terraform registry, including detailed documentation, version information, and resource specifications. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Terraform Registry?

Follow the installation instructions on the Terraform Registry GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Terraform Registry?

Terraform Registry works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Terraform Registry free to use?

Yes, Terraform Registry is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "terraform-registry-mcp-server": { "command": "npx", "args": ["-y", "terraform-registry-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Terraform Registry?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides