Terraform Cloud MCP
Provides read-only tools to inspect and diagnose HCP Terraform workspaces, runs, and plan summaries, including listing workspaces, getting workspace details, listing runs, inspecting runs, retrieving plan summaries, and getting workspace operational overviews.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Terraform Cloud MCPList my Terraform workspaces and flag locked ones"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Terraform Cloud MCP
A read-only MCP server for inspecting and diagnosing HCP Terraform (formerly Terraform Cloud) from ChatGPT and other MCP clients.
The first version is deliberately narrow: it exposes workspaces, runs, and sanitized plan summaries while excluding variables, state, outputs, raw plan JSON, logs, and every write operation.
Capabilities
List workspaces in an allowlisted organization.
Inspect workspace configuration and lock state.
List and filter workspace runs.
Inspect one run and its available actions without executing them.
Summarize a plan: additions, changes, destructions, imports, and status.
Get a combined workspace/current-run/plan operational overview.
MCP tools
Tool | Purpose |
| Discover workspace IDs and operational status. |
| Inspect one workspace by ID or name. |
| List recent or filtered runs in a workspace. |
| Inspect one run. |
| Retrieve the sanitized numeric plan summary for a run. |
| Retrieve a workspace, current run, and plan in one call. |
Every tool is annotated as read-only, non-destructive, and idempotent.
Related MCP server: k8s-readonly-mcp
Security model
This project does not return:
Terraform variables or variable values.
State files or state outputs.
Raw plan JSON.
Plan or apply logs.
Terraform API tokens.
Apply, cancel, discard, unlock, delete, or workspace-update operations.
Organizations are restricted with TERRAFORM_ALLOWED_ORGANIZATIONS. Use a Terraform token with the minimum permissions required to read the intended workspaces and runs.
All /mcp routes are protected. GET /health remains public and GET /.well-known/oauth-protected-resource publishes the OAuth protected-resource metadata used by ChatGPT and OpenCode.
Authentication supports two inbound modes:
OAuth 2.1 / OIDC bearer tokens from Auth0, validated with remote JWKS,
RS256, issuer, audience,exp,sub, and the required scopes.Optional
X-API-Keyfor non-interactive scripts and internal clients.
Inbound OAuth or API key credentials are only used to protect this MCP server. They are never forwarded to Terraform. All Terraform API calls continue to use the server-side TERRAFORM_API_TOKEN.
Requirements
Node.js 22+
An HCP Terraform user, team, or organization token with read access
Local setup
cp .env.example .env
npm install
npm run devHealth check:
curl http://localhost:3000/healthMCP endpoint:
http://localhost:3000/mcpProtected resource metadata:
http://localhost:3000/.well-known/oauth-protected-resourceValidate
npm run check
docker build -t terraform-cloud-mcp .Environment variables
Variable | Required | Description |
| Yes | HCP Terraform API token. |
| Yes | Default organization used by tools. |
| No | Comma-separated allowlist; defaults to the default organization. |
| Yes | Public HTTPS base URL used in OAuth metadata and challenges. |
| No | Enables OAuth/JWT validation for |
| No | Enables |
| Required when OAuth is enabled | Auth0 issuer URL, for example |
| No | Space- or comma-separated scopes required on the access token; defaults to |
| No | Optional space- or comma-separated allowlist of accepted token |
| Required when API key auth is enabled | Secret matched against the |
| No | Defaults to |
| No | Terraform API timeout; defaults to 15000. |
| No | HTTP port; defaults to 3000. |
The canonical OAuth audience is always ${PUBLIC_BASE_URL}/mcp, which is also the protected resource identifier published at /.well-known/oauth-protected-resource.
Connect it to ChatGPT
Run the server locally.
Expose it securely over HTTPS using OpenAI Secure MCP Tunnel, or deploy it behind appropriate authentication.
In ChatGPT, enable Developer mode under Settings → Security and login.
Configure Auth0 so ChatGPT or OpenCode can obtain access tokens for
${PUBLIC_BASE_URL}/mcpwith theterraform:readscope.Open Settings → Plugins, create a developer-mode app, and use the public
/mcpURL.Verify the six advertised tools and add the app to a new conversation.
Example prompts:
List my Terraform workspaces and flag any that are locked or using an old Terraform version.Give me an operational overview of the job-board-infra workspace.Inspect the current run for job-board-infra and summarize the planned additions, changes, and destructions.Architecture
ChatGPT / MCP client
│ Streamable HTTP
▼
terraform-cloud-mcp
│ JSON:API + TERRAFORM_API_TOKEN
▼
HCP Terraform APIThe HTTP transport is stateless, which suits container platforms such as Cloud Run. A fresh MCP server and transport are created for each request.
Roadmap
Policy-check and cost-estimate summaries.
Run event timelines.
Optional write operations behind explicit feature flags and confirmation, beginning with queueing speculative plans only.
Cross-provider diagnosis with Google Cloud and GitHub Actions.
References
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceA read-only MCP server for AI coding agents to inspect repositories, audit code quality, route engineering skills, and plan safe issue/PR workflows.Last updated1MIT
- AlicenseAqualityCmaintenanceA read-only MCP server for inspecting Kubernetes clusters, allowing LLMs to list resources, describe pods, and read logs without mutation.Last updated5MIT
- Alicense-qualityCmaintenanceA read-only MCP server that lets an LLM inspect an AWS account — list EC2 instances, S3 buckets, IAM users, and cost — with a structural guarantee against any mutations.Last updatedMIT

masaro-infra-mcpofficial
Flicense-qualityCmaintenanceA secure MCP server providing read-only tools to interact with Cloudflare, Coolify, and other infrastructure services, enabling AI clients to safely diagnose and validate environments.Last updated
Related MCP Connectors
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jackdaw16/terraform-cloud-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server