terraform-mcp-server

Level ALocal

The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.

Overview

Terraform MCP Server is a HashiCorp MCP server that integrates with the Terraform Registry and HCP Terraform / Terraform Enterprise APIs to support Infrastructure as Code development. It lets clients query public and private registry providers, modules, and policies, and manage workspaces including variables, tags, and runs. It supports both Stdio and StreamableHTTP transports and exposes OpenTelemetry metrics for monitoring.

⭐ 1.6kDevOps & DeploymentGoRepo ↗Updated 2026-11-20

Installation

MCP client config (paste into mcp.json)

{
  "mcpServers": {
    "terraform-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "hashicorp/terraform-mcp-server:1.4.1"
      ]
    }
  }
}

Agent install prompt

Copy and paste into Cursor / Claude / other agents to install this MCP for you

Please read this MCP repository and install it into my current environment:
https://github.com/hashicorp/terraform-mcp-server

Known working client config (can write into mcp.json):
{
  "mcpServers": {
    "terraform-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "hashicorp/terraform-mcp-server:1.4.1"
      ]
    }
  }
}

Please: 1) check README for deps and env vars; 2) write config for my client; 3) if secrets are missing, tell me what to fill — do not invent values.

Related servers