// may the 4th be with you⚔️
cloud-infrastructuredeveloper-tools

Terraform Registry

by thrashr888

Integrate Terraform Registry with infrastructure as code tools for seamless provider lookup, module recommendations, and

Integrates with the Terraform Registry API to enable provider lookup, resource usage examples, module recommendations, and schema details retrieval for infrastructure-as-code development.

github stars

119

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

No API key needed10+ registry toolsArchived in favor of official HashiCorp version

best for

  • / DevOps engineers writing Terraform configurations
  • / Infrastructure developers exploring new providers
  • / Teams standardizing on Terraform modules

capabilities

  • / Search for Terraform modules and policies
  • / Get provider details and documentation
  • / Retrieve resource usage examples
  • / List data sources for providers
  • / Get resource argument specifications
  • / Access provider upgrade guides

what it does

Connects to the Terraform Registry API to look up provider details, resource examples, module recommendations, and schema information for infrastructure-as-code projects.

about

Terraform Registry is a community-built MCP server published by thrashr888 that provides AI assistants with tools and capabilities via the Model Context Protocol. Integrate Terraform Registry with infrastructure as code tools for seamless provider lookup, module recommendations, and It is categorized under cloud infrastructure, developer tools. This server exposes 10 tools that AI clients can invoke during conversations and coding sessions.

how to install

You can install Terraform Registry in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport. This server supports remote connections over HTTP, so no local installation is required.

license

MIT

Terraform Registry is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Terraform Registry MCP Server

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.

[!IMPORTANT] This project was used as a PoC for a new official Terraform MCP server. This repo has been archived in favor of that one.

Installation

Installing in Cursor

To install and use this MCP server in Cursor:

  1. In Cursor, open Settings (⌘+,) and navigate to the "MCP" tab.

  2. Click "+ Add new MCP server."

  3. Enter the following:

    • Name: terraform-registry
    • Type: command
    • Command: npx -y terraform-mcp-server
  4. Click "Add" then scroll to the server and click "Disabled" to enable the server.

  5. Restart Cursor, if needed, to ensure the MCP server is properly loaded.

terraform-registry MCP settings for Cursor

Installing in Claude Desktop

To install and use this MCP server in Claude Desktop:

  1. In Claude Desktop, open Settings (⌘+,) and navigate to the "Developer" tab.

  2. Click "Edit Config" at the bottom of the window.

  3. Edit the file (~/Library/Application Support/Claude/claude_desktop_config.json) to add the following code, then Save the file.

{
  "mcpServers": {
    "terraform-registry": {
      "command": "npx",
      "args": ["-y", "terraform-mcp-server"]
    }
  }
}
  1. Restart Claude Desktop to ensure the MCP server is properly loaded.

Tools

The following tools are available in this MCP server:

Core Registry Tools

ToolDescription
providerDetailsGets detailed information about a Terraform provider
resourceUsageGets example usage of a Terraform resource and related resources
moduleSearchSearches for and recommends Terraform modules based on a query
listDataSourcesLists all available data sources for a provider and their basic details
resourceArgumentDetailsFetches comprehensive details about a resource type's arguments
moduleDetailsRetrieves detailed metadata for a Terraform module
functionDetailsGets details about a Terraform provider function
providerGuidesLists and views provider-specific guides and documentation
policySearchSearches for policy libraries in the Terraform Registry
policyDetailsGets detailed information about a specific policy library

Terraform Cloud Tools

These tools require a Terraform Cloud API token (TFC_TOKEN):

ToolDescription
listOrganizationsLists all organizations the authenticated user has access to
privateModuleSearchSearches for private modules in an organization
privateModuleDetailsGets detailed information about a private module
explorerQueryQueries the Terraform Cloud Explorer API to analyze data
listWorkspacesLists workspaces in an organization
workspaceDetailsGets detailed information about a specific workspace
lockWorkspaceLocks a workspace to prevent runs
unlockWorkspaceUnlocks a workspace to allow runs
listRunsLists runs for a workspace
runDetailsGets detailed information about a specific run
createRunCreates a new run for a workspace
applyRunApplies a run that's been planned
cancelRunCancels a run that's in progress
listWorkspaceResourcesLists resources in a workspace

Resources

