- Home
- MCP servers
- Terraform Registry
Terraform Registry
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can run this MCP server to access and search Terraform providers, modules, and their documentation. It exposes a fast, lightweight API that lets you discover modules and providers, fetch detailed information, and read full documentation directly from the Terraform Registry.
How to use
Use an MCP client to connect to the server and perform searches, fetch details, and read documentation. Common tasks include searching for modules or providers, retrieving the latest versions, getting detailed module/provider information, and pulling provider documentation and resource data.
How to install
Prerequisites you need before installation:
# Prerequisites
- Python 3.8+
- Docker (optional for containerized deployment)
- pip
Install the MCP server package in development mode to enable local edits and testing.
pip install -e .
Run in stdio mode for local MCP clients (no HTTP transport): you start the server directly in your terminal.
terraform-mcp-server
Run in HTTP mode to expose the MCP server over HTTP (transport mode must be set to http): set the port and start the server.
export TRANSPORT_MODE=http
export PORT=3002
terraform-mcp-server
If you prefer containerized deployment, you can build and run a Docker image with the following steps.
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-server
Configuration and usage notes
Transport and connection options are exposed in two main ways. You can connect via HTTP at the URL path that serves the MCP endpoint, or you can run the server locally in stdio mode for direct MCP client usage. In HTTP mode, clients connect to http://<host>:<port>/mcp.
Environment variables you may configure include TRANSPORT_MODE and PORT. For HTTP access, ensure PORT is set to the port you want the HTTP server to listen on.
Deployment notes and examples
Azure Container Apps deployment is supported. Build the image, push it to your registry, and deploy the container with appropriate environment variables set for HTTP transport.
az acr build --registry <your-acr> --image terraform-mcp-server:latest .
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=3002
Provider and module search and documentation endpoints
The server offers a set of tools to search and retrieve information about Terraform providers and modules, including details, latest versions, and documentation. You can search for providers and modules by name or keywords, fetch provider and module details, and obtain full provider documentation or resource data when needed.
Available 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
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