terraform-mcp-server

terraform-mcp-server

The Terraform MCP Server provides seamless integration with the Terraform ecosystem, enabling advanced automation and interactive capabilities for IaC development.

MCPDevOpen source
Type
MCP
Open source
Yes
GitHub Stars
★ 1.4k
Source
mcp-github

Overview

The Terraform MCP Server is a Model Context Protocol (MCP) server that offers seamless integration with the Terraform Registry API, supporting advanced automation and interactive capabilities for Infrastructure as Code (IaC) development. It supports dual transport protocols (Stdio and StreamableHTTP) and integrates with Terraform Registry, HCP Terraform, and Terraform Enterprise. Users can create, update, and delete workspaces, and manage variables, tags, and runs through this server. It also supports OpenTelemetry for metrics monitoring. Ideal for developers and teams requiring IaC automation and management.

Capabilities

  • Supports Stdio and StreamableHTTP transport protocols
  • Direct integration with Terraform Registry API
  • Supports HCP Terraform and Terraform Enterprise
  • Workspace management: create, update, delete
  • Supports variable, tag, and run management
  • OpenTelemetry metrics monitoring

Use cases

Automated Terraform resource managementIntegrating Terraform with AI assistantsAdvanced automation for Infrastructure as Code (IaC)Monitoring and managing Terraform workspaces

Setup

Requires: DockerAPI KeyNode 环境
Ensure Docker is installed and running, then start the container using the following command: `docker run -p 8080:8080 -e TFE_TOKEN=<your_token> hashicorp/terraform-mcp-server`

This information was compiled by AI from public sources and may contain inaccuracies — please refer to the source.

FAQ

How is the Terraform MCP Server configured?

Configured via environment variables, such as `TFE_TOKEN` and `TRANSPORT_MODE`.

What transport protocols are supported?

Supports Stdio and StreamableHTTP transport protocols.

Does it support private registries?

Yes, it supports private registries for HCP Terraform and Terraform Enterprise.

Related skills