The MCP server supports the following resource URIs for listing and reading via the resources/* methods:

Resource TypeExample URI(s)Description
Providersterraform:providersList all namespaces/providers
terraform:provider:<namespace>/<name>Get details for a specific provider
Provider Versionsterraform:provider:<namespace>/<name>/versionsList available versions for a provider
Provider Resourcesterraform:provider:<namespace>/<name>/resourcesList resources for a provider
terraform:resource:<namespace>/<name>/<resource_name>Get details for a specific resource type
Provider Data Sourcesterraform:provider:<namespace>/<name>/dataSourcesList data sources for a provider
terraform:dataSource:<namespace>/<name>/<data_source_name>Get details for a specific data source
Provider Functionsterraform:provider:<namespace>/<name>/functionsList functions for a provider
terraform:function:<namespace>/<name>/<function_name>Get details for a specific function

The server also supports resources/templates/list to provide templates for creating:

  • terraform:provider
  • terraform:resource
  • terraform:dataSource

Prompts

The following prompts are available for generating contextual responses:

PromptDescriptionRequired Arguments
migrate-cloudsGenerate Terraform code to migrate infrastructure between cloud providerssourceCloud, targetCloud, terraformCode
generate-resource-skeletonHelps users quickly scaffold new Terraform resources with best practicesresourceType
optimize-terraform-moduleProvides actionable recommendations for improving Terraform codeterraformCode
migrate-provider-versionAssists with provider version upgrades and breaking changesproviderName, currentVersion, targetVersion, terraformCode (optional)
analyze-workspace-runsAnalyzes recent run failures and provides troubleshooting guidance for Terraform Cloud workspacesworkspaceId, runsToAnalyze (optional, default: 5)

Known Issues with Prompts

Note: There is a known issue with the getPrompt functionality that can cause server crashes. The server properly registers prompts and can list them, but direct requests using the getPrompt method may cause connectivity issues. This is being investigated and may be related to SDK compatibility or implementation details. Until resolved, use listPrompts to see available prompts but avoid direct getPrompt calls.

Running the Server

The server runs using stdio transport for MCP communication:

npm install
npm start

Configuration with Environment Variables

The server can be configured using environment variables:

Environment VariableDescriptionDefault Value
TERRAFORM_REGISTRY_URLBase URL for Terraform Registry APIhttps://registry.terraform.io
DEFAULT_PROVIDER_NAMESPACEDefault namespace for providershashicorp
LOG_LEVELLogging level (error, warn, info, debug)info
REQUEST_TIMEOUT_MSTimeout for API requests in milliseconds10000
RATE_LIMIT_ENABLEDEnable rate limiting for API requestsfalse
RATE_LIMIT_REQUESTSNumber of requests allowed in time window60
RATE_LIMIT_WINDOW_MSTime window for rate limiting in milliseconds60000
TFC_TOKENTerraform Cloud API token for private registry access (optional)

Example usage with environment variables:

# Set environment variables
export LOG_LEVEL="debug"
export REQUEST_TIMEOUT_MS="15000"
export TFC_TOKEN="your-terraform-cloud-token"

# Run the server
npm start

Testing

See the TESTS.md file for information about testing this project.

FAQ

What is the Terraform Registry MCP server?
Terraform Registry is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Terraform Registry?
This profile displays 53 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.7 out of 5—verify behavior in your own environment before production use.

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
MCP server reviews

Ratings

4.753 reviews
  • Shikha Mishra· Dec 16, 2024

    Terraform Registry is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.

  • Emma Jackson· Dec 16, 2024

    Terraform Registry has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Emma Abbas· Dec 8, 2024

    Terraform Registry is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.

  • Alexander Singh· Nov 27, 2024

    Useful MCP listing: Terraform Registry is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Yash Thakker· Nov 19, 2024

    I recommend Terraform Registry for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Rahul Santra· Nov 7, 2024

    Useful MCP listing: Terraform Registry is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Zara Tandon· Nov 7, 2024

    We evaluated Terraform Registry against two servers with overlapping tools; this profile had the clearer scope statement.

  • Pratham Ware· Oct 26, 2024

    Terraform Registry reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Tariq Thompson· Oct 26, 2024

    Terraform Registry is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Alexander Jain· Oct 18, 2024

    Terraform Registry reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

showing 1-10 of 53

1 / 6