drio
Open app

Terraform Cloud MCP Server

Source

A Model Context Protocol (MCP) server that integrates AI assistants with the Terraform Cloud API, allowing you to manage your infrastructure through natural conversation

Catalog onlyCatalog onlySTDIO

Overview

Terraform Cloud MCP is a Model Context Protocol (MCP) server that integrates Claude with the Terraform Cloud API, enabling users to manage their Terraform infrastructure through natural conversation.

To use Terraform Cloud MCP, clone the repository, set up a virtual environment, install dependencies, and start the server. Connect with Claude Desktop or Claude Code CLI to interact with the server.

  • Authentication: Validate tokens and retrieve user information. - Workspace Management: Create, read, update, delete, lock/unlock workspaces. - Future Features: Planned operations for state management, variables management, and more.
  1. Managing Terraform workspaces through conversational commands.
  2. Automating infrastructure management tasks.
  3. Integrating with Claude for enhanced user interaction.

Add to your AI client

Use these steps to connect Terraform Cloud MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "terraform-cloud-mcp-severity1": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-cloud-mcp-severity1"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "terraform-cloud-mcp-severity1": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-cloud-mcp-severity1"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "terraform-cloud-mcp-severity1": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-cloud-mcp-severity1"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "terraform-cloud-mcp-severity1": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-cloud-mcp-severity1"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "terraform-cloud-mcp-severity1": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-cloud-mcp-severity1"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "terraform-cloud-mcp-severity1": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-cloud-mcp-severity1"
      ]
    }
  }
}

FAQ

Can I manage multiple workspaces?

Yes! You can create, update, and delete multiple workspaces through the server.

Is there a way to validate my API token?

Yes! The server provides a tool to validate your Terraform Cloud API token.

What programming language is used for this project?

The project is developed in Python.