hashicorp/terraform-mcp-server

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

What it solves

This project provides a bridge between AI assistants (LLMs) and Terraform's ecosystem. It allows AI agents to interact with the Terraform Registry and HCP Terraform/Terraform Enterprise APIs, enabling them to automate Infrastructure as Code (IaC) development and manage cloud infrastructure workspaces.

How it works

It implements the Model Context Protocol (MCP), which is a standard for connecting AI models to external data and tools. The server can be deployed as a local process (Stdio transport) or as a remote service (StreamableHTTP transport). Once connected to an MCP-compatible client (like VS Code, Cursor, or Claude Desktop), the AI assistant can use the server's tools to query providers, modules, and policies, or perform workspace operations such as creating, updating, and deleting workspaces.

Who it’s for

DevOps engineers, platform engineers, and cloud architects who use Terraform for infrastructure management and want to leverage AI assistants to automate the discovery of modules and the management of their HCP Terraform environments.

Highlights

  • Dual Transport Support: Supports both Stdio and StreamableHTTP for flexible deployment.
  • Terraform Registry Integration: Direct access to public providers, modules, and policies.
  • HCP Terraform & Enterprise Support: Full management of workspaces, organizations, projects, and private registries.
  • Monitoring: Integration with OpenTelemetry (OTel) to track tool-call volume, latency, and failures.
  • Broad Client Compatibility: Works with a wide range of AI tools including VS Code, Cursor, Claude Code, and Gemini extensions.

Related

  • Project
  • Project
  • Project
  • Project
  • Project