MCPdir β€” MCP Server Directory
πŸ‡¬πŸ‡§ πŸ‡ͺπŸ‡Έ

Terraform MCP

by HashiCorp

Official Terraform MCP server for seamless IaC development with AI assistants

devops Go Intermediate Self-hostable No API key Docker Verified
⭐ 1.2k stars πŸ“… Updated: 1mo ago

Description

Official HashiCorp MCP server that bridges Terraform's Infrastructure as Code ecosystem with AI coding assistants. Search providers and modules in the Terraform Registry, retrieve detailed provider documentation including resource schemas and argument references, and manage HCP Terraform workspaces programmatically. Supports dual transport modes (stdio and StreamableHTTP) for flexible integration, tool filtering to expose only needed capabilities, and built-in rate limiting for safe registry access. Designed to give AI assistants accurate, up-to-date Terraform knowledge directly from the source.

βœ… Best for

Terraform developers who want AI-assisted IaC authoring with accurate, real-time registry data

⏭️ Skip if

You use a different IaC tool like Pulumi, CDK, or Ansible

πŸ’‘ Use cases

  • Looking up Terraform provider documentation and resource schemas while writing IaC
  • Discovering and evaluating Terraform modules from the registry
  • Managing HCP Terraform workspaces and variables from AI assistants
  • Getting accurate provider configuration examples without leaving the editor

πŸ‘ Pros

  • βœ“ Official HashiCorp project β€” authoritative Terraform Registry access
  • βœ“ Dual transport support (stdio + StreamableHTTP) for flexible deployments
  • βœ“ Tool filtering lets you expose only the capabilities you need
  • βœ“ Built-in rate limiting prevents hitting registry API limits

πŸ‘Ž Cons

  • βœ— HCP Terraform workspace features require authentication token
  • βœ— Read-only registry access β€” cannot publish providers or modules
  • βœ— Go binary requires compilation or Docker for installation

πŸ”§ Exposed tools (7 tools)

ToolCategoryDescription
list_workspaceshcp-terraformList HCP Terraform workspaces in an organization
create_workspacehcp-terraformCreate a new HCP Terraform workspace
manage_variableshcp-terraformManage workspace variables in HCP Terraform
search_providersregistrySearch for Terraform providers in the registry
get_provider_detailsregistryGet detailed documentation for a specific Terraform provider
search_modulesregistrySearch for Terraform modules in the registry
get_module_detailsregistryGet details and usage examples for a Terraform module

⚑ Installation

Prerequisites:

  • β€’ go v1.21+
  • β€’ Optional HCP Terraform token for workspace management

Check Claude Code documentation to configure this MCP server.

πŸ’‘ Tips & tricks

Use Docker for the quickest setup: docker run hashicorp/terraform-mcp-server:0.4.0. Enable tool filtering to limit exposed tools to just what your workflow needs, reducing noise for the AI assistant.

Quick info

Author
HashiCorp
License
MPL-2.0
Runtime
Go 1.21+
Transport
stdio
Category
devops
Difficulty
Intermediate
Self-hostable
βœ…
Auth
β€”
Docker
🐳 Docker available
Version
0.4.0
Updated
Feb 28, 2026

Client compatibility

  • βœ… Claude Code
  • βœ… Cursor
  • βœ… VS Code Copilot
  • ❓ Gemini CLI
  • βœ… Windsurf
  • ❓ Cline
  • ❓ JetBrains AI
  • ❓ Warp

Platforms

🍎 macOS 🐧 Linux πŸͺŸ Windows