terraform-mcp-server

terraform-mcp-server

117

The Terraform Registry MCP Server is a tool for interacting with the Terraform Registry API, providing AI agents with functions to query Terraform provider and resource information effectively. It supports a variety of tools and prompts tailored for cloud infrastructure management and optimization.

Terraform Registry MCP Server

  • A Model Context Protocol (MCP) server for interacting with the Terraform Registry API.
  • Enables querying provider information, resource details, and module metadata for AI agents.
  • Used as a PoC for the official Terraform MCP server, now archived.

Installation

  • Instructions provided for installing in Cursor and Claude Desktop.

Tools

  • Core tools available for provider details, resource usage, module search, data sources, and more.
  • Additional tools requiring Terraform Cloud API token for managing organizations, modules, workspaces, and runs.

Resources

  • Supports various resource URIs for managing providers, resources, data sources, and functions.

Prompts

  • Contextual prompts available for tasks like migrating clouds, generating resource skeletons, optimizing modules, and more.
  • Known issue: Avoid direct getPrompt calls due to potential server crashes.

Running the Server

  • Server runs using stdio transport; can be configured with environment variables.

Configuration

  • Multiple environment variables available for customization, including API URL, logging level, and rate limiting.