Terraform Registry MCP Server
This server provides AI assistants with comprehensive access to the Terraform public registry, enabling search and retrieval of information about Terraform providers, modules, and documentation.
Module Capabilities
Search modules – Search for Terraform modules by name or keywords, with optional provider filtering
Get module details – Retrieve detailed information (inputs, outputs, resources) about a specific module
Get latest module version – Fetch the latest version number and published date for a module
List module versions – List all available versions of a specific module
Provider Capabilities
Search providers – Search for Terraform providers by name/keywords, with optional tier filtering (official, partner, community)
Get provider details – Retrieve detailed information about a specific provider
Get latest provider version – Fetch the latest version number and metadata for a provider
List provider versions – List all available versions of a specific provider
Documentation Capabilities
Get provider docs – Fetch full provider documentation (authentication, configuration, version notes, upgrade guides)
Get provider resource docs – Fetch complete documentation for a specific resource (arguments, attributes, examples, import instructions)
Get provider data source docs – Fetch complete documentation for a specific data source
Search provider docs – Search within provider documentation for specific errors, topics, or troubleshooting information
Provides comprehensive access to the Terraform public registry, enabling search and retrieval of information about Terraform providers, modules, versions, and documentation including resource specifications, data sources, and troubleshooting guides.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Terraform Registry MCP Server search for AWS VPC modules"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Terraform Registry MCP Server
A Model Context Protocol (MCP) server that provides comprehensive access to the Terraform public registry. This server enables AI assistants to search and retrieve information about Terraform providers, modules, and documentation.
Features
Module Tools
search_modules - Search for Terraform modules by name or keywords
get_module_details - Get detailed information about a specific module
get_latest_module_version - Get the latest version of a module
list_module_versions - List all available versions of a module
Provider Tools
search_providers - Search for Terraform providers
get_provider_details - Get detailed information about a provider
get_latest_provider_version - Get the latest version of a provider
list_provider_versions - List all available versions of a provider
get_provider_docs - Fetch full provider documentation (setup, auth, version notes)
get_provider_resource_docs - Fetch complete resource docs (args, attributes, examples)
get_provider_data_source_docs - Fetch complete data source docs
search_provider_docs - Search within provider documentation for specific errors, topics, or troubleshooting
New! Documentation tools now fetch the actual markdown content from the registry, including version-specific information, breaking changes, upgrade guides, and complete argument/attribute references.
Related MCP server: OpenTofu MCP Server
Installation
Using Docker (Recommended)
Build and run with Docker Compose:
docker-compose up -dOr build manually:
docker build -t terraform-registry-mcp-server .
docker run -d -p 3002:3002 --name terraform-registry-mcp-server \
-e TRANSPORT_MODE=http \
-e PORT=3002 \
terraform-registry-mcp-serverLocal Development
Install dependencies:
pip install -e .Run in stdio mode (for local MCP clients):
terraform-mcp-serverRun in HTTP mode:
export TRANSPORT_MODE=http
export PORT=3002
terraform-mcp-serverConfiguration
Environment Variables
TRANSPORT_MODE- Transport mode:stdio(default) orhttpPORT- HTTP server port (default: 3002)
VS Code MCP Configuration
Add to your VS Code mcp.json:
{
"mcpServers": {
"terraform": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"terraform-mcp-server"
]
}
}
}Or for HTTP transport:
{
"mcpServers": {
"terraform": {
"url": "http://localhost:3002/mcp"
}
}
}Usage Examples
Search for AWS VPC modules
search_modules(query="vpc", provider="aws", limit=10)Get module details
get_module_details(
namespace="terraform-aws-modules",
name="vpc",
provider="aws"
)Search for providers
search_providers(query="azure", tier="official")Get latest provider version
get_latest_provider_version(namespace="hashicorp", name="aws")Get provider documentation
# Get full provider overview with version info and breaking changes
get_provider_docs(namespace="hashicorp", name="azurerm")
# Get specific version documentation (useful for compatibility checks)
get_provider_docs(namespace="hashicorp", name="azurerm", version="3.0.0")Get specific resource documentation
# Fetches complete documentation including all arguments and attributes
get_provider_resource_docs(
namespace="hashicorp",
name="aws",
resource_name="aws_instance"
)
# Check a specific version's resource documentation
get_provider_resource_docs(
namespace="hashicorp",
name="azurerm",
resource_name="azurerm_virtual_machine",
version="3.85.0"
)Get data source documentation
get_provider_data_source_docs(
namespace="hashicorp",
name="aws",
data_source_name="aws_ami"
)Deployment to Azure Container Apps
This server is designed for easy deployment to Azure Container Apps:
Build and push to Azure Container Registry:
az acr build --registry <your-acr> --image terraform-mcp-server:latest .Deploy to Container Apps:
az containerapp create \
--name terraform-mcp-server \
--resource-group <your-rg> \
--environment <your-env> \
--image <your-acr>.azurecr.io/terraform-mcp-server:latest \
--target-port 3002 \
--ingress external \
--env-vars TRANSPORT_MODE=http PORT=3002Architecture
FastMCP - Uses the official MCP Python SDK with FastMCP for simplified server creation
StreamableHTTP Transport - Supports modern HTTP transport for cloud deployment
Public Registry Only - Focuses on public Terraform registry (no authentication required)
Lightweight - Minimal dependencies, fast startup
Comparison with HashiCorp's Server
This is a simplified version compared to HashiCorp's official terraform-mcp-server:
Included:
✅ Public registry search (modules & providers)
✅ Module and provider details
✅ Version management
✅ HTTP transport for cloud deployment
✅ Docker support
Not Included:
❌ HCP Terraform / Terraform Enterprise integration
❌ Workspace management
❌ Run execution
❌ Variable management
❌ Private registry access
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Available Tools
12 toolsget_latest_module_versionA
Get the latest version of a Terraform module.
Args:
namespace: Module namespace/publisher
name: Module name
provider: Provider name
Returns:
Dictionary containing the latest version number and published date
Inputs: namespace (required), name (required), provider (required). Returns: object
get_latest_provider_versionB
Get the latest version of a Terraform provider.
Args:
namespace: Provider namespace (e.g., 'hashicorp')
name: Provider name (e.g., 'aws')
Returns:
Dictionary containing the latest version number and metadata
Inputs: namespace (required), name (required). Returns: object
get_module_detailsB
Get detailed information about a specific Terraform module.
Args:
namespace: Module namespace/publisher (e.g., 'terraform-aws-modules')
name: Module name (e.g., 'vpc')
provider: Provider name (e.g., 'aws')
version: Module version (default: 'latest')
Returns:
Dictionary containing detailed module information including inputs, outputs, resources
Inputs: namespace (required), name (required), provider (required), version. Returns: object
get_provider_data_source_docsA
Get detailed documentation for a specific provider data source.
Fetches the full documentation from GitHub including:
- Description and use cases
- Example usage code
- Argument reference
- Attribute reference (exported values)
Args:
namespace: Provider namespace (e.g., 'hashicorp')
name: Provider name (e.g., 'aws')
data_source_name: Data source name (e.g., 'aws_ami', 'azurerm_subscription')
version: Provider version (default: 'latest')
Returns:
Dictionary containing detailed data source documentation in markdown format
Inputs: namespace (required), name (required), data_source_name (required), version. Returns: object
get_provider_detailsC
Get detailed information about a specific Terraform provider.
Args:
namespace: Provider namespace (e.g., 'hashicorp')
name: Provider name (e.g., 'aws', 'azurerm', 'google')
version: Provider version (default: 'latest')
Returns:
Dictionary containing detailed provider information
Inputs: namespace (required), name (required), version. Returns: object
get_provider_docsA
Get the main documentation page for a Terraform provider.
This fetches the provider's overview documentation from GitHub which typically includes:
- Version information and compatibility notes
- Authentication and configuration
- Example usage
- Important notes about breaking changes
- Upgrade guides between versions
Args:
namespace: Provider namespace (e.g., 'hashicorp')
name: Provider name (e.g., 'aws', 'azurerm', 'google')
version: Provider version (default: 'latest')
Returns:
Dictionary containing provider documentation content in markdown format
Inputs: namespace (required), name (required), version. Returns: object
get_provider_resource_docsA
Get detailed documentation for a specific provider resource.
Fetches the full documentation from GitHub including:
- Description and use cases
- Example usage code
- Argument reference (required and optional)
- Attribute reference (exported values)
- Import instructions
- Timeouts configuration
Args:
namespace: Provider namespace (e.g., 'hashicorp')
name: Provider name (e.g., 'aws')
resource_name: Resource name (e.g., 'aws_instance', 'azurerm_virtual_machine')
version: Provider version (default: 'latest')
Returns:
Dictionary containing detailed resource documentation in markdown format
Inputs: namespace (required), name (required), resource_name (required), version. Returns: object
list_module_versionsB
List all available versions of a Terraform module.
Args:
namespace: Module namespace/publisher
name: Module name
provider: Provider name
Returns:
Dictionary containing all available versions
Inputs: namespace (required), name (required), provider (required). Returns: object
list_provider_versionsA
List all available versions of a Terraform provider.
Args:
namespace: Provider namespace
name: Provider name
Returns:
Dictionary containing all available versions
Inputs: namespace (required), name (required). Returns: object
search_modulesA
Search for Terraform modules in the public registry.
Args:
query: Search query string (module name or keywords)
provider: Filter by provider (e.g., 'aws', 'azurerm', 'google')
offset: Pagination offset (default: 0)
limit: Maximum results to return (default: 20, max: 50)
Returns:
Dictionary containing search results with module names, providers, descriptions
Inputs: query (required), provider, offset, limit. Returns: object
search_provider_docsA
Search within provider documentation for specific errors, topics, or troubleshooting info.
Useful for questions like:
- "What does error X mean?"
- "How do I configure authentication?"
- "What are the timeout options?"
- "How do I handle rate limiting?"
Args:
namespace: Provider namespace (e.g., 'hashicorp')
name: Provider name (e.g., 'aws', 'azurerm')
query: Search terms or error message to look for
version: Provider version (default: 'latest')
Returns:
Dictionary containing search results with matched sections from documentation
Inputs: namespace (required), name (required), query (required), version.
search_providersB
Search for Terraform providers in the public registry.
Args:
query: Search query (provider name or keywords, optional)
tier: Filter by tier ('official', 'partner', 'community', optional)
offset: Pagination offset (default: 0)
limit: Maximum results to return (default: 20, max: 100)
Returns:
Dictionary containing provider search results
Inputs: query, tier, offset, limit. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Every tool has a clearly distinct purpose with no ambiguity. The tools are well-organized into modules vs providers, version retrieval vs detailed documentation, and search vs specific lookups. Even tools like get_provider_docs and get_provider_resource_docs target different documentation scopes (overview vs specific resource).
All tools follow a consistent verb_noun pattern with perfect regularity. The naming convention uses get_, list_, and search_ prefixes consistently across modules and providers, making the tool set highly predictable and readable.
With 12 tools, this server is well-scoped for the Terraform Registry domain. It provides comprehensive coverage for both modules and providers, including version management, detailed information retrieval, documentation access, and search capabilities. Each tool earns its place without redundancy.
The tool surface offers complete coverage for interacting with the Terraform Registry. It supports the full lifecycle from discovery (search_modules, search_providers) to version management (list/get versions) to detailed documentation (provider docs, resource docs, data source docs). There are no obvious gaps for typical agent workflows.
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Search and fetch curated AI agent skills, prompts and MCP servers.
A registry of AI agent tools — MCP servers, APIs, CLIs, SDKs — kept current by automated ingestion.
Search the Claudeers registry of Claude tools, ranked by maintenance and community signals.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceConnects AI models to the Terraform Registry via MCP, enabling provider lookups, resource usage examples, and module recommendations for streamlined Terraform workflows.1,276 npm120MIT

OpenTofu MCP Serverofficial
AlicenseAqualityCmaintenanceA Model Context Protocol server that allows AI assistants to search for and retrieve information about OpenTofu providers, modules, resources, and data sources from the OpenTofu Registry.51,135 npm116Mozilla Public 2.0- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Terraform Cloud workspaces and runs, including checking run status, listing workspaces, and retrieving detailed information about workspaces and runs.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query an approved Terraform module registry and generate compliant Azure infrastructure code. It provides tools for module discovery, scaffolding, and validation against organizational standards.MIT