terraform-tools-mcp-server
Provides tools for generating Terraform variables files and Terragrunt mock outputs, enabling automated management of Terraform module variables and mock outputs for testing.
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-tools-mcp-server
An HTTP MCP server that exposes Terraform/Terragrunt tooling as Claude Code tools, eliminating the need for Python scripts in the repository.
Tools
terraform_generate_variables
Generates a valid variables.tf HCL file for a Terraform module by inferring types from *.auto.tfvars.json input files.
Claude Code workflow:
Find all
<unit>.auto.tfvars.jsonfiles across terragrunt environment directoriesRead their contents and call
terraform_generate_variablesWrite the returned
variables_tfstring tosrc/<project>/modules/<unit>/variables.tf
terragrunt_generate_mock_outputs
Generates a Terragrunt mock_outputs JSON document from a unit's outputs.tf.
Claude Code workflow:
Read
src/<project>/modules/<unit>/outputs.tfCall
terragrunt_generate_mock_outputsWrite the returned
mock_outputs_jsontosrc/<project>/terragrunt/common/mock_outputs/<unit>.jsonUpdate HCL dependency blocks to reference the file via
jsondecode(file("mock_outputs/<unit>.json"))
Related MCP server: DriftHound MCP Server
Deployment: Synology DS1019+ via Container Manager
This is the primary deployment target. The server runs as a persistent container and is reachable from any machine on the network at http://<diskstation-ip>:8182/mcp.
Prerequisites
Docker image built and pushed to a registry accessible from the NAS, or the source copied directly onto the NAS and built there (see below).
Container Manager installed on the DS1019+ (DSM 7.2+).
Option A — Build on the NAS
Copy the project to the NAS (e.g. via File Station or
scp):scp -r terraform-tools-mcp-server/ admin@<diskstation-ip>:/volume1/docker/terraform-tools-mcp-server/SSH into the NAS and build:
ssh admin@<diskstation-ip> cd /volume1/docker/terraform-tools-mcp-server docker compose buildStart the container:
docker compose up -d
Option B — Build locally, push to registry, pull on NAS
Build and tag:
docker build -t terraform-tools-mcp-server:latest . docker tag terraform-tools-mcp-server:latest <your-registry>/terraform-tools-mcp-server:latest docker push <your-registry>/terraform-tools-mcp-server:latestOn the NAS, update
docker-compose.ymlto reference the registry image (replacebuild: .withimage: <your-registry>/terraform-tools-mcp-server:latest), then:docker compose pull docker compose up -d
Option C — Container Manager GUI (DSM)
Open Container Manager → Project → Create.
Set the project path to the folder containing
docker-compose.yml.Container Manager will build and start the container automatically.
Port
8182will be exposed on the NAS's LAN IP.
Verify the container is running
curl http://<diskstation-ip>:8182/health
# Expected: {"status":"ok","server":"terraform-tools-mcp-server","version":"1.0.0"}Claude Code MCP configuration (VS Code)
Add the remote MCP server to your Claude Code settings so it's available in every project.
Location of settings file
OS | Path |
macOS |
|
Windows |
|
Linux |
|
You can also open it from VS Code via the command palette: Claude: Open Settings.
settings.json entry
{
"mcpServers": {
"terraform-tools": {
"type": "http",
"url": "http://<diskstation-ip>:8182/mcp"
}
}
}Replace <diskstation-ip> with your NAS's LAN IP address (e.g. 192.168.1.50) or hostname (e.g. diskstation.local).
Per-project override (optional)
To scope the server to a specific project only, add the same block to .claude/settings.json in the project root instead of the global file.
Verify Claude Code sees the tools
In VS Code with Claude Code, run:
/mcpYou should see terraform-tools listed with tools terraform_generate_variables and terragrunt_generate_mock_outputs.
Local development (stdio — no Docker)
npm install
npm run build
TRANSPORT=stdio node dist/index.jsTip — reproducible Docker builds: Once you've run
npm installlocally, apackage-lock.jsonwill be generated. Commit that file alongside the project and the Dockerfile can be changed back tonpm ci/npm ci --omit=devfor fully reproducible, faster image builds.
Local Claude Code config for stdio:
{
"mcpServers": {
"terraform-tools": {
"command": "node",
"args": ["/absolute/path/to/terraform-tools-mcp-server/dist/index.js"],
"env": { "TRANSPORT": "stdio" }
}
}
}Environment variables
Variable | Default | Description |
|
|
|
|
| HTTP port (only used when TRANSPORT=http) |
Health check
GET http://<host>:8182/health
→ {"status":"ok","server":"terraform-tools-mcp-server","version":"1.0.0"}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.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Convert, lint and generate LLM tool schemas for OpenAI, Anthropic, Gemini and MCP
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenance🌍 Terraform Model Context Protocol (MCP) Tool - An experimental CLI tool that enables AI assistants to manage and operate Terraform environments. Supports reading Terraform configurations, analyzing plans, applying configurations, and managing state with Claude Desktop integration. ⚡️374MIT
- AlicenseAqualityCmaintenanceEnables Claude to discover and understand infrastructure-as-code drift by listing projects with drift, analyzing Terraform plan outputs, and providing remediation information.4MIT
- AlicenseBqualityAmaintenanceProvides comprehensive Terragrunt documentation, configuration generation, and tooling integration for AI assistants, enabling intelligent assistance with Terragrunt configurations, CLI commands, and HCL syntax.87MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes Terraform CLI operations as tools for Claude and other MCP-compatible AI assistants, enabling AI-driven infrastructure-as-code workflows including planning, applying, and validating Terraform configurations.MIT