Skip to main content
Glama
terraform-cloud-mcp

terraform-cloud-mcp

by severity1

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 conversation. Built with Pydantic models and structured around domain-specific modules, this server is compatible with any MCP-supporting platform including Claude, Claude Code CLI, Claude Desktop, Cursor, Copilot Studio, and others.

Version Python Type Checking Code Quality


Features

  • 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.

  • Organization Management: List, create, update organizations, view organization entitlements, and optionally delete organizations (with safety controls).

  • Cost Estimation: Retrieve detailed cost estimates for infrastructure changes including proposed monthly costs, prior costs, resource counts, and usage projections.

  • Assessment Results: Retrieve health assessment details, JSON output, schema files, and logs from Terraform Cloud health assessments.

  • State Version Management: List, retrieve, create, and download state versions; get current state for workspaces.

  • State Version Outputs: List and retrieve specific outputs from state versions including values and sensitivity information.

  • Variables Management: Complete workspace variable and variable set management including creation, updates, assignments, and optionally deletion (with safety controls).

Performance Features

  • Audit-Safe Response Filtering: Conservative token optimization (5-15% reduction) with 100% audit compliance - preserves all user accountability, security configuration, and change tracking data for comprehensive compliance scenarios.

Safety Features

  • Destructive Operation Controls: Delete operations are disabled by default and require explicit enablement via environment variable

  • Read-Only Mode: All write operations can be disabled with READ_ONLY_TOOLS=true for maximum safety in production environments

  • Destructive Hints: MCP clients receive proper destructive operation warnings for potentially dangerous tools

  • Environment-Based Safety: Production and development environments can have different safety configurations


Related MCP server: Claude Code MCP

Quick Start

Prerequisites

  • Python 3.12+

  • MCP (includes FastMCP and development tools)

  • uv package manager (recommended) or pip

  • Terraform Cloud API token

Creating a Terraform Cloud API Token

To use this MCP server, you need a Terraform Cloud (or Terraform Enterprise) API token:

  1. Sign in to HCP Terraform (or your Terraform Enterprise instance)

  2. Click your avatar in the top-right corner and select User Settings

  3. Navigate to Tokens in the left sidebar

  4. Click Create an API token

  5. Provide a description (e.g., "MCP Server")

  6. Set an expiration date (recommended for security)

  7. Click Generate token

  8. Copy the token immediately - it will only be shown once

Use this token as your TFC_TOKEN environment variable in the configuration steps below.

For more information about API token types and permissions, see the HCP Terraform API Tokens documentation.

Environment Variables

  • TFC_TOKEN - Terraform Cloud API token (required)

  • TFC_ADDRESS - Terraform Cloud/Enterprise address (optional, defaults to https://app.terraform.io)

  • ENABLE_DELETE_TOOLS - Enable/disable destructive operations (optional, defaults to false)

  • READ_ONLY_TOOLS - Enable only read-only operations (optional, defaults to false)

  • ENABLE_RAW_RESPONSE - Return raw vs filtered responses (optional, defaults to false)


Installation

Option 1: Local Installation

# Clone the repository
git clone https://github.com/severity1/terraform-cloud-mcp.git
cd terraform-cloud-mcp

# Create virtual environment and activate it
uv venv
source .venv/bin/activate

# Install package
uv pip install .

Option 2: Docker Installation

# Clone the repository
git clone https://github.com/severity1/terraform-cloud-mcp.git
cd terraform-cloud-mcp

# Build the Docker image
docker build -t terraform-cloud-mcp:latest .

Adding to Claude Environments

Adding to Claude Code CLI

# Add to Claude Code with your Terraform Cloud token
claude mcp add -e TFC_TOKEN=YOUR_TF_TOKEN -e ENABLE_DELETE_TOOLS=false -s user terraform-cloud-mcp -- "terraform-cloud-mcp"

# To use a self-hosted Terraform Enterprise instance:
# claude mcp add -e TFC_TOKEN=YOUR_TF_TOKEN -e TFC_ADDRESS=https://terraform.example.com -s user terraform-cloud-mcp -- "terraform-cloud-mcp"

# To enable delete operations (use with caution):
# claude mcp add -e TFC_TOKEN=YOUR_TF_TOKEN -e ENABLE_DELETE_TOOLS=true -s user terraform-cloud-mcp -- "terraform-cloud-mcp"

Adding to Claude Desktop

Create a claude_desktop_config.json configuration file:

  • mac: ~/Library/Application Support/Claude/claude_desktop_config.json

  • win: %APPDATA%\Claude\claude_desktop_config.json

Local Installation Configuration:
{
  "mcpServers": {
    "terraform-cloud-mcp": {
      "command": "/path/to/uv", # Get this by running: `which uv`
      "args": [
        "--directory",
        "/path/to/your/terraform-cloud-mcp", # Full path to this project
        "run",
        "terraform-cloud-mcp"
      ],
      "env": {
        "TFC_TOKEN": "your_actual_token_here", # replace with actual token
        "TFC_ADDRESS": "https://app.terraform.io", # optional, change for self-hosted TFE
        "ENABLE_DELETE_TOOLS": "false", # set to "true" to enable destructive operations/tools
        "READ_ONLY_TOOLS": "false" # set to  "true" to only enable ready-only operations/tools
      }
    }
  }
}
Docker Configuration:
{
  "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_actual_token_here",
        "TFC_ADDRESS": "https://app.terraform.io",
        "ENABLE_DELETE_TOOLS": "false",
        "READ_ONLY_TOOLS": "false"
      }
    }
  }
}

Replace your_terraform_cloud_token with your actual Terraform Cloud API token.

Other MCP-Compatible Platforms

For other platforms (like Cursor, Copilot Studio, or Glama), follow their platform-specific instructions for adding an MCP server. Most platforms require:

  1. The server path or command to start the server.

  2. Environment variables for the Terraform Cloud API token (TFC_TOKEN).

  3. Optional environment variable for self-hosted Terraform Enterprise (TFC_ADDRESS).

  4. Optional environment variable to enable delete operations (ENABLE_DELETE_TOOLS=true for destructive operations).

  5. Optional environment variable for read-only mode (READ_ONLY_TOOLS=true to disable all write operations).

  6. Configuration to auto-start the server when needed.


Available Tools

Note: When READ_ONLY_TOOLS=true, all create, update, delete, apply, and state modification operations are disabled. Only read operations (list, get, view) remain available.

Account Tools

  • get_account_details(): Gets account information for the authenticated user or service account.

Workspace Management Tools

  • list_workspaces(organization, page_number, page_size, search): List and filter workspaces.

  • get_workspace_details(workspace_id, organization, workspace_name): Get detailed information about a specific workspace.

Create & Update

  • create_workspace(organization, name, params): Create a new workspace with optional parameters.

  • update_workspace(organization, workspace_name, params): Update an existing workspace's configuration.

