MCP server

Terraform MCP Server

Look up Terraform providers, modules and policies in the registry, and manage HCP Terraform workspaces. Official: built and maintained by HashiCorp. It runs locally on your machine over stdio. Setup below for 12 clients (checked 2026-10-25). Repo and registry data checked 2026-10-24.
Maintainer
Official · HashiCorp
Runs
Local (stdio)
GitHub
★ 1,553, last push 2026-10-23 (checked 2026-10-24) star history
License
MPL-2.0
Registry
io.github.hashicorp/terraform-mcp-server
Connects to
HCP Terraform, Terraform
Terraform GitHub star history

Install the Terraform MCP Server

Pick your client. Each tab starts the same local command. Config shapes checked against each client's docs on 2026-10-25.

Run in a terminal. Everything after -- is the command that starts the server. docs

claude mcp add --transport stdio terraform -- docker run -i --rm hashicorp/terraform-mcp-server

Security notes

  • The local server runs with your user's permissions (it runs in a Docker container, and only the variables passed with -e reach it).
  • It acts on real infrastructure with your credentials. Use a read-only role or a sandbox account first.
  • Kubesharkofficial · ★ 12k

    Live Kubernetes network traffic: HTTP, gRPC, Redis, Kafka and DNS calls between services.

  • Cloudflareofficial · ★ 4.4k

    A set of hosted servers (docs, Workers bindings, builds, observability, Radar and more), each at its own URL; the docs one is shown.

  • Azureofficial · ★ 3.8k

    Azure resources, storage, Cosmos DB, Key Vault, monitoring and CLI commands from one server.

  • Fly.ioofficial · ★ 1.7k

    MCP server built into flyctl to manage Fly apps, machines, volumes and logs.

  • Google Cloud Runofficial · ★ 632

    Deploy code or containers to Cloud Run and list services and logs.

  • Argo CDofficial · ★ 596

    List, sync and inspect Argo CD applications and their resources.

  • Renderofficial · ★ 180

    Create services and databases on Render, check deploys, logs and metrics.

  • Docker Hubofficial · ★ 169

    Search Docker Hub images and manage your repositories.

Comparing servers for one product? HCP Terraform MCP servers

FAQ

What does the Terraform MCP Server do?+

Look up Terraform providers, modules and policies in the registry, and manage HCP Terraform workspaces.

Is the Terraform MCP server official?+

Official: built and maintained by HashiCorp.

How do I add Terraform to Claude Code?+

Run: claude mcp add terraform -- docker run -i --rm hashicorp/terraform-mcp-server. Add --scope project to share it with your team through .mcp.json.

How do I use the Terraform MCP server in Cursor or VS Code?+

Open the Cursor or VS Code tab above: it has the mcp.json entry and a one-click install link. Cursor uses the "mcpServers" key; VS Code uses "servers" and needs a type ("stdio").

Does Terraform work in ChatGPT and claude.ai?+

No: it runs locally over stdio, and ChatGPT and claude.ai only connect to remote servers. Use it in Claude Desktop, Claude Code, Cursor, VS Code or another client that can start a local process.

What are the alternatives to the Terraform MCP server?+

Other cloud & devops MCP servers: Kubeshark, Cloudflare, Azure, Fly.io and Google Cloud Run.

All MCP servers · What is an MCP server? · Agent skills