OpenTofu
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.
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
Maintainer
Works with
Installation
NPM
npx -y @opentofu/opentofu-mcp-serverManual Installation
npx -y @opentofu/opentofu-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.
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/mcpOr 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-serverConfigure 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.
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.
OpenTofu Alternatives — Similar Cloud Services Servers
Looking for alternatives to OpenTofu? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
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.
Set Up OpenTofu in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.