drio
Open app

Terraform Registry MCP Server

Source

Terraform Registry MCP Server

Catalog onlyCatalog onlySTDIO

Overview

Terraform Registry MCP Server is a Model Context Protocol (MCP) server that provides tools for interacting with the Terraform Registry API, enabling AI agents to query provider information, resource details, module metadata, and generate example configurations.

To use the MCP server, clone the repository, install dependencies, build the package, and configure it in your desired environment (Cursor or Claude Desktop) by adding the MCP command. You can also run it using npx -y terraform-mcp-server.

  • Provider Lookup: Retrieve details about Terraform providers. - Resource Usage: Get example usage of Terraform resources. - Module Recommendations: Search and recommend Terraform modules. - Data Source Lookup: Retrieve available data source identifiers. - Resource Argument Details: Fetch details about resource type arguments. - Module Details: Retrieve metadata for Terraform modules.
  1. Querying provider information for AWS, Azure, etc.
  2. Generating example configurations for Terraform resources.
  3. Finding and recommending Terraform modules based on specific queries.
  4. Retrieving detailed metadata for Terraform modules and their arguments.

Add to your AI client

Use these steps to connect Terraform Registry 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-mcp-server-thrashr888": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-mcp-server-thrashr888"
      ]
    }
  }
}

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-mcp-server-thrashr888": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-mcp-server-thrashr888"
      ]
    }
  }
}

Claude Code

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

.mcp.json (project root)

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

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-mcp-server-thrashr888": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terraform-mcp-server-thrashr888"
      ]
    }
  }
}

Windsurf

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

~/.codeium/windsurf/mcp_config.json

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

Cline

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

Cline MCP Settings (via UI)

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

FAQ

What is the purpose of the MCP server?

The MCP server facilitates interaction with the Terraform Registry API, making it easier to access provider and resource information.

How do I install the MCP server?

Follow the installation instructions in the README, which include cloning the repository and configuring it in your environment.

Can I run tests on the MCP server?

Yes! The project includes a comprehensive test suite that can be run using npm commands.