# Terraform MCP Server

An MCP server that integrates with the Terraform Registry and HCP Terraform APIs, letting AI agents and IDEs query providers, modules and policies and manage Terraform workspaces for infrastructure-as-code automation.

The Terraform MCP Server is a Model Context Protocol server providing direct integration with the public Terraform Registry APIs for providers, modules and policies, as well as full HCP Terraform and Terraform Enterprise support: workspace management, organization and project listing, and private registry access. It supports both Stdio and StreamableHTTP transports with configurable endpoints, and can create, update and delete workspaces including variables, tags and run management.

It exposes OpenTelemetry metrics for tool-call volume, latency and failures when running in Streamable HTTP mode, along with default HTTP server metrics. It documents installation for a range of clients, including Visual Studio Code, Cursor, Claude Desktop, Amazon Q Developer, Kiro CLI, Claude Code, Codex CLI and Gemini extensions, plus building the Docker image locally or installing from source.

Because it can expose Terraform data to whatever MCP client and LLM connect to it, its documentation cautions against using it with untrusted MCP clients or LLMs.

Website: https://github.com/hashicorp/terraform-mcp-server
