OpenTofu

v0.1.5Cloud Servicesstable

A Model Context Protocol server that allows AI assistants to search for and retrieve information about OpenTofu providers, modules, resources, and data sources from the OpenTofu Registry.

opentofumcpregistrymodel-context-protocolclaude
Share:
95
Stars
0
Downloads
0
Weekly
0/5

What is OpenTofu?

OpenTofu is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server that allows ai assistants to search for and retrieve information about opentofu providers, modules, resources, and data sources from the opentofu registry.

A Model Context Protocol server that allows AI assistants to search for and retrieve information about OpenTofu providers, modules, resources, and data sources from the OpenTofu Registry.

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol server that allows AI assistants to

Use Cases

Search and retrieve OpenTofu providers, modules, resources, and data sources. Query infrastructure-as-code components from registry.
opentofu

Maintainer

LicenseMozilla Public License 2.0
Languagetypescript
Versionv0.1.5
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @opentofu/opentofu-mcp-server

Manual Installation

npx -y @opentofu/opentofu-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use OpenTofu

The OpenTofu MCP Server gives AI assistants direct access to the OpenTofu Registry, enabling them to search for and retrieve detailed documentation about providers, modules, resources, and data sources without leaving the chat interface. It is available both as a hosted service at mcp.opentofu.org (requiring no local installation) and as a locally runnable Node.js package, making it easy to integrate into any MCP-compatible client such as Claude Desktop, Cursor, or VS Code. Developers writing infrastructure-as-code with OpenTofu can use it to look up resource arguments, configuration examples, and provider details on the fly.

Prerequisites

  • Node.js 18 or later (for local installation only)
  • An MCP-compatible client such as Claude Desktop, Cursor, VS Code with MCP support, or Claude Code CLI
  • No API key required — the OpenTofu Registry is publicly accessible
  • Optional: internet access to reach mcp.opentofu.org for the hosted service
1

Choose between hosted and local installation

The easiest option is the hosted service at mcp.opentofu.org which requires no local installation and is always up to date. For air-gapped or offline environments, use the local npm package instead.

2

Add the hosted server to Claude Code (recommended)

Use the Claude Code CLI to add the hosted OpenTofu MCP server in one command. This configures the streamable-HTTP transport pointing to the Cloudflare Workers deployment.

claude mcp add opentofu -t streamable-http https://mcp.opentofu.org/mcp
3

Or run the server locally with npx

Run the OpenTofu MCP server locally without a global install. This starts the stdio-based server that your MCP client connects to.

npx -y @opentofu/opentofu-mcp-server
4

Configure your MCP client for local use

Add the server configuration to your claude_desktop_config.json or equivalent client config file to use the local package.

5

Verify available tools

After connecting, confirm that the five OpenTofu tools are available: search-opentofu-registry, get-provider-details, get-module-details, get-resource-docs, and get-datasource-docs.

OpenTofu Examples

Client configuration

Claude Desktop configuration for the local npm-based OpenTofu MCP server.

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

Hosted server configuration (Cursor / VS Code)

Configuration for Cursor or VS Code using the hosted streamable-HTTP transport — no command or args needed.

{
  "mcp": {
    "servers": {
      "opentofu": {
        "type": "streamable-http",
        "url": "https://mcp.opentofu.org/mcp"
      }
    }
  }
}

Prompts to try

Example prompts that exercise the OpenTofu registry search and documentation retrieval tools.

- "Search the OpenTofu registry for AWS S3 providers"
- "Get the full documentation for the aws_s3_bucket resource in the hashicorp/aws provider"
- "What modules are available for setting up a Kubernetes cluster on GCP?"
- "Show me the arguments for the azurerm_virtual_network resource"
- "Find OpenTofu modules for deploying a VPC on AWS"

Troubleshooting OpenTofu

npx fails with a network error when trying to download @opentofu/opentofu-mcp-server

Check your internet connection and npm registry access. You can also install globally first with npm install -g @opentofu/opentofu-mcp-server and then use opentofu-mcp-server as the command in your config.

The hosted service at mcp.opentofu.org is unreachable

Fall back to the local npm package by using the npx-based configuration. The local server fetches data from the OpenTofu Registry API at runtime, so internet access is still required for registry queries.

Search results are empty or the registry returns no matches

The OpenTofu Registry uses different naming conventions than Terraform — provider names are case-sensitive and module namespaces matter. Try broader search terms such as just 'aws' or 'kubernetes' and use get-provider-details to drill down.

Frequently Asked Questions about OpenTofu

What is OpenTofu?

OpenTofu is a Model Context Protocol (MCP) server that model context protocol server that allows ai assistants to search for and retrieve information about opentofu providers, modules, resources, and data sources from the opentofu registry. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install OpenTofu?

Install via npm with the command: npx -y @opentofu/opentofu-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with OpenTofu?

OpenTofu works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is OpenTofu free to use?

Yes, OpenTofu is open source and available under the Mozilla Public License 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use OpenTofu?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides