Terraform Cloud MCP Server

A Model Context Protocol (MCP) server that integrates AI assistants with the Terraform Cloud API, allowing you to manage your infrastructure through

Remote serverstreamable-httpPython

What is the Terraform Cloud MCP Server?

A Model Context Protocol (MCP) server that integrates AI assistants with the Terraform Cloud API, allowing you to manage your infrastructure through natural

What the server does

  • Account Management — Get account details for authenticated users or service accounts
  • Workspace Management — Create, read, update, lock/unlock workspaces, and optionally delete workspaces (with safety controls)
  • Project Management — Create, list, update projects, and optionally delete projects; manage project tag bindings and move workspaces between projects
  • Run Management — Create runs, list runs, get run details, apply/discard/cancel runs
  • Plan Management — Retrieve plan details and JSON execution output with advanced HTTP redirect handling
  • Apply Management — Get apply details and recover from failed state uploads

Credentials and setup notes

  • Python 3.12+ - MCP (includes FastMCP and development tools) - uv package manager (recommended) or pip - Terraform Cloud API token

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
get_account_details): Gets account information for the authenticated user or service account.
list_workspacesorganization, page_number, page_size, search): List and filter workspaces.
get_workspace_detailsworkspace_id, organization, workspace_name): Get detailed information about a specific workspace.
create_workspaceorganization, name, params): Create a new workspace with optional parameters.
update_workspaceorganization, workspace_name, params): Update an existing workspace's configuration.
delete_workspaceorganization, workspace_name): Delete a workspace and all its content.
safe_delete_workspaceorganization, workspace_name): Delete only if the workspace isn't managing any resources.
lock_workspaceworkspace_id, reason): Lock a workspace to prevent runs.
unlock_workspaceworkspace_id): Unlock a workspace to allow runs.
force_unlock_workspaceworkspace_id): Force unlock a workspace locked by another user.
set_data_retention_policyworkspace_id, days): Set a data retention policy.
get_data_retention_policyworkspace_id): Get the current data retention policy.
delete_data_retention_policyworkspace_id): Delete the data retention policy. -->
create_runworkspace_id, params): Create and queue a Terraform run in a workspace using its ID.
list_runs_in_workspaceworkspace_id, ...): List and filter runs in a specific workspace using its ID.
list_runs_in_organizationorganization, ...): List and filter runs across an entire organization.
get_run_detailsrun_id): Get detailed information about a specific run.
apply_runrun_id, comment): Apply a run waiting for confirmation.
discard_runrun_id, comment): Discard a run waiting for confirmation.
cancel_runrun_id, comment): Cancel a run currently planning or applying.
force_cancel_runrun_id, comment): Forcefully cancel a run immediately.
force_execute_runrun_id): Forcefully execute a pending run by canceling prior runs.
get_plan_detailsplan_id): Get detailed information about a specific plan.
get_plan_json_outputplan_id): Retrieve the JSON execution plan for a specific plan with proper redirect handling.
get_run_plan_json_outputrun_id): Retrieve the JSON execution plan from a run with proper redirect handling.
get_plan_logsplan_id): Retrieve logs from a plan operation.
get_apply_detailsapply_id): Get detailed information about a specific apply.
get_errored_stateapply_id): Retrieve the errored state from a failed apply for recovery.
get_apply_logsapply_id): Retrieve logs from an apply operation.
create_projectorganization, name, params): Create a new project with optional parameters.
update_projectproject_id, params): Update an existing project's configuration.
list_projectsorganization, ...): List and filter projects in an organization.
get_project_detailsproject_id): Get detailed information about a specific project.
delete_projectproject_id): Delete a project (fails if it contains workspaces). Requires ENABLE_DELETE_TOOLS=true
list_project_tag_bindingsproject_id): List tags bound to a project.
add_update_project_tag_bindingsproject_id, tag_bindings): Add or update tag bindings on a project.
move_workspaces_to_projectproject_id, workspace_ids): Move workspaces into a project.
get_organization_detailsorganization): Get detailed information about a specific organization.
get_organization_entitlementsorganization): Show entitlement set for organization features.
list_organizationspage_number, page_size, query, query_email, query_name): List and filter organizations.
create_organizationname, email, params): Create a new organization with optional parameters.
update_organizationorganization, params): Update an existing organization's settings.
delete_organizationorganization): Delete an organization and all its content. Requires ENABLE_DELETE_TOOLS=true
get_cost_estimate_detailscost_estimate_id): Get detailed information about a specific cost estimate, including resource counts (matched and unmatched), prior monthly cost, proposed mont
get_assessment_result_detailsassessment_result_id): Get detailed information about a specific health assessment result.
get_assessment_json_outputassessment_result_id): Retrieve the JSON execution plan from an assessment result.
get_assessment_json_schemaassessment_result_id): Retrieve the JSON schema file from an assessment result.
get_assessment_log_outputassessment_result_id): Retrieve logs from an assessment result operation.
list_state_versionsorganization, workspace_name, page_number, page_size, filter_status): List and filter state versions in a workspace.
get_current_state_versionworkspace_id): Get the current state version for a workspace.
get_state_versionstate_version_id): Get details for a specific state version.
create_state_versionworkspace_id, serial, md5, params): Create a new state version in a workspace.
download_state_filestate_version_id, json_format): Download the raw or JSON formatted state file.
list_state_version_outputsstate_version_id, page_number, page_size): List outputs for a specific state version.
get_state_version_outputstate_version_output_id): Get details for a specific state version output.
list_workspace_variablesworkspace_id): List all variables (Terraform and environment) for a workspace.
create_workspace_variableworkspace_id, key, category, params): Create a new variable in a workspace.
update_workspace_variableworkspace_id, variable_id, params): Update an existing workspace variable.
delete_workspace_variableworkspace_id, variable_id): Delete a workspace variable. Requires ENABLE_DELETE_TOOLS=true
list_variable_setsorganization, page_number, page_size): List variable sets in an organization.
get_variable_setvarset_id): Get details for a specific variable set.
create_variable_setorganization, name, params): Create a new variable set.
update_variable_setvarset_id, params): Update an existing variable set.
delete_variable_setvarset_id): Delete a variable set and all its variables. Requires ENABLE_DELETE_TOOLS=true
assign_variable_set_to_workspacesvarset_id, workspace_ids): Assign a variable set to workspaces.
unassign_variable_set_from_workspacesvarset_id, workspace_ids): Remove a variable set from workspaces.
assign_variable_set_to_projectsvarset_id, project_ids): Assign a variable set to projects.
unassign_variable_set_from_projectsvarset_id, project_ids): Remove a variable set from projects.
list_variables_in_variable_setvarset_id): List all variables in a variable set.
create_variable_in_variable_setvarset_id, key, category, params): Create a variable in a variable set.
update_variable_in_variable_setvarset_id, var_id, params): Update a variable in a variable set.
delete_variable_from_variable_setvarset_id, var_id): Delete a variable from a variable set. Requires ENABLE_DELETE_TOOLS=true

