Terraform MCP Server — Hosted Devops Integration
MCP Server language Hosted language PublicManage Terraform Cloud workspaces, runs, state, and variables — AI-driven infrastructure as code operations.
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"terraform": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-terraform",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the _ping tool to verify terraform cloud api token by fetching the current account. used internally by aerostack to validate credentials”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
description Overview
mcp-terraform — Terraform Cloud MCP Server
Manage Terraform Cloud workspaces, runs, state, and variables from your AI agents.
Terraform Cloud is HashiCorp's managed service for infrastructure as code. This MCP server lets your AI agents list workspaces, trigger and inspect runs, browse state versions, and manage workspace variables — turning Terraform Cloud into a live infrastructure control plane for intelligent DevOps workflows.
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-terraform
What You Can Do
- List and inspect workspaces across your Terraform Cloud organization
- Trigger new runs (plan or destroy) and check their status without opening the UI
- Browse state versions and inspect current state for any workspace
- Manage workspace variables — create, update, or mark as sensitive
Available Tools
| Tool | Description |
|---|---|
_ping |
Verify API token connectivity (internal) |
list_workspaces |
List workspaces with optional name search |
get_workspace |
Get full details for a workspace by name |
list_runs |
List runs for a specific workspace |
get_run |
Get full details for a run by ID |
trigger_run |
Create and queue a new run for a workspace |
list_state_versions |
List state versions for a workspace |
get_current_state |
Get the current state version for a workspace |
list_variables |
List all variables for a workspace |
set_variable |
Create or update a variable in a workspace |
Configuration
| Variable | Required | Description | How to Get |
|---|---|---|---|
TERRAFORM_API_TOKEN |
Yes | Team or User API token | app.terraform.io → User Settings → Tokens → Create an API token |
TERRAFORM_ORG |
Yes | Organization name | app.terraform.io → Organizations → copy org name from the URL or sidebar |
Quick Start
Add to Aerostack Workspace
- Go to aerostack.dev → Your Project → MCPs
- Search for "Terraform" and click Add to Workspace
- Add your API token and org name under Project → Secrets
Once added, every AI agent in your workspace can call Terraform Cloud tools automatically — no per-user setup needed.
Example Prompts
"List all workspaces in my Terraform organization"
"Show me the last 5 runs for workspace production-infra"
"Trigger a plan run on workspace staging-vpc with message 'Testing new subnet'"
"What's the current state version for workspace prod-database?"
"Set variable AWS_REGION to us-west-2 in workspace production-infra"
Direct API Call
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-terraform \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-TERRAFORM-API-TOKEN: your-api-token' \
-H 'X-Mcp-Secret-TERRAFORM-ORG: your-org-name' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_workspaces","arguments":{"search":"production"}}}'
License
MIT
terminal Tools (10)
Available tools on this MCP server. Each tool can be called directly from any AI agent.
_ping #1 Verify Terraform Cloud API token by fetching the current account. Used internally by Aerostack to validate credentials.
list_workspaces #2 List workspaces in the Terraform Cloud organization
get_workspace #3 Get full details for a specific workspace by name
list_runs #4 List runs for a specific workspace
get_run #5 Get full details for a specific run by ID
trigger_run #6 Create and queue a new run for a workspace
list_state_versions #7 List state versions for a workspace
get_current_state #8 Get the current state version for a workspace
list_variables #9 List all variables for a workspace
set_variable #10 Create or update a variable in a workspace
Details
language Live Endpoint
https://mcp.aerostack.dev/s/aerostack/mcp-terraform
Sub-50ms globally · Zero cold start
Publisher
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
More in Devops
Browse Devops MCPs →Asana Project Management
by @aerostack
Tasks, projects, sections, comments, teams, custom fields via Asana's official MCP
Atlassian Cloud
by @aerostack
Jira issues, sprints, Confluence pages via Atlassian's official MCP
Cloudflare Platform
by @aerostack
Cloudflare Workers, KV, R2, D1, Pages, DNS via Cloudflare's official MCP
Datadog Observability
by @aerostack
Dashboards, monitors, logs, metrics, incidents, SLOs, APM traces via Datadog's official MCP
Figma Design
by @aerostack
Files, frames, components, comments, variables via Figma's official MCP
GitHub API
by @aerostack
GitHub repos, PRs, issues, branches, code search via GitHub's official hosted MCP
Frequently asked questions
What is the Terraform MCP server and what can it do? +
The Terraform MCP server is hosted on Aerostack and exposes these tools to your AI agent: `_ping`, `list_workspaces`, `get_workspace`, `list_runs`, `get_run`. You get one hosted URL — no self-hosting — that works from Claude, Cursor, ChatGPT, Gemini, VS Code, or any MCP-compatible client, and you can share it with your team or combine it with other MCP servers in a workspace.
Is the Terraform MCP server hosted, or do I have to run it myself? +
It's hosted on Aerostack's edge infrastructure — you don't deploy or maintain anything. Add it to a workspace and you get one authenticated URL, with secrets encrypted, that any AI agent or editor can connect to. Use it solo or share the same URL across your whole team.
Which AI agents and editors can use the Terraform MCP server? +
Any MCP client: Claude and Claude Code, Cursor, ChatGPT, Gemini, Windsurf, Cline, VS Code, and custom agents. Because it's one hosted URL, the same Terraform MCP server works everywhere — and you can compose it with other MCP servers, skills, and functions behind a single workspace URL.
How do I install the Terraform MCP server in Claude Desktop? +
Add the following to your Claude Desktop config (`claude_desktop_config.json`): ```json { "mcpServers": { "@aerostack/mcp-terraform": { "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-terraform"] } } } ``` Then restart Claude Desktop and the tools will appear automatically.
How do I use the Terraform MCP server in Cursor? +
In Cursor, open **Settings → MCP** and add: ```json { "name": "@aerostack/mcp-terraform", "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-terraform"] } ``` Save and reload Cursor. The MCP tools will be available in Agent mode.
Does Terraform MCP require authentication? +
Yes. Terraform requires authentication. Check the MCP's documentation for the required credentials.