Delete (Requires ENABLE_DELETE_TOOLS=true)

  • delete_workspace(organization, workspace_name): Delete a workspace and all its content.

  • safe_delete_workspace(organization, workspace_name): Delete only if the workspace isn't managing any resources.

Note: Delete operations are disabled by default for safety. Set ENABLE_DELETE_TOOLS=true to enable these destructive operations.

Lock & Unlock

  • lock_workspace(workspace_id, reason): Lock a workspace to prevent runs.

  • unlock_workspace(workspace_id): Unlock a workspace to allow runs.

  • force_unlock_workspace(workspace_id): Force unlock a workspace locked by another user.

Run Management Tools

  • create_run(workspace_id, params): Create and queue a Terraform run in a workspace using its ID.

  • list_runs_in_workspace(workspace_id, ...): List and filter runs in a specific workspace using its ID.

  • list_runs_in_organization(organization, ...): List and filter runs across an entire organization.

  • get_run_details(run_id): Get detailed information about a specific run.

  • apply_run(run_id, comment): Apply a run waiting for confirmation.

  • discard_run(run_id, comment): Discard a run waiting for confirmation.

  • cancel_run(run_id, comment): Cancel a run currently planning or applying.

  • force_cancel_run(run_id, comment): Forcefully cancel a run immediately.

  • force_execute_run(run_id): Forcefully execute a pending run by canceling prior runs.

Plan Management Tools

  • get_plan_details(plan_id): Get detailed information about a specific plan.

  • get_plan_json_output(plan_id): Retrieve the JSON execution plan for a specific plan with proper redirect handling.

  • get_run_plan_json_output(run_id): Retrieve the JSON execution plan from a run with proper redirect handling.

  • get_plan_logs(plan_id): Retrieve logs from a plan operation.

Apply Management Tools

  • get_apply_details(apply_id): Get detailed information about a specific apply.

  • get_errored_state(apply_id): Retrieve the errored state from a failed apply for recovery.

  • get_apply_logs(apply_id): Retrieve logs from an apply operation.

Project Management Tools

  • create_project(organization, name, params): Create a new project with optional parameters.

  • update_project(project_id, params): Update an existing project's configuration.

  • list_projects(organization, ...): List and filter projects in an organization.

  • get_project_details(project_id): Get detailed information about a specific project.

  • delete_project(project_id): Delete a project (fails if it contains workspaces). Requires ENABLE_DELETE_TOOLS=true

  • list_project_tag_bindings(project_id): List tags bound to a project.

  • add_update_project_tag_bindings(project_id, tag_bindings): Add or update tag bindings on a project.

  • move_workspaces_to_project(project_id, workspace_ids): Move workspaces into a project.

Organization Management Tools

  • get_organization_details(organization): Get detailed information about a specific organization.

  • get_organization_entitlements(organization): Show entitlement set for organization features.

  • list_organizations(page_number, page_size, query, query_email, query_name): List and filter organizations.

  • create_organization(name, email, params): Create a new organization with optional parameters.

  • update_organization(organization, params): Update an existing organization's settings.

  • delete_organization(organization): Delete an organization and all its content. Requires ENABLE_DELETE_TOOLS=true

Cost Estimation Tools

  • get_cost_estimate_details(cost_estimate_id): Get detailed information about a specific cost estimate, including resource counts (matched and unmatched), prior monthly cost, proposed monthly cost, and delta monthly cost estimations. Use run relationships to find cost estimate IDs for specific runs.

Assessment Results Tools

  • get_assessment_result_details(assessment_result_id): Get detailed information about a specific health assessment result.

  • get_assessment_json_output(assessment_result_id): Retrieve the JSON execution plan from an assessment result.

  • get_assessment_json_schema(assessment_result_id): Retrieve the JSON schema file from an assessment result.

  • get_assessment_log_output(assessment_result_id): Retrieve logs from an assessment result operation.

State Version Management Tools

  • list_state_versions(organization, workspace_name, page_number, page_size, filter_status): List and filter state versions in a workspace.

  • get_current_state_version(workspace_id): Get the current state version for a workspace.

  • get_state_version(state_version_id): Get details for a specific state version.

  • create_state_version(workspace_id, serial, md5, params): Create a new state version in a workspace.

  • download_state_file(state_version_id, json_format): Download the raw or JSON formatted state file.

State Version Outputs Tools

  • list_state_version_outputs(state_version_id, page_number, page_size): List outputs for a specific state version.

  • get_state_version_output(state_version_output_id): Get details for a specific state version output.

Variables Management Tools

Workspace Variables

  • list_workspace_variables(workspace_id): List all variables (Terraform and environment) for a workspace.

  • create_workspace_variable(workspace_id, key, category, params): Create a new variable in a workspace.

  • update_workspace_variable(workspace_id, variable_id, params): Update an existing workspace variable.

  • delete_workspace_variable(workspace_id, variable_id): Delete a workspace variable. Requires ENABLE_DELETE_TOOLS=true

Variable Sets

  • list_variable_sets(organization, page_number, page_size): List variable sets in an organization.

  • get_variable_set(varset_id): Get details for a specific variable set.

  • create_variable_set(organization, name, params): Create a new variable set.

  • update_variable_set(varset_id, params): Update an existing variable set.

  • delete_variable_set(varset_id): Delete a variable set and all its variables. Requires ENABLE_DELETE_TOOLS=true

  • assign_variable_set_to_workspaces(varset_id, workspace_ids): Assign a variable set to workspaces.

  • unassign_variable_set_from_workspaces(varset_id, workspace_ids): Remove a variable set from workspaces.

  • assign_variable_set_to_projects(varset_id, project_ids): Assign a variable set to projects.

  • unassign_variable_set_from_projects(varset_id, project_ids): Remove a variable set from projects.

Variable Set Variables

  • list_variables_in_variable_set(varset_id): List all variables in a variable set.

  • create_variable_in_variable_set(varset_id, key, category, params): Create a variable in a variable set.

  • update_variable_in_variable_set(varset_id, var_id, params): Update a variable in a variable set.

  • delete_variable_from_variable_set(varset_id, var_id): Delete a variable from a variable set. Requires ENABLE_DELETE_TOOLS=true

Note: Variable management includes both Terraform input variables and environment variables. Sensitive variables have their values hidden for security. Delete operations are disabled by default and require ENABLE_DELETE_TOOLS=true.


Development Guide

For detailed development guidance including code standards, Pydantic patterns, and contribution workflows, see our Development Documentation.

Quick Development Setup

# Clone the repository
git clone https://github.com/severity1/terraform-cloud-mcp.git
cd terraform-cloud-mcp

# Create virtual environment and activate it
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install in development mode with development dependencies
uv pip install -e .
uv pip install black mypy pydantic ruff

Basic Development Commands

# Run the server in development mode
mcp dev terraform_cloud_mcp/server.py

# Run tests and quality checks
uv run -m mypy .
uv run -m ruff check .
uv run -m black .

For detailed information on code organization, architecture, development workflows, and code quality guidelines, refer to docs/DEVELOPMENT.md.


