MCP.so
ログイン

Terraform Registry MCP Server

@MCP-Mirror

基本情報

カテゴリ

クラウドとインフラ

ライセンス

MIT license

トランスポート

stdio

作者

MCP-Mirror

Terraform Registry MCP Server について

Mirror of

Terraform Registry MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "terraform-registry": {
      "command": "npx",
      "args": [
        "-y",
        "terraform-mcp-server"
      ]
    }
  }
}

Terraform Registry MCP Server のツール

10

Get detailed information about a Terraform provider by name and optionally version.

Get an example usage of a Terraform resource and related resources.

Search for and recommend Terraform modules based on a query.

List all available data sources for a provider and their basic details.

Fetches comprehensive details about a specific resource type's arguments, including required and optional attributes, nested blocks, and their descriptions.

Retrieves detailed metadata for a Terraform module including versions, inputs, outputs, and dependencies.

Get details about a Terraform provider function.

List and view provider-specific guides, including version upgrades and feature guides.

Search for policy libraries in the Terraform Registry.

Get detailed information about a specific policy library including its latest version.

概要

What is Terraform Registry MCP Server?

A Model Context Protocol (MCP) server that provides tools for interacting with the Terraform Registry API. It enables AI agents to query provider information, resource details, and module metadata, and optionally integrates with Terraform Cloud for workspace and run management.

How to use Terraform Registry MCP Server?

Install and run via npx -y terraform-mcp-server. Configure in Cursor by adding a command‑type MCP server, or in Claude Desktop by editing claude_desktop_config.json. The server runs using stdio transport and can be customised with environment variables.

Key features of Terraform Registry MCP Server

  • Query provider details, resource usage, and module search
  • List provider data sources, functions, and guides
  • Fetch comprehensive resource argument details
  • Search and view policy libraries in the Terraform Registry
  • Manage Terraform Cloud workspaces, runs, and organizations
  • Provides prompts for migration, resource scaffolding, and optimisation

Use cases of Terraform Registry MCP Server

  • AI‑assisted Terraform provider and module discovery
  • Automating Terraform Cloud workspace and run management
  • Generating resource skeletons and migrating infrastructure across clouds
  • Analysing provider version upgrades and breaking changes
  • Troubleshooting run failures with contextual guidance

よくある質問

1

What tools does the server provide?

It offers core registry tools (e.g., `providerDetails`, `resourceUsage`, `moduleSearch`) and Terraform Cloud tools (e.g., `listOrganizations`, `createRun`, `lockWorkspace`). A full tool list is available in the README.

2

Does it require authentication?

Public Terraform Registry tools do not need authentication. Terraform Cloud tools require a Terraform Cloud API token set via the `TFC_TOKEN` environment variable.

3

Is there a known issue with prompts?

Yes – the `getPrompt` method may cause server crashes. It is recommended to use `listPrompts` to see available prompts but avoid direct `getPrompt` calls until the issue is resolved.

4

What transport does the server use?

It uses stdio transport for MCP communication.

5

How can I configure the server?

Via environment variables: `TERRAFORM_REGISTRY_URL`, `DEFAULT_PROVIDER_NAMESPACE`, `LOG_LEVEL`, `REQUEST_TIMEOUT_MS`, `RATE_LIMIT_ENABLED`, `RATE_LIMIT_REQUESTS`, `RATE_LIMIT_WINDOW_MS`, and `TFC_TOKEN`. Defaults are documented in the README.

コメント

「クラウドとインフラ」の他のコンテンツ