How to install the Terraform Cloud MCP Server

{
  "mcpServers": {
    "terraform-cloud-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TFC_TOKEN",
        "-e",
        "TFC_ADDRESS",
        "-e",
        "ENABLE_DELETE_TOOLS",
        "-e",
        "READ_ONLY_TOOLS",
        "terraform-cloud-mcp:latest"
      ],
      "env": {
        "TFC_TOKEN": "YOUR_TFC_TOKEN",
        "TFC_ADDRESS": "https://app.terraform.io",
        "ENABLE_DELETE_TOOLS": "false",
        "READ_ONLY_TOOLS": "false"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Python 3.12+ - MCP (includes FastMCP and development tools) - uv package manager (recommended) or pip - Terraform Cloud API token
VariableDescriptionRequired
TFC_TOKENDeclared in the maintainer’s client configuration.Yes
TFC_ADDRESSDeclared in the maintainer’s client configuration.Optional
ENABLE_DELETE_TOOLSDeclared in the maintainer’s client configuration.Optional
READ_ONLY_TOOLSDeclared in the maintainer’s client configuration.Optional

Example prompts to try

  • “Use Terraform Cloud MCP to Prerequisites.”
  • “Use Terraform Cloud MCP to Installation.”

Frequently asked questions

A Model Context Protocol (MCP) server that integrates AI assistants with the Terraform Cloud API, allowing you to manage your infrastructure through natural Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.