Terraform MCP server tools: which ones change your infrastructure, and how to make your agent ask
All 61 tools of HashiCorp's Terraform MCP server, checked by running version 1.4.1: which only read, why create_run and update_workspace stay on with operations switched off, which reads hand over plan values, and the Claude Code settings that make the rest ask.
Checked on by running terraform-mcp-server 1.4.1 (Docker image hashicorp/terraform-mcp-server) from hashicorp/terraform-mcp-server and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.
The short answer
Without a TFE_TOKEN it has 9 tools that only read the public registry, and that is all most coding work needs. With a token, leaving ENABLE_TF_OPERATIONS off is not enough: create_run and update_workspace stay. Use --toolsets, allow the reads, and make the rest ask.
- Can run on their own
- 36
- Should ask a person
- 25
Two servers in one
Started on its own, HashiCorp’s server has 9 tools, all of them reads of the public Terraform registry: provider docs, module details, latest versions. That is what most coding work needs, and it can run unasked. Give it a TFE_TOKEN and it becomes a client for HCP Terraform or Terraform Enterprise, with 56 tools by default and 61 with ENABLE_TF_OPERATIONS=true. We ran version 1.4.1 against a stand-in for the Terraform Cloud API and logged each request it made.
Leaving operations off does not stop applies
ENABLE_TF_OPERATIONS is off by default, and it holds back five tools: action_run, delete_project, delete_team, delete_workspace_safely, force_unlock_workspace. It does not hold back create_run or update_workspace, and the two together are enough to change infrastructure:
update_workspacewithauto_applyset sent{"auto-apply": true}for the workspace.create_runthen started a run that copies the workspace’s auto-apply setting. On an auto-apply workspace, a run that plans changes applies them with nobody confirming it.- With operations off,
create_runleft out theis_destroyandauto_approverun types we asked for. With them on, it sent both: a destroy run, applied without confirmation, is one call.
Pick toolsets, then rely on the token
--toolsets takes registry, registry-private and terraform; --tools takes single tool names. A team that only needs docs and its private modules can leave the terraform toolset out entirely:
claude mcp add terraform -e TFE_TOKEN=$TFE_TOKEN -- \
docker run -i --rm -e TFE_TOKEN hashicorp/terraform-mcp-server \
--toolsets=registry,registry-privateWhatever the server offers, the token decides what works. A team token with read access to the workspaces the agent needs cannot queue a run or change a setting, even if a tool asks it to.
All 61 tools
Hard to undo19 toolsAsk a person every time. Consider two people, or deny it if the agent never needs it.
action_runPerforms a variety of actions on a Terraform run.
Server says: destructive · toolset terraform
add_team_memberAdds a single member to a Terraform Cloud/Enterprise team.
Server gives no read-only or destructive hint · toolset terraform
Our call: Gives a person everything the team can do in your organisation. The server gives no hint for it.
attach_policy_set_to_workspacesAttach a policy set to one or more workspaces.
Server says: destructive · toolset terraform
attach_variable_set_to_workspacesAttach a variable set to one or more workspaces.
Server says: destructive · toolset terraform
create_no_code_workspaceCreates a new Terraform No Code module workspace.
Server says: destructive · toolset terraform
create_runCreates a new Terraform run in the specified workspace.
Server says: destructive · toolset terraform
Our call: Starts a run, and the run takes the workspace's auto-apply setting, so on an auto-apply workspace the plan is applied with nobody confirming it. On without ENABLE_TF_OPERATIONS.
create_variable_in_variable_setCreate a new variable in a variable set.
Server says: destructive · toolset terraform
create_variable_setCreate a new variable set in an organization.
Server says: destructive · toolset terraform
create_workspace_tagsAdd tags to a Terraform workspace.
Server says: destructive · toolset terraform
create_workspace_variableCreate a new variable in a Terraform workspace.
Server says: destructive · toolset terraform
delete_projectDeletes a Terraform project by ID.
Server says: destructive · toolset terraform
delete_teamPermanently deletes a Terraform team by its "team_id".
Server says: destructive · toolset terraform
delete_variable_in_variable_setDelete a variable in a variable set.
Server says: destructive · toolset terraform
delete_workspace_safelySafely deletes a Terraform workspace by ID only if it is not managing any resources.
Server says: destructive · toolset terraform
detach_variable_set_from_workspacesDetach a variable set from one or more workspaces.
Server says: destructive · toolset terraform
force_unlock_workspaceForce unlocks a Terraform workspace stuck in a lock.
Server says: destructive · toolset terraform
grant_team_accessGrants a team permission to access a workspace or a project in Terraform Cloud/Enterprise.
Server gives no read-only or destructive hint · toolset terraform
update_workspaceUpdates an existing Terraform workspace configuration.
Server gives no read-only or destructive hint · toolset terraform
Our call: Can turn on auto_apply, after which any run applies without a person confirming it in Terraform Cloud. On without ENABLE_TF_OPERATIONS.
update_workspace_variableUpdate an existing variable in a Terraform workspace.
Server says: destructive · toolset terraform
Not sure3 toolsAsk a person until you have checked what it does.
get_plan_json_outputRetrieves the structured JSON output of a specific Terraform plan.
Server says: read-only · toolset terraform
Our call: Marked read-only, but it fetches the unredacted plan JSON (json-output, not json-output-redacted), so values marked sensitive in the plan can reach the model.
get_sentinel_mockExports and downloads Sentinel mock bundle data for a Terraform plan.
Server says: read-only · toolset terraform
Our call: Marked read-only, but it first creates a plan export (a POST) and then downloads the mock data, which holds the plan's values.
get_state_versionRetrieves a Terraform state version.
Server says: read-only · toolset terraform
Our call: Marked read-only, and returns metadata, but that includes the download links for the state file, and state keeps every secret in plain text.
Changes data3 toolsAsk a person. Once it is routine, a standing rule can answer.
create_projectCreates a new Terraform project in the specified organization.
Server gives no read-only or destructive hint · toolset terraform
create_teamCreates a new team in a Terraform Cloud/Enterprise organization.
Server gives no read-only or destructive hint · toolset terraform
create_workspaceCreates a new Terraform workspace in the specified organization.
Server gives no read-only or destructive hint · toolset terraform
Only looks36 toolsLet it run. It only looks.
get_apply_detailsFetches detailed information about a specific Terraform apply.
Server says: read-only · toolset terraform
Our call: Marked read-only and only reads a run, its plan or its apply. The checker sees the word run or apply and would ask.
get_apply_logsRetrieves the logs of a specific Terraform apply.
Server says: read-only · toolset terraform
Our call: Marked read-only and only reads a run, its plan or its apply. The checker sees the word run or apply and would ask.
get_latest_module_versionFetches the latest version of a Terraform module from the public registry
Server says: read-only · toolset registry
get_latest_provider_versionFetches the latest version of a Terraform provider from the public registry
Server says: read-only · toolset registry
get_module_detailsFetches up-to-date documentation on how to use a Terraform module.
Server says: read-only · toolset registry
get_plan_detailsFetches detailed information about a specific Terraform plan.
Server says: read-only · toolset terraform
get_plan_logsRetrieves the logs of a specific Terraform plan.
Server says: read-only · toolset terraform
get_policy_detailsFetches up-to-date documentation for a specific policy from the Terraform registry.
Server says: read-only · toolset registry
get_private_module_detailsThis tool retrieves detailed information about a specific private module in your Terraform Cloud/Enterprise organization.
Server says: read-only · toolset registry-private
get_private_provider_detailsThis tool retrieves information about a specific private provider in your Terraform Cloud/Enterprise organization.
Server says: read-only · toolset registry-private
get_projectFetches detailed information about a Terraform project by its ID.
Server says: read-only · toolset terraform
get_provider_capabilitiesGet the capabilities of a Terraform provider including the types of resources, data sources, functions, guides, and other features it supports.
Server says: read-only · toolset registry
get_provider_detailsFetches up-to-date documentation for a specific service from a Terraform provider.
Server says: read-only · toolset registry
get_run_commentsLists all user-submitted comments on a specific Terraform run.
Server says: read-only · toolset terraform
Our call: Marked read-only and only reads a run, its plan or its apply. The checker sees the word run or apply and would ask.
get_run_detailsFetches detailed information about a specific Terraform run.
Server says: read-only · toolset terraform
Our call: Marked read-only and only reads a run, its plan or its apply. The checker sees the word run or apply and would ask.
get_stack_detailsFetches detailed information about a specific Terraform Stack.
Server says: read-only · toolset terraform
get_teamFetch full details for a single team by ID, including members, organization access permissions, and SSO settings.
Server says: read-only · toolset terraform
get_token_permissionsFetches the permissions the current token has for the specified terraform organization.
Server says: read-only · toolset terraform
get_workspace_detailsFetches detailed information about a specific Terraform workspace, including configuration, variables, and current state information.
Server says: read-only · toolset terraform
list_runsList or search Terraform runs in a specific workspace with optional filtering.
Server says: read-only · toolset terraform
list_stacksList Stacks within a specified organization.
Server says: read-only · toolset terraform
list_state_versionsList all the State Versions for a given workspace and org name.
Server says: read-only · toolset terraform
list_teamsList teams within a Terraform Cloud organization.
Server says: read-only · toolset terraform
list_terraform_orgsFetches a list of all Terraform organizations.
Server says: read-only · toolset terraform
list_terraform_projectsFetches a list of all Terraform projects.
Server says: read-only · toolset terraform
list_variable_setsList all variable sets in an organization.
Server says: destructive · toolset terraform
Our call: Marked destructive, but it only lists. Terraform Cloud never returns the value of a sensitive variable; other values come back in full.
list_workspace_policy_setsRead all policy sets attached to a workspace.
Server says: read-only and destructive · toolset terraform
Our call: Only reads. The server marks it read-only and destructive at once.
list_workspace_variablesList all variables in a Terraform workspace.
Server says: destructive · toolset terraform
Our call: Marked destructive, but it only lists. Terraform Cloud never returns the value of a sensitive variable; other values come back in full.
list_workspacesSearch and list Terraform workspaces within a specified organization.
Server says: read-only · toolset terraform
read_workspace_tagsRead all tags from a Terraform workspace.
Server says: read-only · toolset terraform
search_modulesResolves a Terraform module name to obtain a compatible module_id for the get_module_details tool and returns a list of matching Terraform modules.
Server says: read-only · toolset registry
search_policiesSearches for Terraform policies based on a query string.
Server says: read-only · toolset registry
search_private_modulesThis tool searches for private modules in your Terraform Cloud/Enterprise organization.
Server says: read-only · toolset registry-private
search_private_providersThis tool searches for private providers in your Terraform Cloud/Enterprise organization.
Server says: read-only · toolset registry-private
search_provider_docsThis tool retrieves a list of potential documents based on the 'service_slug' and 'provider_document_type' provided.
Server says: read-only · toolset registry
whoamiReturns the identity of the currently authenticated Terraform token.
Server says: read-only · toolset terraform
Let the reads run in Claude Code
Claude Code asks before every MCP tool it has no rule for. Added as terraform, this server’s tools are named mcp__terraform__<tool>. These allow rules, in .claude/settings.json or ~/.claude/settings.json, let the tools that only look run without a prompt. Everything else keeps asking, including any tool a later version of the server adds.
{
"permissions": {
"allow": [
"mcp__terraform__get_apply_details",
"mcp__terraform__get_apply_logs",
"mcp__terraform__get_latest_module_version",
"mcp__terraform__get_latest_provider_version",
"mcp__terraform__get_module_details",
"mcp__terraform__get_plan_details",
"mcp__terraform__get_plan_logs",
"mcp__terraform__get_policy_details",
"mcp__terraform__get_private_module_details",
"mcp__terraform__get_private_provider_details",
"mcp__terraform__get_project",
"mcp__terraform__get_provider_capabilities",
"mcp__terraform__get_provider_details",
"mcp__terraform__get_run_comments",
"mcp__terraform__get_run_details",
"mcp__terraform__get_stack_details",
"mcp__terraform__get_team",
"mcp__terraform__get_token_permissions",
"mcp__terraform__get_workspace_details",
"mcp__terraform__list_runs",
"mcp__terraform__list_stacks",
"mcp__terraform__list_state_versions",
"mcp__terraform__list_teams",
"mcp__terraform__list_terraform_orgs",
"mcp__terraform__list_terraform_projects",
"mcp__terraform__list_variable_sets",
"mcp__terraform__list_workspace_policy_sets",
"mcp__terraform__list_workspace_variables",
"mcp__terraform__list_workspaces",
"mcp__terraform__read_workspace_tags",
"mcp__terraform__search_modules",
"mcp__terraform__search_policies",
"mcp__terraform__search_private_modules",
"mcp__terraform__search_private_providers",
"mcp__terraform__search_provider_docs",
"mcp__terraform__whoami"
]
}
}The command that adds the server:
claude mcp add terraform -e TFE_TOKEN=$TFE_TOKEN -- docker run -i --rm -e TFE_TOKEN hashicorp/terraform-mcp-serverSend the rest to a person, not the terminal
A prompt in the terminal only works while someone is watching it. With this hook, every other tool of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher names the look-only tools, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.
{
"hooks": {
"PreToolUse": [
{
"matcher": "mcp__terraform__(?!(get_apply_details|get_apply_logs|get_latest_module_version|get_latest_provider_version|get_module_details|get_plan_details|get_plan_logs|get_policy_details|get_private_module_details|get_private_provider_details|get_project|get_provider_capabilities|get_provider_details|get_run_comments|get_run_details|get_stack_details|get_team|get_token_permissions|get_workspace_details|list_runs|list_stacks|list_state_versions|list_teams|list_terraform_orgs|list_terraform_projects|list_variable_sets|list_workspace_policy_sets|list_workspace_variables|list_workspaces|read_workspace_tags|search_modules|search_policies|search_private_modules|search_private_providers|search_provider_docs|whoami)$).*",
"hooks": [
{ "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
]
}
]
}
}Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.
Any MCP client: put the proxy in front
Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server, lets the look-only tools above through, and holds every other call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz login once to save a key, then use this in claude_desktop_config.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"terraform": {
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
"mcp-proxy",
"--name",
"terraform",
"--look-only",
"get_apply_details,get_apply_logs,get_latest_module_version,get_latest_provider_version,get_module_details,get_plan_details,get_plan_logs,get_policy_details,get_private_module_details,get_private_provider_details,get_project,get_provider_capabilities,get_provider_details,get_run_comments,get_run_details,get_stack_details,get_team,get_token_permissions,get_workspace_details,list_runs,list_stacks,list_state_versions,list_teams,list_terraform_orgs,list_terraform_projects,list_variable_sets,list_workspace_policy_sets,list_workspace_variables,list_workspaces,read_workspace_tags,search_modules,search_policies,search_private_modules,search_private_providers,search_provider_docs,whoami",
"--",
"docker",
"run",
"-i",
"--rm",
"-e",
"TFE_TOKEN",
"hashicorp/terraform-mcp-server"
],
"command": "npx",
"env": {
"TFE_TOKEN": "<TFE_TOKEN>"
}
}
}
}Already have it in Claude Desktop? One command rewrites the file for you, with these look-only tools filled in, and keeps the old one (setup vscode does the same for VS Code; how it works):
npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz setup claude-desktopThe same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__terraform, keeps Claude Code from asking a second time in the terminal:
claude mcp add terraform -e TFE_TOKEN=$TFE_TOKEN -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name terraform --look-only get_apply_details,get_apply_logs,get_latest_module_version,get_latest_provider_version,get_module_details,get_plan_details,get_plan_logs,get_policy_details,get_private_module_details,get_private_provider_details,get_project,get_provider_capabilities,get_provider_details,get_run_comments,get_run_details,get_stack_details,get_team,get_token_permissions,get_workspace_details,list_runs,list_stacks,list_state_versions,list_teams,list_terraform_orgs,list_terraform_projects,list_variable_sets,list_workspace_policy_sets,list_workspace_variables,list_workspaces,read_workspace_tags,search_modules,search_policies,search_private_modules,search_private_providers,search_provider_docs,whoami -- docker run -i --rm -e TFE_TOKEN hashicorp/terraform-mcp-serverPlans and state carry secrets
Three tools marked read-only ask here. get_plan_json_output fetched the plan from json-output, the unredacted endpoint; the password our stand-in put in the plan came back in the answer. get_state_version returns links to download the state file, which keeps every secret in plain text. get_sentinel_mock first creates a plan export, a write. For a plan review, get_plan_details and get_plan_logs show what will change with sensitive values hidden. Variables are another matter: Terraform Cloud hides only those marked sensitive, so a key stored without the flag comes back in full from get_workspace_details and the variable lists. Mark every secret sensitive before an agent gets a token.
See it before you decide.
The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.