get_account_detailsLABSCO SUMMARY
Two independent safety switches, both off in the direction you want.
Deletes require ENABLE_DELETE_TOOLS before they exist at all, and READ_ONLY_TOOLS strips every write in one setting — so a production connection and a sandbox one can be genuinely different rather than differing by discipline. safe_delete_workspace deserves the name: it refuses when the workspace still manages resources. The response filtering is described as conservative, trimming 5-15% of tokens while keeping the accountability and change-tracking fields an audit would need.
What it is
A Terraform Cloud server built on Pydantic models and organised by domain. It covers the API surface an operator actually uses day to day, and separates the destructive parts behind an explicit environment flag.
What you get
- Workspaces: list_workspaces, get_workspace_details, create_workspace, update_workspace, plus lock_workspace, unlock_workspace and force_unlock_workspace
- Runs: create_run, list_runs_in_workspace, list_runs_in_organization, get_run_details, apply_run, discard_run, cancel_run, force_cancel_run and force_execute_run
- Plans and applies: get_plan_details, get_plan_json_output, get_run_plan_json_output, get_plan_logs, get_apply_details, get_apply_logs, and get_errored_state for recovering from a failed state upload
- Projects and organizations, including tag bindings, moving workspaces between projects, and organization entitlements
- State: list_state_versions, get_current_state_version, get_state_version, create_state_version, download_state_file, and the state version outputs tools
- Variables: workspace variables, variable sets, the variables inside them, and assignment to workspaces and projects — sensitive values stay hidden
- get_cost_estimate_details returns matched and unmatched resource counts, prior monthly cost, proposed monthly cost and the delta
- Assessment results: details, JSON plan output, JSON schema and logs from a health assessment
- READ_ONLY_TOOLS=true removes every create, update, delete, apply and state-modifying tool; ENABLE_DELETE_TOOLS must be true before any delete works
- safe_delete_workspace deletes only when the workspace manages no resources
Requirements
Python 3.12 or newer with uv, or the repository's Docker image. TFC_TOKEN is required — a user API token created from User Settings then Tokens in HCP Terraform. TFC_ADDRESS points at a self-hosted Terraform Enterprise instance and defaults to https://app.terraform.io. ENABLE_DELETE_TOOLS and READ_ONLY_TOOLS default to false. Version 0.8.20.
Setup effort
Build from source — git clone https://github.com/severity1/terraform-cloud-mcp.git
USE CASES
Finding out why a run is stuck
Run details, then the plan JSON and the logs behind it.
Approving or abandoning a waiting run
Apply, discard or cancel with a comment, from the conversation.
Reading a plan's cost impact
Prior monthly cost, proposed monthly cost and the delta, plus matched and unmatched resource counts.
Auditing variables across an organization
Workspace variables and variable sets read together, with sensitive values withheld.
Recovering after a failed apply
Pull the errored state off the apply instead of reconstructing it.
Giving a team read-only access
One environment variable removes every write tool from the surface.
69 tools
Listed in project docs. Your client may show a different list.
list_workspacesget_workspace_detailscreate_workspaceupdate_workspacedelete_workspacesafe_delete_workspacelock_workspaceunlock_workspaceforce_unlock_workspacecreate_runlist_runs_in_workspacelist_runs_in_organizationget_run_detailsapply_rundiscard_runcancel_runforce_cancel_runforce_execute_runget_plan_detailsget_plan_json_outputget_run_plan_json_outputget_plan_logsget_apply_detailsget_errored_stateget_apply_logscreate_projectupdate_projectlist_projectsget_project_detailsdelete_projectlist_project_tag_bindingsadd_update_project_tag_bindingsmove_workspaces_to_projectget_organization_detailsget_organization_entitlementslist_organizationscreate_organizationupdate_organizationdelete_organizationget_cost_estimate_detailsget_assessment_result_detailsget_assessment_json_outputget_assessment_json_schemaget_assessment_log_outputlist_state_versionsget_current_state_versionget_state_versioncreate_state_versiondownload_state_filelist_state_version_outputsget_state_version_outputlist_workspace_variablescreate_workspace_variableupdate_workspace_variabledelete_workspace_variablelist_variable_setsget_variable_setcreate_variable_setupdate_variable_setdelete_variable_setassign_variable_set_to_workspacesunassign_variable_set_from_workspacesassign_variable_set_to_projectsunassign_variable_set_from_projectslist_variables_in_variable_setcreate_variable_in_variable_setupdate_variable_in_variable_setdelete_variable_from_variable_setBEFORE YOU INSTALL
What to know first
Tools you get
69 tools named in the project's documentation.
Requires
- Python 3.12+
- TFC_TOKEN in your environment
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/severity1/terraform-cloud-mcp.git
cd terraform-cloud-mcp
uv venv
source .venv/bin/activate
uv pip install .MCP Clients
Claude Code
claude mcp add -e TFC_TOKEN=<YOUR_TFC_TOKEN> -e ENABLE_DELETE_TOOLS=false -s user terraform-cloud-mcp -- "terraform-cloud-mcp"Run this after the local install steps above: terraform-cloud-mcp is the command that install puts in the clone's .venv, so it has to be on the PATH Claude Code starts with (for example, start Claude Code with .venv activated). <YOUR_TFC_TOKEN> is your Terraform Cloud API token.
Claude Desktop — local install
{
"mcpServers": {
"terraform-cloud-mcp": {
"command": "<YOUR_PATH_TO_UV>",
"args": [
"--directory",
"<YOUR_PATH_TO_TERRAFORM_CLOUD_MCP>",
"run",
"terraform-cloud-mcp"
],
"env": {
"TFC_TOKEN": "<YOUR_TFC_TOKEN>",
"TFC_ADDRESS": "https://app.terraform.io",
"ENABLE_DELETE_TOOLS": "false",
"READ_ONLY_TOOLS": "false"
}
}
}
}Use this after the local install steps above. <YOUR_PATH_TO_UV> is the output of which uv, and <YOUR_PATH_TO_TERRAFORM_CLOUD_MCP> is the full path to your clone, and <YOUR_TFC_TOKEN> is your Terraform Cloud API token.
Claude Desktop — Docker
git clone https://github.com/severity1/terraform-cloud-mcp.git
cd terraform-cloud-mcp
docker build -t terraform-cloud-mcp:latest .{
"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"
}
}
}
}Build the terraform-cloud-mcp:latest image from your clone first (the steps above); this block runs that local image. <YOUR_TFC_TOKEN> is your Terraform Cloud API token.