Basic information
About Terraform Registry MCP Server
Integrate Terraform Registry with infrastructure as code tools for seamless provider lookup, module recommendations, and easy resource management.
Terraform Registry is a MCP server in the Cloud Infrastructure category listed in the AddMCP.net directory, published by thrashr888. It exposes 10 tools, including providerDetails, resourceUsage, moduleSearch, listDataSources and more. Supported transport: stdio, streamable-http. Runtime: TypeScript. License: MIT. The repository has 119 GitHub stars. Source code is hosted on github.com. Related topics: api-tools, cloud-infrastructure, community, developer-tools, mcp-server.
Setup
{
"mcpServers": {
"terraform-registry": {
"command": "npx",
"args": [
"-y",
"terraform-mcp-server"
]
}
}
}
{
"mcpServers": {
"terraform-registry": {
"command": "npx",
"args": [
"-y",
"terraform-mcp-server"
]
}
}
}
{
"servers": {
"terraform-registry": {
"command": "npx",
"args": [
"-y",
"terraform-mcp-server"
]
}
}
}
Terraform Registry MCP Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"terraform-registry": {
"command": "npx",
"args": [
"-y",
"terraform-mcp-server"
]
}
}
}
Terraform Registry MCP Server tools
- providerDetails — Get detailed information about a Terraform provider by name and optionally version.
- resourceUsage — Get an example usage of a Terraform resource and related resources.
- moduleSearch — Search for and recommend Terraform modules based on a query.
- listDataSources — List all available data sources for a provider and their basic details.
- resourceArgumentDetails — Fetches comprehensive details about a specific resource type's arguments, including required and optional attributes, nested blocks, and their descriptions.
- moduleDetails — Retrieves detailed metadata for a Terraform module including versions, inputs, outputs, and dependencies.
- functionDetails — Get details about a Terraform provider function.
- providerGuides — List and view provider-specific guides, including version upgrades and feature guides.
- policySearch — Search for policy libraries in the Terraform Registry.
- policyDetails — Get detailed information about a specific policy library including its latest version.
Overview
What is Terraform Registry?
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?
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
- 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
- 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
Frequently asked questions
1 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.
2 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.
3 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.
4 What transport does the server use?
It uses stdio transport for MCP communication.
5 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.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In