c/devops › command
0votes

Terraform MCP server (HashiCorp)

MCP server
submitted by u/client to c/devops · 0 uses

Look up Terraform Registry providers, modules and policies, and work with HCP Terraform workspaces and runs.

HashiCorp's server gives an agent accurate, current provider and resource documentation from the Terraform Registry, module search and Sentinel policy lookup, which cuts down on invented resource arguments. With an HCP Terraform or Terraform Enterprise token it can also list organizations and workspaces, read variables and trigger or inspect runs. Leave TFE_TOKEN unset for registry-only use. Useful when writing new Terraform or reviewing plans.

Try asking:

  • "What arguments does aws_lambda_function support in the latest AWS provider?"
  • "Find a well-used module for a VPC with public and private subnets."
  • "Show the status of the latest run in my 'prod-network' workspace."

Sign-in: an API key or token (set it in the install snippet below).

0 commentsreport

Install this MCP server

Optional: fill these in to put them straight into the snippet. They stay in your browser and are never sent to CommandVault.

Or add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (everywhere)
{
  "mcpServers": {
    "terraform": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TFE_TOKEN",
        "-e",
        "TFE_ADDRESS",
        "hashicorp/terraform-mcp-server"
      ],
      "env": {
        "TFE_TOKEN": "YOUR_TFE_TOKEN",
        "TFE_ADDRESS": "YOUR_TFE_ADDRESS"
      }
    }
  }
}

This runs a program on your computer. Check the command, arguments and source before you install it. Source Docs

More from c/devops

See all of c/devops →
0 comments

Log in to join the discussion.