Terraform Registry MCP Server

Enables AI agents to interact with the Terraform Registry API for provider, resource, and module information.

Local serverstdio 120

What is the Terraform Registry MCP server?

Most cloud and infrastructure work still happens through a UI a human drives. Terraform Registry MCP server moves it into the conversation instead. Enables AI agents to interact with the Terraform Registry API for provider, resource, and module information.

The short version

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.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • providerDetails — Gets detailed information about a Terraform provider
  • resourceUsage — Gets example usage of a Terraform resource and related resources
  • moduleSearch — Searches for and recommends Terraform modules based on a query
  • listDataSources — Lists all available data sources for a provider and their basic details
  • resourceArgumentDetails — Fetches comprehensive details about a resource type's arguments
  • moduleDetails — Retrieves detailed metadata for a Terraform module
  • functionDetails — Gets details about a Terraform provider function
  • providerGuides — Lists and views provider-specific guides and documentation
  • policySearch — Searches for policy libraries in the Terraform Registry
  • policyDetails — Gets detailed information about a specific policy library
  • listOrganizations — Lists all organizations the authenticated user has access to
  • privateModuleSearch — Searches for private modules in an organization

Getting it running

Installation goes through your MCP client rather than a global install: point it at terraform-mcp-server on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

What it needs from you

Configuration is passed through the environment: LOG_LEVEL, REQUEST_TIMEOUT_MS, TFC_TOKEN, TERRAFORM_REGISTRY_URL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

How it compares

Among the cloud and infrastructure options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Terraform Registry's toolset — providerDetails, resourceUsage, moduleSearch and 11 more — is a fair guide to whether it matches your workflow. It is maintained by thrashr888; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Terraform Registry's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Terraform Registry.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
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
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

How to install the Terraform Registry MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
LOG_LEVELConfiguration value read at startup.Optional
REQUEST_TIMEOUT_MSConfiguration value read at startup.Optional
TFC_TOKENCredential the server authenticates with.Yes
TERRAFORM_REGISTRY_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Terraform Registry to providerDetails.
  • Use Terraform Registry to resourceUsage.
  • Use Terraform Registry to moduleSearch.

Frequently asked questions

It's a Model Context Protocol (MCP) server enabling AI agents to interact with the Terraform Registry API. It provides tools for querying provider information, resource details, and module metadata.