terraform-mcp-server
terraform-mcp-server is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.
If you are the rightful owner of terraform-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Terraform MCP Server is a Model Context Protocol server that integrates with Terraform Registry APIs for advanced automation in Infrastructure as Code development.
The Terraform MCP Server is designed to facilitate seamless integration with Terraform Registry APIs, providing advanced automation and interaction capabilities for Infrastructure as Code (IaC) development. It enables users to automate the discovery of Terraform providers and modules, extract and analyze data from the Terraform Registry, and obtain detailed information about provider resources and data sources. This server is particularly useful for exploring and understanding Terraform modules, making it an essential tool for developers and DevOps engineers working with Terraform. The server can be run in a container using Docker, and it supports integration with various platforms such as VS Code and Claude Desktop.
Features
- Automates Terraform provider and module discovery
- Extracts and analyzes data from Terraform Registry
- Provides detailed information about provider resources and data sources
- Facilitates exploration and understanding of Terraform modules
- Supports integration with platforms like VS Code and Claude Desktop
Tools
getProviderDocs
Fetches up-to-date documentation for a specific service from a Terraform provider. You must call 'resolveProviderDocID' first to obtain the exact tfprovider-compatible providerDocID required to use this tool.
moduleDetails
Fetches up-to-date documentation on how to use a Terraform module. You must call 'searchModules' first to obtain the exact valid and compatible moduleID required to use this tool.
policyDetails
Fetches up-to-date documentation for a specific policy from the Terraform registry. You must call 'searchPolicies' first to obtain the exact terraformPolicyID required to use this tool.
resolveProviderDocID
This tool retrieves a list of potential documents based on the serviceSlug and providerDataType provided. You MUST call this function before 'getProviderDocs' to obtain a valid tfprovider-compatible providerDocID. Use the most relevant single word as the search query for serviceSlug, if unsure about the serviceSlug, use the providerName for its value. When selecting the best match, consider: - Title similarity to the query - Category relevance Return the selected providerDocID and explain your choice.
If there are multiple good matches, mention this but proceed with the most relevant one.searchModules
Resolves a Terraform module name to obtain a compatible moduleID for the moduleDetails tool and returns a list of matching Terraform modules. You MUST call this function before 'moduleDetails' to obtain a valid and compatible moduleID. When selecting the best match, consider: - Name similarity to the query - Description relevance - Verification status (verified) - Download counts (popularity) Return the selected moduleID and explain your choice. If there are multiple good matches, mention this but proceed with the most relevant one. If no modules were found, reattempt the search with a new moduleName query.
searchPolicies
Searches for Terraform policies based on a query string. This tool returns a list of matching policies, which can be used to retrieve detailed policy information using the 'policyDetails' tool. You MUST call this function before 'policyDetails' to obtain a valid terraformPolicyID. When selecting the best match, consider: - Name similarity to the query - Title relevance - Verification status (verified) - Download counts (popularity) Return the selected policyID and explain your choice. If there are multiple good matches, mention this but proceed with the most relevant one. If no policies were found, reattempt the search with a new policyQuery.