Terraform Modules MCP Server
Provides tools for discovering Terraform modules across AWS, Azure, and GCP, inspecting module variables, outputs, and dependencies, estimating costs, and generating Terraform code for individual modules or complete stacks.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Terraform Modules MCP Server
A multi-cloud MCP server that lets AI assistants discover, understand, and generate Terraform code from module catalogs across AWS, Azure, and GCP.
What it does
Discover modules — list modules across all clouds with descriptions, dependencies, and costs
Understand wiring — see how modules connect (e.g., VPC outputs feed into EKS inputs)
Estimate costs — get per-module cost breakdowns by tier (dev/staging/prod)
Generate code — produce ready-to-use
.tffiles for single modules or full stacks
Related MCP server: CloudForge MCP Server
Quick start
Install via Claude Code
Add to your ~/.mcp.json (global) or .claude/mcp.json (per-project):
{
"mcpServers": {
"tf-modules": {
"command": "uvx",
"args": ["tf-mcp"],
"env": {
"TF_MODULES_AWS_DIR": "/path/to/your/aws-tf/modules",
"TF_MODULES_AZURE_DIR": "/path/to/your/azure-tf/modules",
"TF_MODULES_GCP_DIR": "/path/to/your/gcp-tf/modules"
}
}
}
}Only include the env entries for clouds you have modules for.
Install via pip
pip install tf-mcpRun standalone
tf-mcpPrerequisites
Python >= 3.11
One or more directories containing Terraform modules
Module directory layout
Point the server at directories containing Terraform modules. Each module should be a subdirectory with at least a main.tf:
your-modules-dir/
vpc/
main.tf
variables.tf
outputs.tf
eks-cluster/
main.tf
variables.tf
outputs.tfThe server auto-discovers all subdirectories containing a main.tf.
Configuration
Tell the server where your modules live using environment variables:
Variable | Description |
| Path to AWS |
| Path to Azure |
| Path to GCP |
If no env vars are set, the server looks for sibling repos in the default layout:
parent-dir/
aws-tf/modules/
azure-tf/modules/
gcp-tf/modules/
tf-mcp-server/ # this repoTools
Tool | Description |
| List modules with optional cloud filter |
| Full variable/output/cost reference for one module |
| Dependency graph and output-to-input wiring |
| Cost estimates for a set of modules by tier |
| Generate |
| Generate a complete multi-module stack with auto-wiring |
Resources
URI | Description |
| Full listing across all clouds |
| Listing for one cloud |
| Module README.md |
| Module examples/main.tf |
| Text dependency graph |
| Terraform conventions |
Development
git clone https://github.com/m-ujifusa/tf-mcp-server.git
cd tf-mcp-server
uv sync
uv run tf-mcpLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unified API to query AWS, GCP, Azure and generate Terraform/CLI execution kits for AI agents.
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Find the right MCPs, tools and skills for any AI task - discovery over a 14k+ resource catalog.
Your AI Agent's Infrastructure Layer. Connect Claude, Copilot, Codex, or ChatGPT to 200+ managed open source services. Start databases, pipelines, and applications through natural language.
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.120MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to visualize cloud architecture diagrams, generate and import Terraform HCL, and manage infrastructure resources directly from chat through the CloudForge platform.1869 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides intelligent assistance for Azure Terraform development, including documentation retrieval, code validation, security scanning, and best practices guidance.1MIT
- 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