Terraform

Terraform

A Model Context Protocol server integrating Terraform Registry APIs for IaC automation.

1,070
Stars
109
Forks
9
Releases

Overview

The Terraform MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Terraform Registry APIs, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development. It supports dual transports (Stdio and StreamableHTTP) with configurable endpoints, allowing both local development and remote deployments. The server integrates directly with public Terraform Registry APIs to access providers, modules, and policies, and offers compatibility with HCP Terraform and Terraform Enterprise for workspace management, organization/project listing, and private registry access. It exposes workspace operations to create, update, and delete workspaces, with support for variables and tags and run management. The server includes security and deployment notes: it's intended for local use by default; for HTTP transport, configure allowed origins to reduce cross-origin risks; be aware that some Terraform data may be exposed to MCP clients and LLMs depending on queries. It provides instructions for prerequisites, installation, and various integration options (VS Code, Cursor, Claude, Gemini), and includes health checks and testing steps in development.

Details

Owner
hashicorp
Language
Go
License
Mozilla Public License 2.0
Updated
2025-12-04

Features

Dual Transport Support

Supports both Stdio and StreamableHTTP transports with configurable endpoints for local development and remote deployments.

Terraform Registry Integration

Direct integration with public Terraform Registry APIs for providers, modules, and policies.

HCP Terraform & Terraform Enterprise Support

Provides full workspace management, organization/project listing, and private registry access.

Workspace Operations

Create, update, and delete workspaces with support for variables, tags, and run management.

Security Considerations

Security notes include local-use intent, CORS/origin configuration, and awareness of potential data exposure to MCP clients and LLMs.

Developer Tooling & Integrations

Guides for integrating with tooling like VS Code, Cursor, Claude, and Gemini for MCP server usage.

Audience

Terraform AdminsAutomate Terraform Registry interactions, workspace lifecycle, and TFE workflows via MCP.
DevelopersLeverage MCP-powered AI assistants to query Terraform data and manage workspaces.
Cloud EngineersIntegrate MCP-enabled tooling to orchestrate IaC across registries and private enterprises.

Tags

MCPTerraformTerraform RegistryIaCHCP/Terraform EnterpriseWorkspace ManagementStreamableHTTPStdioSecurity