Data as of

Terraform MCP Server for Cursor: Setup & Config

Cursor: Connect MCP assistants to Terraform Registry data and HCP Terraform or Terraform Enterprise.

What you can do with Terraform in Cursor

Choose it for Terraform Registry research and platform workspace operations through one MCP integration.

  • Manage Terraform workspaces, variables, tags, and runs.
  • Expose selected Terraform capabilities to a shared HTTP MCP client.

Before you start: Terraform in Cursor

  • Docker installed and running
  • An MCP-compatible assistant

This command is the README's local Claude Code Docker launch. HCP Terraform or Enterprise access additionally uses TFE_ADDRESS and TFE_TOKEN, which must be forwarded into the container as shown in the README's client-specific examples. Public Registry use and platform access are distinct configurations.

Terraform Cursor configuration

  1. Choose Cursor configuration scope

    For Terraform MCP Server, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.

  2. Add Terraform MCP Server to Cursor

    Use the terraform-mcp-server entry below in mcpServers. Keep Terraform MCP Server's documented stdio connection fields and your other Cursor entries.

  3. Check Terraform MCP Server in Cursor

    Terraform MCP Server: Enable in Cursor’s MCP settings; inspect tools.

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

JSON
{
  "mcpServers": {
    "terraform-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "hashicorp/terraform-mcp-server"
      ],
      "env": {}
    }
  }
}

Terraform tools available to Cursor

Terraform's stored tool list documents 2 tools; compare it with Cursor's connected tool list, because the stored list is not a live check.

search_providers

Find search_providers under Terraform in Cursor's MCP settings; inspect its arguments when the agent requests a call.

get_provider_details

Find get_provider_details under Terraform in Cursor's MCP settings; inspect its arguments when the agent requests a call.

Retrieve provider details; named in the README's tool-filtering example.

Terraform: full stored tool descriptions

Troubleshooting Terraform in Cursor

  • Cursor must find docker and a running Docker engine for Terraform MCP Server. Enable the project/user entry in MCP settings and inspect its tools.
  • Terraform MCP Server uses stdio here: Cursor must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Connected clients and models may receive sensitive Terraform data.
  • Known limitation: Write-capable platform operations need deliberate permission and tool configuration.
  • Known limitation: The complete tool catalog is linked externally rather than included in the supplied README.
  • General Cursor troubleshooting lives in the /clients/cursor guide.

Terraform MCP Server — details. Cursor guide

Frequently asked questions

Cursor's Terraform MCP Server entry belongs under mcpServers in .cursor/mcp.json (project) or ~/.cursor/mcp.json (user). Confirm the active scope in MCP settings.

Cursor's terraform-mcp-server example uses stdio.

Terraform MCP Server's Cursor configuration invokes docker and a running Docker engine.

Terraform MCP Server's stored list contains 2 tools, including search_providers, get_provider_details. Compare those names with Cursor's connected tool list; the stored list is not a live check.

Yes. The server accepts toolset and individual-tool filters.

Optional OpenTelemetry metrics cover tool calls, failures, and durations, plus HTTP metrics in streamable HTTP mode.