Documentation

The codebase includes comprehensive documentation:

  • Code Comments: Focused on explaining the "why" behind implementation decisions

  • Docstrings: All public functions and classes include detailed docstrings

  • Implementation References: Development documentation now references actual code examples rather than using code snippets

  • Example Files: The docs/ directory contains detailed examples for each domain:

    • docs/FILTERING_SYSTEM.md: Comprehensive guide to the audit-safe response filtering system (5-15% token reduction, 100% audit compliance)

    • docs/DEVELOPMENT.md: Development standards and coding guidelines with references to actual code

    • docs/API_REFERENCES.md: Terraform Cloud API documentation links with implementation status

    • docs/CONTRIBUTING.md: Guidelines for contributing to the project

    • docs/models/: Reference documentation for all model types

    • docs/tools/: Detailed reference documentation for each tool

    • docs/conversations/: Sample conversation flows with the API

Troubleshooting

  1. Check server logs (debug logging is enabled by default)

  2. Use the MCP Inspector (http://localhost:5173) for debugging

  3. Debug logging is already enabled in server.py:

    import logging
    logging.basicConfig(level=logging.DEBUG)

Contributing

Contributions are welcome! Please open an issue or pull request if you'd like to contribute to this project.

See our Contributing Guide for detailed instructions on how to get started, code quality standards, and the pull request process.

Disclaimer

This project is not affiliated with, associated with, or endorsed by HashiCorp or Terraform. "Terraform" and "Terraform Cloud" are trademarks of HashiCorp. This project merely interacts with the Terraform Cloud public API under fair use.

Available Tools

62 tools
add_update_project_tag_bindingsA

Add or update tag bindings on a project.

Adds new tag bindings or updates existing ones on a project. This is an additive operation that doesn't remove existing tags.

API endpoint: PATCH /projects/{project_id}/tag-bindings

Args: project_id: The ID of the project (format: "prj-xxxxxxxx") tag_bindings: List of TagBinding objects with key-value pairs to add or update

Returns: The complete list of updated tag bindings for the project

See: docs/tools/project.md for reference documentation

Inputs: project_id (required), tag_bindings (required).

apply_runA

Apply a run that is paused waiting for confirmation after a plan

Confirms and executes the apply phase for a run that has completed planning and is waiting for approval. Use this when you've reviewed the plan output and want to apply the proposed changes to your infrastructure.

API endpoint: POST /runs/{run_id}/actions/apply

Args: run_id: The ID of the run to apply (format: "run-xxxxxxxx") comment: An optional comment explaining the reason for applying the run

Returns: Run details with updated status information and confirmation of the apply action including timestamp information and any comment provided

See: docs/tools/run.md for reference documentation

Inputs: run_id (required), comment.

assign_variable_set_to_projectsA

Assign a variable set to one or more projects.

Makes the variables in a variable set available to all workspaces within the specified projects.

API endpoint: POST /varsets/{varset_id}/relationships/projects

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") project_ids: List of project IDs (format: ["prj-xxxxxxxx", ...])

Returns: Empty response with HTTP 204 status code if successful

See: docs/tools/variables.md#assign-variable-set-to-projects for reference documentation

Inputs: varset_id (required), project_ids (required).

assign_variable_set_to_workspacesA

Assign a variable set to one or more workspaces.

Makes the variables in a variable set available to the specified workspaces. Variables from variable sets take precedence over workspace variables if the variable set has priority enabled.

API endpoint: POST /varsets/{varset_id}/relationships/workspaces

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") workspace_ids: List of workspace IDs (format: ["ws-xxxxxxxx", ...])

Returns: Empty response with HTTP 204 status code if successful

See: docs/tools/variables.md#assign-variable-set-to-workspaces for reference documentation

Inputs: varset_id (required), workspace_ids (required).

cancel_runA

Cancel a run that is currently planning or applying

Gracefully stops an in-progress run during planning or applying phases. Use this when you need to stop a run that's taking too long, consuming too many resources, or needs to be stopped for any reason. The operation attempts to cleanly terminate the run by sending an interrupt signal.

API endpoint: POST /runs/{run_id}/actions/cancel

Args: run_id: The ID of the run to cancel (format: "run-xxxxxxxx") comment: An optional explanation for why the run was canceled

Returns: Run status update with canceled state, timestamp of cancellation, and any provided comment in the response metadata

See: docs/tools/run.md for reference documentation

Inputs: run_id (required), comment.

create_organizationA

Create a new organization in Terraform Cloud

Creates a new organization with the given name and email, allowing workspaces and teams to be created within it. This is the first step in setting up a new environment in Terraform Cloud.

API endpoint: POST /organizations

Args: name: The name of the organization (required) email: Admin email address (required) params: Additional organization settings: - collaborator_auth_policy: Authentication policy (password or two_factor_mandatory) - session_timeout: Session timeout after inactivity in minutes - session_remember: Session total expiration time in minutes - cost_estimation_enabled: Whether to enable cost estimation for workspaces - default_execution_mode: Default workspace execution mode (remote, local, agent) - aggregated_commit_status_enabled: Whether to aggregate VCS status updates - speculative_plan_management_enabled: Whether to auto-cancel unused speculative plans - assessments_enforced: Whether to enforce health assessments for all workspaces - allow_force_delete_workspaces: Whether to allow deleting workspaces with resources - default_agent_pool_id: Default agent pool ID (required when using agent mode)

Returns: The created organization details including ID and created timestamp

See: docs/tools/organization.md for reference documentation

Inputs: name (required), email (required), params.

create_projectA

Create a new project in an organization.

Creates a new Terraform Cloud project which serves as a container for workspaces. Projects help organize workspaces into logical groups and can have their own settings and permissions.

API endpoint: POST /organizations/{organization}/projects

Args: organization: The name of the organization name: The name to give the project params: Additional project parameters (optional): - description: Human-readable description of the project - auto_destroy_activity_duration: How long each workspace should wait before auto-destroying (e.g., '14d', '24h') - tag_bindings: List of tag key-value pairs to bind to the project

Returns: The created project data including configuration, settings and metadata

See: docs/tools/project.md for reference documentation

Inputs: organization (required), name (required), params.

create_runA

Create a run in a workspace

Creates a new Terraform run to trigger infrastructure changes through Terraform Cloud, representing a single execution of plan and apply operations. The run queues in the workspace and executes based on the workspace's execution mode and settings. Use this to deploy new infrastructure, apply configuration changes, or destroy resources.

API endpoint: POST /runs

Args: workspace_id: The workspace ID to execute the run in (format: "ws-xxxxxxxx") params: Optional run configuration with: - message: Description of the run's purpose - is_destroy: Whether to destroy all resources managed by the workspace - auto_apply: Whether to auto-apply after a successful plan - refresh: Whether to refresh Terraform state before planning - refresh_only: Only refresh the state without planning changes - plan_only: Create a speculative plan without applying - allow_empty_apply: Allow applying when there are no changes - target_addrs: List of resource addresses to specifically target - replace_addrs: List of resource addresses to force replacement - variables: Run-specific variables that override workspace variables - terraform_version: Specific Terraform version to use for this run - save_plan: Save the plan for later execution - debugging_mode: Enable extended debug logging

Returns: The created run details with ID, status, configuration information, workspace relationship, and links to associated resources

See: docs/tools/run.md for reference documentation

Inputs: workspace_id (required), params.

create_state_versionA

Create a state version in a workspace.

Creates a new state version and sets it as the current state version for the given workspace. The workspace must be locked by the user creating a state version. This is most useful for migrating existing state from Terraform Community edition into a new HCP Terraform workspace.

API endpoint: POST /workspaces/:workspace_id/state-versions

Args: workspace_id: The ID of the workspace (format: "ws-xxxxxxxx") serial: The serial number of this state instance md5: An MD5 hash of the raw state version params: Additional state version parameters (optional): - state: Base64 encoded raw state file - lineage: Lineage of the state version - json_state: Base64 encoded JSON state - json_state_outputs: Base64 encoded JSON state outputs - run_id: The ID of the run to associate with the state version

Returns: The created state version data including download URLs and status information

See: docs/tools/state_versions.md for reference documentation

Inputs: workspace_id (required), serial (required), md5 (required), params.

create_variable_in_variable_setA

Create a new variable in a variable set.

Creates a new Terraform or environment variable within a variable set. Variables can be marked as sensitive to hide their values.

API endpoint: POST /varsets/{varset_id}/relationships/vars

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") key: The variable name/key category: Variable category ("terraform" or "env")

params: Additional variable parameters (optional):
    - value: Variable value
    - description: Description of the variable
    - hcl: Whether the value is HCL code (terraform variables only)
    - sensitive: Whether the variable value is sensitive

Returns: The created variable with its configuration and metadata

See: docs/tools/variables.md#create-variable-in-variable-set for reference documentation

Inputs: varset_id (required), key (required), category (required), params.

create_variable_setA

Create a new variable set in an organization.

Creates a new variable set which can be used to manage variables across multiple workspaces and projects.

API endpoint: POST /organizations/{organization}/varsets

Args: organization: The name of the organization name: The name to give the variable set

params: Additional variable set parameters (optional):
    - description: Description of the variable set
    - global: Whether this is a global variable set
    - priority: Whether this variable set takes priority over workspace variables

Returns: The created variable set with its configuration and metadata

See: docs/tools/variables.md#create-variable-set for reference documentation

Inputs: organization (required), name (required), params.

create_workspaceA

Create a new workspace in an organization.

Creates a new Terraform Cloud workspace which serves as an isolated environment for managing infrastructure. Workspaces contain variables, state files, and run histories for a specific infrastructure configuration.

API endpoint: POST /organizations/{organization}/workspaces

Args: organization: The name of the organization name: The name to give the workspace

params: Additional workspace parameters (optional):
    - description: Human-readable description of the workspace
    - execution_mode: How Terraform runs are executed (remote, local, agent)
    - terraform_version: Version of Terraform to use (default: latest)
    - working_directory: Subdirectory to use when running Terraform
    - vcs_repo: Version control repository configuration
    - auto_apply: Whether to automatically apply successful plans
    - file_triggers_enabled: Whether file changes trigger runs
    - trigger_prefixes: Directories that trigger runs when changed
    - trigger_patterns: Glob patterns that trigger runs when files match
    - allow_destroy_plan: Whether to allow destruction plans
    - auto_apply_run_trigger: Whether to auto-apply changes from run triggers

Returns: The created workspace data including configuration, settings and metadata

See: docs/tools/workspace.md for reference documentation

Inputs: organization (required), name (required), params.

create_workspace_variableA

Create a new variable in a workspace.

Creates a new Terraform or environment variable within a workspace. Variables can be marked as sensitive to hide their values.

API endpoint: POST /workspaces/{workspace_id}/vars

Args: workspace_id: The ID of the workspace (format: "ws-xxxxxxxx") key: The variable name/key category: Variable category ("terraform" or "env")

params: Additional variable parameters (optional):
    - value: Variable value
    - description: Description of the variable
    - hcl: Whether the value is HCL code (terraform variables only)
    - sensitive: Whether the variable value is sensitive

Returns: The created variable with its configuration and metadata

See: docs/tools/variables.md#create-workspace-variable for reference documentation

Inputs: workspace_id (required), key (required), category (required), params.

discard_runA

Discard a run that is paused waiting for confirmation

Cancels a run without applying its changes, typically used when the plan shows undesired changes or after reviewing and rejecting a plan. This action removes the run from the queue and unlocks the workspace for new runs.

API endpoint: POST /runs/{run_id}/actions/discard

Args: run_id: The ID of the run to discard (format: "run-xxxxxxxx") comment: An optional explanation for why the run was discarded

Returns: Run status update with discarded state information, timestamp of the discard action, and user information

See: docs/tools/run.md for reference documentation

Inputs: run_id (required), comment.

download_state_fileB

Download the state file content.

Retrieves the raw state file or JSON formatted state file for a specific state version.

API endpoint: Uses the hosted URLs from GET /state-versions/:state_version_id

Args: state_version_id: The ID of the state version (format: "sv-xxxxxxxx") json_format: Whether to download the JSON formatted state (default: False)

Returns: The raw state file content or JSON formatted state content

See: docs/tools/state_versions.md for reference documentation

Inputs: state_version_id (required), json_format.

force_cancel_runA

Forcefully cancel a run immediately

Immediately terminates a run that hasn't responded to a normal cancel request. Use this as a last resort when a run is stuck and not responding to regular cancellation. This action bypasses the graceful shutdown process and forces the workspace to be unlocked.

API endpoint: POST /runs/{run_id}/actions/force-cancel

Args: run_id: The ID of the run to force cancel (format: "run-xxxxxxxx") comment: An optional explanation for why the run was force canceled

Returns: Run status update confirming forced cancellation with timestamp, user information, and workspace unlock status

See: docs/tools/run.md for reference documentation

Inputs: run_id (required), comment.

force_execute_runA

Forcefully execute a run by canceling all prior runs

Prioritizes a specific run by canceling other queued runs to unlock the workspace, equivalent to clicking "Run this plan now" in the UI. Use this when a run is stuck in the pending queue but needs immediate execution due to urgency or priority over other queued runs.

API endpoint: POST /runs/{run_id}/actions/force-execute

Args: run_id: The ID of the run to execute (format: "run-xxxxxxxx")

Returns: Status update confirming the run has been promoted to active status, with information about which runs were canceled to allow execution

See: docs/tools/run.md for reference documentation

Inputs: run_id (required).

force_unlock_workspaceA

Force unlock a workspace. This should be used with caution.

Forces a workspace to unlock even when the normal unlock process isn't possible. This is typically needed when a run has orphaned a lock or when the user who locked the workspace is unavailable. This operation requires admin privileges on the workspace.

WARNING: Forcing an unlock can be dangerous if the workspace is legitimately locked for active operations. Only use this when you are certain it's safe to unlock.

API endpoint: POST /workspaces/{workspace_id}/actions/force-unlock

Args: workspace_id: The ID of the workspace to force unlock (format: "ws-xxxxxxxx")

Returns: The workspace with updated lock status and related metadata

See: docs/tools/workspace.md for reference documentation

Inputs: workspace_id (required).

get_account_detailsA

Get account details for a Terraform Cloud API token

This endpoint shows information about the currently authenticated user or service account, useful for verifying identity, retrieving email address, and checking authentication status. It returns the same type of object as the Users API, but also includes an email address, which is hidden when viewing info about other users.

API endpoint: GET /account/details

Returns: Raw API response with account information from Terraform Cloud including user ID, username, email address, and authentication status

See: docs/tools/account.md for reference documentation

Inputs: no named parameters.

get_apply_detailsA

Get details for a specific apply.

Retrieves comprehensive information about an apply including its current status, logs, resource counts, and relationship to other resources.

API endpoint: GET /applies/{apply_id}

Args: apply_id: The ID of the apply to retrieve details for (format: "apply-xxxxxxxx")

Returns: Apply details including status, timestamps, and resource change counts

See: docs/tools/apply.md for reference documentation

Inputs: apply_id (required).

get_apply_logsA

Retrieve logs from an apply.

Gets the raw log output from a Terraform Cloud apply operation, providing detailed information about resource changes and any errors.

API endpoint: Uses the log-read-url from GET /applies/{apply_id}

Args: apply_id: The ID of the apply to retrieve logs for (format: "apply-xxxxxxxx")

Returns: The raw logs from the apply operation. The redirect to the log file is automatically followed.

See: docs/tools/apply.md for reference documentation

Inputs: apply_id (required).

get_assessment_json_outputA

Retrieve the JSON execution plan from an assessment result.

Gets the JSON representation of the plan execution details from an assessment, providing a machine-readable format of the planned resource changes.

API endpoint: GET /api/v2/assessment-results/{assessment_result_id}/json-output

Args: assessment_result_id: The ID of the assessment result to retrieve JSON output for (format: "asmtres-xxxxxxxx")

Returns: The complete JSON formatted plan with resource changes, metadata, and planned actions. The redirect is automatically followed.

Note: This endpoint requires admin level access to the workspace and cannot be accessed with organization tokens.

See: docs/tools/assessment_results.md for reference documentation

Inputs: assessment_result_id (required).

get_assessment_json_schemaA

Retrieve the JSON schema file from an assessment result.

Gets the JSON schema representation of the provider schema used during the assessment, providing information about available resources and their configuration options.

API endpoint: GET /api/v2/assessment-results/{assessment_result_id}/json-schema

Args: assessment_result_id: The ID of the assessment result to retrieve schema for (format: "asmtres-xxxxxxxx")

Returns: The JSON schema file containing provider information. The redirect is automatically followed.

Note: This endpoint requires admin level access to the workspace and cannot be accessed with organization tokens.

See: docs/tools/assessment_results.md for reference documentation

Inputs: assessment_result_id (required).

get_assessment_log_outputA

Retrieve logs from an assessment result.

Gets the raw log output from a Terraform Cloud assessment operation, providing detailed information about the execution and any errors.

API endpoint: GET /api/v2/assessment-results/{assessment_result_id}/log-output

Args: assessment_result_id: The ID of the assessment result to retrieve logs for (format: "asmtres-xxxxxxxx")

Returns: The raw logs from the assessment operation. The redirect to the log file is automatically followed.

Note: This endpoint requires admin level access to the workspace and cannot be accessed with organization tokens.

See: docs/tools/assessment_results.md for reference documentation

Inputs: assessment_result_id (required).

get_assessment_result_detailsB

Get details for a specific assessment result.

Retrieves comprehensive information about an assessment result including its current status, whether drift was detected, and links to related resources like JSON output and logs.

API endpoint: GET /api/v2/assessment-results/{assessment_result_id}

Args: assessment_result_id: The ID of the assessment result to retrieve details for (format: "asmtres-xxxxxxxx")

Returns: Assessment result details including status, timestamps, and drift detection information

See: docs/tools/assessment_results.md for reference documentation

Inputs: assessment_result_id (required).

get_cost_estimate_detailsA

Get details for a specific cost estimate.

Retrieves comprehensive information about a cost estimate including its current status, resource counts, monthly cost estimations, and relationship to other resources.

API endpoint: GET /cost-estimates/{cost_estimate_id}

Args: cost_estimate_id: The ID of the cost estimate to retrieve details for (format: "ce-xxxxxxxx")

Returns: Cost estimate details including status, timestamps, resource counts, and monthly cost estimations

Note: There is no endpoint to list cost estimates. You can find the ID for a cost estimate in the relationships.cost-estimate property of a run object.

See: docs/tools/cost_estimate.md for reference documentation

Inputs: cost_estimate_id (required).

get_current_state_versionB

Get the current state version for a workspace.

Retrieves the current state version for a workspace, which is the input state when running terraform operations.

API endpoint: GET /workspaces/:workspace_id/current-state-version

Args: workspace_id: The ID of the workspace (format: "ws-xxxxxxxx")

Returns: The current state version including details and download URLs

See: docs/tools/state_versions.md for reference documentation

Inputs: workspace_id (required).

get_errored_stateA

Retrieve the errored state from a failed apply.

Gets information about a state file that failed to upload during an apply, providing access to the state data for recovery purposes.

API endpoint: GET /applies/{apply_id}/errored-state

Args: apply_id: The ID of the apply with a failed state upload (format: "apply-xxxxxxxx")

Returns: Information about the errored state including access details. The redirect to the state file is automatically followed.

See: docs/tools/apply.md for reference documentation

Inputs: apply_id (required).

get_organization_detailsC

Get details for a specific organization

Retrieves comprehensive information about an organization including settings, email contact info, and configuration defaults.

API endpoint: GET /organizations/{organization}

Args: organization: The organization name to retrieve details for (required)

Returns: Organization details including name, email, settings and configuration

See: docs/tools/organization.md for reference documentation

Inputs: organization (required).

get_organization_entitlementsB

Show entitlement set for organization features

Retrieves information about available features and capabilities based on the organization's subscription tier.

API endpoint: GET /organizations/{organization}/entitlement-set

Args: organization: The organization name to retrieve entitlements for (required)

Returns: Entitlement set details including feature limits and subscription information

See: docs/tools/organization.md for reference documentation

Inputs: organization (required).

get_plan_detailsB

Get details for a specific plan.

Retrieves comprehensive information about a plan including its current status, logs, resource counts, and relationship to other resources.

API endpoint: GET /plans/{plan_id}

Args: plan_id: The ID of the plan to retrieve details for (format: "plan-xxxxxxxx")

Returns: Plan details including status, timestamps, and resource change counts

See: docs/tools/plan.md for reference documentation

Inputs: plan_id (required).

get_plan_json_outputA

Retrieve the JSON execution plan.

Gets the JSON representation of a plan's execution details, providing a machine-readable format of the planned resource changes.

API endpoint: GET /plans/{plan_id}/json-output

Args: plan_id: The ID of the plan to retrieve JSON output for (format: "plan-xxxxxxxx")

Returns: The complete JSON formatted plan with resource changes, metadata, and planned actions. The redirect is automatically followed.

See: docs/tools/plan.md for reference documentation

Inputs: plan_id (required).

get_plan_logsA

Retrieve logs from a plan.

Gets the raw log output from a Terraform Cloud plan operation, providing detailed information about the execution plan.

API endpoint: Uses the log-read-url from GET /plans/{plan_id}

Args: plan_id: The ID of the plan to retrieve logs for (format: "plan-xxxxxxxx")

Returns: The raw logs from the plan operation. The redirect to the log file is automatically followed.

See: docs/tools/plan.md for reference documentation

Inputs: plan_id (required).

get_project_detailsC

Get details for a specific project.

Retrieves comprehensive information about a project including its configuration, tag bindings, workspace count, and other attributes.

API endpoint: GET /projects/{project_id}

Args: project_id: The ID of the project (format: "prj-xxxxxxxx")

Returns: Project details including settings, configuration and status

See: docs/tools/project.md for reference documentation

Inputs: project_id (required).

get_run_detailsA

Get detailed information about a specific run

Retrieves comprehensive information about a run including its current status, plan output, and relationship to other resources. Use to check run progress or results.

API endpoint: GET /runs/{run_id}

Args: run_id: The ID of the run to retrieve details for (format: "run-xxxxxxxx")

Returns: Complete run details including status, plan, and relationships

See: docs/tools/run.md for reference documentation

Inputs: run_id (required).

get_run_plan_json_outputA

Retrieve the JSON execution plan from a run.

Gets the JSON representation of a run's current plan execution details, providing a machine-readable format of the planned resource changes.

API endpoint: GET /runs/{run_id}/plan/json-output

Args: run_id: The ID of the run to retrieve plan JSON output for (format: "run-xxxxxxxx")

Returns: The complete JSON formatted plan with resource changes, metadata, and planned actions. The redirect is automatically followed.

See: docs/tools/plan.md for reference documentation

Inputs: run_id (required).

get_state_versionA

Get details for a specific state version.

Retrieves comprehensive information about a state version including its status, download URLs, and resource information.

API endpoint: GET /state-versions/:state_version_id

Args: state_version_id: The ID of the state version to retrieve (format: "sv-xxxxxxxx")

Returns: State version details including status, timestamps, and resource metadata

See: docs/tools/state_versions.md for reference documentation

Inputs: state_version_id (required).

get_state_version_outputA

Get details for a specific state version output.

Retrieves comprehensive information about a state version output including its name, value, type, and sensitivity information.

API endpoint: GET /state-version-outputs/:state_version_output_id

Args: state_version_output_id: The ID of the state version output (format: "wsout-xxxxxxxx")

Returns: State version output details including name, value, type, and sensitivity information

See: docs/tools/state_version_outputs.md for reference documentation

Inputs: state_version_output_id (required).

get_variable_setA

Get details for a specific variable set.

Retrieves comprehensive information about a variable set including its variables, workspace assignments, and configuration.

API endpoint: GET /varsets/{varset_id}

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx")

Returns: Variable set details including configuration and relationships

See: docs/tools/variables.md#get-variable-set for reference documentation

Inputs: varset_id (required).

get_workspace_detailsA

Get details for a specific workspace, identified either by ID or by org name and workspace name.

Retrieves comprehensive information about a workspace including its configuration, VCS settings, execution mode, and other attributes. This is useful for checking workspace settings before operations or determining the current state of a workspace.

The workspace can be identified either by its ID directly, or by the combination of organization name and workspace name.

API endpoint:

  • GET /workspaces/{workspace_id} (when using workspace_id)

  • GET /organizations/{organization}/workspaces/{workspace_name} (when using org+name)

Args: workspace_id: The ID of the workspace (format: "ws-xxxxxxxx") organization: The name of the organization (required if workspace_id not provided) workspace_name: The name of the workspace (required if workspace_id not provided)

Returns: Comprehensive workspace details including settings, configuration and status

See: docs/tools/workspace.md for reference documentation

Inputs: workspace_id, organization, workspace_name.

list_organizationsA

List organizations with filtering options

Retrieves a paginated list of organizations the current user has access to, with options to search by name or email address.

API endpoint: GET /organizations

Args: page_number: Page number to fetch (default: 1) page_size: Number of results per page (default: 20) q: Search query to filter by name and email query_email: Search query to filter by email only query_name: Search query to filter by name only

Returns: List of organizations with metadata and pagination information

See: docs/tools/organization.md for reference documentation

Inputs: page_number, page_size, q, query_email, +1 more.

list_projectsA

List projects in an organization.

Retrieves a paginated list of all projects in a Terraform Cloud organization. Results can be filtered using a search string or permissions filters to find specific projects.

API endpoint: GET /organizations/{organization}/projects

Args: organization: The name of the organization to list projects from page_number: The page number to return (default: 1) page_size: The number of items per page (default: 20, max: 100) q: Optional search query to filter projects by name filter_names: Filter projects by name (comma-separated list) filter_permissions_update: Filter projects that the user can update filter_permissions_create_workspace: Filter projects that the user can create workspaces in sort: Sort projects by name ('name' or '-name' for descending)

Returns: Paginated list of projects with their configuration settings and metadata

See: docs/tools/project.md for reference documentation

Inputs: organization (required), page_number, page_size, q, +4 more.

list_project_tag_bindingsA

List tag bindings for a project.

Retrieves the list of tags bound to a specific project. These tags are inherited by all workspaces within the project.

API endpoint: GET /projects/{project_id}/tag-bindings

Args: project_id: The ID of the project (format: "prj-xxxxxxxx")

Returns: List of tag bindings with their key-value pairs and creation timestamps

See: docs/tools/project.md for reference documentation

Inputs: project_id (required).

list_runs_in_organizationA

List runs across all workspaces in an organization

Retrieves run history across all workspaces in an organization with powerful filtering. Useful for organization-wide auditing, monitoring deployments across teams, or finding specific runs by commit or author.

API endpoint: GET /organizations/{organization}/runs

Args: organization: The organization name page_number: Page number to fetch (default: 1) page_size: Number of results per page (default: 20) filter_operation: Filter by operation type filter_status: Filter by status filter_source: Filter by source filter_status_group: Filter by status group filter_timeframe: Filter by timeframe filter_agent_pool_names: Filter by agent pool names filter_workspace_names: Filter by workspace names search_user: Search by VCS username search_commit: Search by commit SHA search_basic: Basic search across run attributes

Returns: List of runs across workspaces with metadata and pagination details

See: docs/tools/run.md for reference documentation

Inputs: organization (required), page_number, page_size, filter_operation, +9 more.

list_runs_in_workspaceA

List runs in a workspace with filtering and pagination

Retrieves run history for a specific workspace with options to filter by status, operation type, source, and other criteria. Useful for auditing changes, troubleshooting, or monitoring deployment history.

API endpoint: GET /workspaces/{workspace_id}/runs

Args: workspace_id: The workspace ID to list runs for (format: "ws-xxxxxxxx") page_number: Page number to fetch (default: 1) page_size: Number of results per page (default: 20) filter_operation: Filter by operation type filter_status: Filter by status filter_source: Filter by source filter_status_group: Filter by status group filter_timeframe: Filter by timeframe filter_agent_pool_names: Filter by agent pool names search_user: Search by VCS username search_commit: Search by commit SHA search_basic: Search across run ID, message, commit SHA, and username

Returns: List of runs with metadata, status info, and pagination details

See: docs/tools/run.md for reference documentation

Inputs: workspace_id (required), page_number, page_size, filter_operation, +8 more.

list_state_version_outputsA

List outputs for a state version.

Retrieves a paginated list of all outputs for a specific state version. These outputs include name, value, and sensitivity information.

API endpoint: GET /state-versions/:state_version_id/outputs

Args: state_version_id: The ID of the state version (format: "sv-xxxxxxxx") page_number: The page number to return (default: 1) page_size: The number of items per page (default: 20, max: 100)

Returns: Paginated list of state version outputs with name, value, and sensitivity information

See: docs/tools/state_version_outputs.md for reference documentation

Inputs: state_version_id (required), page_number, page_size.

list_state_versionsA

List state versions in a workspace.

Retrieves a paginated list of all state versions in a Terraform Cloud workspace. Results can be filtered using status to find specific state versions.

API endpoint: GET /state-versions

Args: organization: The name of the organization that owns the workspace workspace_name: The name of the workspace to list state versions from page_number: The page number to return (default: 1) page_size: The number of items per page (default: 20, max: 100) filter_status: Filter state versions by status: 'pending', 'finalized', or 'discarded'

Returns: Paginated list of state versions with their configuration settings and metadata

See: docs/tools/state_versions.md for reference documentation

Inputs: organization (required), workspace_name (required), page_number, page_size, +1 more.

list_variable_setsB

List variable sets in an organization.

Retrieves a paginated list of all variable sets in a Terraform Cloud organization. Variable sets allow you to reuse variables across multiple workspaces.

API endpoint: GET /organizations/{organization}/varsets

Args: organization: The name of the organization page_number: The page number to return (default: 1) page_size: The number of items per page (default: 20, max: 100)

Returns: Paginated list of variable sets with their configuration and metadata

See: docs/tools/variables.md#list-variable-sets for reference documentation

Inputs: organization (required), page_number, page_size.

list_variables_in_variable_setC

List all variables in a variable set.

Retrieves all variables that belong to a specific variable set, including their configuration and values.

API endpoint: GET /varsets/{varset_id}/relationships/vars

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx")

Returns: List of variables in the variable set with their configuration

See: docs/tools/variables.md#list-variables-in-variable-set for reference documentation

Inputs: varset_id (required).

list_workspacesA

List workspaces in an organization.

Retrieves a paginated list of all workspaces in a Terraform Cloud organization. Results can be filtered using a search string to find specific workspaces by name. Use this tool to discover existing workspaces, check workspace configurations, or find specific workspaces by partial name match.

API endpoint: GET /organizations/{organization}/workspaces

Args: organization: The name of the organization to list workspaces from page_number: The page number to return (default: 1) page_size: The number of items per page (default: 20, max: 100) search: Optional search string to filter workspaces by name

Returns: Paginated list of workspaces with their configuration settings and metadata

See: docs/tools/workspace.md for reference documentation

Inputs: organization (required), page_number, page_size, search.

list_workspace_variablesA

List all variables for a workspace.

Retrieves all variables (both Terraform and environment) configured for a specific workspace.

API endpoint: GET /workspaces/{workspace_id}/vars

Args: workspace_id: The ID of the workspace (format: "ws-xxxxxxxx")

Returns: List of workspace variables with their configuration and values

See: docs/tools/variables.md#list-workspace-variables for reference documentation

Inputs: workspace_id (required).

lock_workspaceA

Lock a workspace.

Locks a workspace to prevent runs from being queued. This is useful when you want to prevent changes to infrastructure while performing maintenance or making manual adjustments. Locking a workspace does not affect currently running plans or applies.

API endpoint: POST /workspaces/{workspace_id}/actions/lock

Args: workspace_id: The ID of the workspace to lock (format: "ws-xxxxxxxx") reason: Optional reason for locking

Returns: The workspace with updated lock status and related metadata

See: docs/tools/workspace.md for reference documentation

Inputs: workspace_id (required), reason.

move_workspaces_to_projectA

Move workspaces into a project.

Moves one or more workspaces into a project. The user must have permission to move workspaces on both source and destination projects.

API endpoint: POST /projects/{project_id}/relationships/workspaces

Args: project_id: The ID of the destination project (format: "prj-xxxxxxxx") workspace_ids: List of workspace IDs to move (format: ["ws-xxxxxxxx", ...])

Returns: Empty response with HTTP 204 status code if successful

See: docs/tools/project.md for reference documentation

Inputs: project_id (required), workspace_ids (required).

unassign_variable_set_from_projectsA

Remove a variable set from one or more projects.

Removes the variable set assignment from the specified projects. The variables will no longer be available in workspaces within those projects.

API endpoint: DELETE /varsets/{varset_id}/relationships/projects

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") project_ids: List of project IDs (format: ["prj-xxxxxxxx", ...])

Returns: Empty response with HTTP 204 status code if successful

See: docs/tools/variables.md#unassign-variable-set-from-projects for reference documentation

Inputs: varset_id (required), project_ids (required).

unassign_variable_set_from_workspacesA

Remove a variable set from one or more workspaces.

Removes the variable set assignment from the specified workspaces. The variables will no longer be available in those workspaces.

API endpoint: DELETE /varsets/{varset_id}/relationships/workspaces

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") workspace_ids: List of workspace IDs (format: ["ws-xxxxxxxx", ...])

Returns: Empty response with HTTP 204 status code if successful

See: docs/tools/variables.md#unassign-variable-set-from-workspaces for reference documentation

Inputs: varset_id (required), workspace_ids (required).

unlock_workspaceA

Unlock a workspace.

Removes the lock from a workspace, allowing runs to be queued. This enables normal operation of the workspace after it was previously locked.

API endpoint: POST /workspaces/{workspace_id}/actions/unlock

Args: workspace_id: The ID of the workspace to unlock (format: "ws-xxxxxxxx")

Returns: The workspace with updated lock status and related metadata

See: docs/tools/workspace.md for reference documentation

Inputs: workspace_id (required).

update_organizationA

Update an existing organization in Terraform Cloud

Modifies organization settings such as email contact, authentication policy, or other configuration options. Only specified attributes will be updated.

API endpoint: PATCH /organizations/{organization}

Args: organization: The name of the organization to update (required) params: Organization parameters to update: - email: Admin email address for the organization - collaborator_auth_policy: Authentication policy (password or two_factor_mandatory) - session_timeout: Session timeout after inactivity in minutes - session_remember: Session total expiration time in minutes - cost_estimation_enabled: Whether to enable cost estimation for workspaces - default_execution_mode: Default workspace execution mode (remote, local, agent) - aggregated_commit_status_enabled: Whether to aggregate VCS status updates - speculative_plan_management_enabled: Whether to auto-cancel unused speculative plans - assessments_enforced: Whether to enforce health assessments for all workspaces - allow_force_delete_workspaces: Whether to allow deleting workspaces with resources

Returns: The updated organization with all current settings

See: docs/tools/organization.md for reference documentation

Inputs: organization (required), params.

update_projectA

Update an existing project.

Modifies the settings of a Terraform Cloud project. This can be used to change attributes like name, description, auto-destroy duration, or tags. Only specified attributes will be updated; unspecified attributes remain unchanged.

API endpoint: PATCH /projects/{project_id}

Args: project_id: The ID of the project to update (format: "prj-xxxxxxxx") params: Project parameters to update (optional): - name: New name for the project - description: Human-readable description of the project - auto_destroy_activity_duration: How long each workspace should wait before auto-destroying (e.g., '14d', '24h') - tag_bindings: List of tag key-value pairs to bind to the project

Returns: The updated project with all current settings and configuration

See: docs/tools/project.md for reference documentation

Inputs: project_id (required), params.

update_variable_in_variable_setA

Update an existing variable in a variable set.

Modifies the configuration of an existing variable within a variable set. Only specified attributes will be updated; unspecified attributes remain unchanged.

API endpoint: PATCH /varsets/{varset_id}/relationships/vars/{var_id}

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") var_id: The ID of the variable (format: "var-xxxxxxxx")

params: Variable parameters to update (optional):
    - key: New variable name/key
    - value: New variable value
    - description: New description of the variable
    - category: New variable category ("terraform" or "env")
    - hcl: Whether the value is HCL code (terraform variables only)
    - sensitive: Whether the variable value is sensitive

Returns: The updated variable with all current settings and configuration

See: docs/tools/variables.md#update-variable-in-variable-set for reference documentation

Inputs: varset_id (required), var_id (required), params.

update_variable_setB

Update an existing variable set.

Modifies the settings of a variable set. Only specified attributes will be updated; unspecified attributes remain unchanged.

API endpoint: PATCH /varsets/{varset_id}

Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx")

params: Variable set parameters to update (optional):
    - name: New name for the variable set
    - description: New description of the variable set
    - global: Whether this is a global variable set
    - priority: Whether this variable set takes priority over workspace variables

Returns: The updated variable set with all current settings and configuration

See: docs/tools/variables.md#update-variable-set for reference documentation

Inputs: varset_id (required), params.

update_workspaceA

Update an existing workspace.

Modifies the settings of a Terraform Cloud workspace. This can be used to change attributes like execution mode, VCS repository settings, description, or any other workspace configuration options. Only specified attributes will be updated; unspecified attributes remain unchanged.

API endpoint: PATCH /organizations/{organization}/workspaces/{workspace_name}

Args: organization: The name of the organization that owns the workspace workspace_name: The name of the workspace to update

params: Workspace parameters to update (optional):
    - name: New name for the workspace (if renaming)
    - description: Human-readable description of the workspace
    - execution_mode: How Terraform runs are executed (remote, local, agent)
    - terraform_version: Version of Terraform to use
    - working_directory: Subdirectory to use when running Terraform
    - vcs_repo: Version control repository configuration (oauth-token-id, identifier)
    - auto_apply: Whether to automatically apply successful plans
    - file_triggers_enabled: Whether file changes trigger runs
    - trigger_prefixes: Directories that trigger runs when changed
    - trigger_patterns: Glob patterns that trigger runs when files match
    - allow_destroy_plan: Whether to allow destruction plans
    - auto_apply_run_trigger: Whether to auto-apply changes from run triggers

Returns: The updated workspace with all current settings and configuration

See: docs/tools/workspace.md for reference documentation

Inputs: organization (required), workspace_name (required), params.

update_workspace_variableA

Update an existing workspace variable.

Modifies the configuration of an existing workspace variable. Only specified attributes will be updated; unspecified attributes remain unchanged.

API endpoint: PATCH /workspaces/{workspace_id}/vars/{variable_id}

Args: workspace_id: The ID of the workspace (format: "ws-xxxxxxxx") variable_id: The ID of the variable (format: "var-xxxxxxxx")

params: Variable parameters to update (optional):
    - key: New variable name/key
    - value: New variable value
    - description: New description of the variable
    - category: New variable category ("terraform" or "env")
    - hcl: Whether the value is HCL code (terraform variables only)
    - sensitive: Whether the variable value is sensitive

Returns: The updated variable with all current settings and configuration

See: docs/tools/variables.md#update-workspace-variable for reference documentation

Inputs: workspace_id (required), variable_id (required), params.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 62 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources and actions, with clear boundaries like create/update/get/list for each resource type. However, some overlap exists in variable management between workspace and variable set contexts, and multiple run action tools (cancel, force_cancel, discard) could be confusing without careful reading of descriptions.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, with clear conventions like create_*, get_*, list_*, update_*, assign_*, and unassign_*. All names use snake_case consistently, making the tool set predictable and easy to navigate despite the large count.

    Tool Count2/5

    With 62 tools, this is an extremely large surface that feels heavy and overwhelming for the Terraform Cloud domain. While the API is comprehensive, this many tools will likely cause confusion and selection paralysis for agents, exceeding typical well-scoped MCP servers (3-15 tools).

    Completeness5/5

    The tool set provides complete CRUD/lifecycle coverage for all major Terraform Cloud resources (organizations, workspaces, projects, runs, variables, state versions, etc.). There are no obvious gaps—every resource has create, read, update, and delete/list operations where applicable, plus specialized actions like run management and workspace locking.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your AWS environment. This allows for natural language querying and management of your AWS resources during conversations. Think of better Amazon Q alternative.
      3
      296
      ISC
    • A
      license
      B
      quality
      D
      maintenance
      An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
      8
      188
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      🌍 Terraform Model Context Protocol (MCP) Tool - An experimental CLI tool that enables AI assistants to manage and operate Terraform environments. Supports reading Terraform configurations, analyzing plans, applying configurations, and managing state with Claude Desktop integration. ⚡️
      374
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that exposes Terraform CLI operations as tools for Claude and other MCP-compatible AI assistants, enabling AI-driven infrastructure-as-code workflows including planning, applying, and validating Terraform configurations.
      MIT