Terraform
HashiCorp's server for Terraform Registry lookups and HCP Terraform workspaces
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 1.4.1
- Listing updated
- today
Similar MCP servers
About Terraform
Terraform is an MCP server for cloud and infrastructure. It runs locally on your machine and is started by your AI client.
This server gives an assistant current Terraform knowledge instead of leaning on stale training data: it talks to the public Terraform Registry for providers, modules and policies, and to HCP Terraform or Terraform Enterprise for private registry access, organisations, projects and workspaces. Workspace tools can create, update and delete workspaces, with variables, tags and runs.
It can run over stdio in a container or as a streamable-HTTP service. The HTTP mode has stateful or stateless sessions, strict CORS by default, optional TLS, global and per-session rate limits, an organisation allowlist, client IP forwarding, and OpenTelemetry metrics for tool-call volume, latency and failures. Tools that need explicit approval are off unless ENABLE_TF_OPERATIONS is set, and the Terraform address can only be set through environment configuration in HTTP mode.
The README adds warnings that matter: do not use it with untrusted clients or models, output is generated dynamically and must be reviewed against your security and cost rules, and IBM disclaims responsibility for third-party clients.
Install
Run in a terminal
claude mcp add terraform-mcp-server -- docker run -i --rm docker.io/hashicorp/terraform-mcp-server:1.4.1Add to claude_desktop_config.json
{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"terraform-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/hashicorp/terraform-mcp-server:1.4.1"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
What it does
- Registry integration
- Looks up providers, modules and policies in the public registry.
- HCP Terraform support
- Lists organisations and projects and manages workspaces.
- Workspace operations
- Create, update and delete workspaces with variables, tags and runs.
- Two transports
- stdio or streamable HTTP with configurable endpoint.
- Guardrails
- Approval-gated tools are off unless enabled.
- HTTP hardening
- CORS modes, TLS, rate limits and organisation allowlist.
- OpenTelemetry metrics
- Tracks tool-call volume, latency and failures.
Good for
- Writing Terraform with up-to-date provider documentation
- Finding a module in the public or private registry
- Managing HCP Terraform workspaces from chat
- Running a shared MCP deployment with limits and metrics
Terraform FAQ
Do I need an HCP Terraform token?
Only for HCP Terraform or Enterprise features, set with TFE_TOKEN.
How is it run?
As a Docker image over stdio, or in streamable-HTTP mode.
Is it safe with any client?
The README says not to use it with untrusted MCP clients or LLMs.
Can it change infrastructure?
Operations that need approval are disabled unless ENABLE_TF_OPERATIONS is set.
How do I add Terraform to Claude Code?
Run this command in your terminal: claude mcp add terraform-mcp-server -- docker run -i --rm docker.io/hashicorp/terraform-mcp-server:1.4.1
What are the best alternatives to Terraform?
The closest alternatives to Terraform are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


