productivity
Terraform Cloud MCP, CLI, and Lua Integration for AI Agents
Terraform Cloud integration docs for AI agents: MCP gateway setup, Terraform Cloud CLI commands, Lua API reference, credentials, and function schemas.
7 functions 7 read 0 write API token auth
Terraform Cloud for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
terraform- route_slug
terraform- package
terraform- auth_strategy
api_tokenAPI token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Terraform Cloud CLIHeadless setup and direct function calls. Terraform Cloud MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Terraform Cloud MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Terraform Cloud.
Claude Code Terraform Cloud MCP setup for Claude Code. Cursor Terraform Cloud MCP setup for Cursor. Codex Terraform Cloud MCP setup for Codex. OpenAI Agents Terraform Cloud MCP setup for OpenAI Agents SDK. Claude Agent SDK Terraform Cloud MCP setup for Claude Agent SDK. Vercel AI SDK Terraform Cloud MCP setup for Vercel AI SDK. LangChain Terraform Cloud MCP setup for LangChain. LangGraph Terraform Cloud MCP setup for LangGraph. CrewAI Terraform Cloud MCP setup for CrewAI. MCP clients Terraform Cloud MCP setup for Generic MCP Clients.
Terraform Cloud CLI Matrix
Use these pages for direct Terraform Cloud CLI workflows in scripts, CI, cron, and agent wrappers.
CI Terraform Cloud CLI for CI. Cron Jobs Terraform Cloud CLI for cron jobs. Shell Scripts Terraform Cloud CLI for shell scripts. Headless Automation Terraform Cloud CLI for headless automation. Coding Agents Terraform Cloud CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
terraform.terraform_list_workspaces | Read read | 3 | List workspaces in a Terraform Cloud organization. Returns workspace IDs, names, Terraform versions, and locked status. |
terraform.terraform_get_workspace | Read read | 1 | Get details of a specific Terraform Cloud workspace by its ID. Returns workspace configuration, status, and VCS settings. |
terraform.terraform_list_runs | Read read | 3 | List runs for a Terraform Cloud workspace. Returns run IDs, statuses, trigger reasons, and timestamps. |
terraform.terraform_get_run | Read read | 1 | Get details of a specific Terraform Cloud run by its ID. Returns run status, plan/apply results, and configuration version info. |
terraform.terraform_list_variables | Read read | 1 | List variables for a Terraform Cloud workspace. Returns variable names, types (Terraform or environment), and sensitivity flags. |
terraform.terraform_list_organizations | Read read | 2 | List Terraform Cloud organizations the authenticated user has access to. Returns organization names and IDs. |
terraform.terraform_get_current_user | Read read | 0 | Get the currently authenticated Terraform Cloud user. Useful for verifying authentication and retrieving user details. |