OpenTofu MCP Server
OfficialThe OpenTofu MCP Server provides an MCP-compatible interface to search and retrieve information from the OpenTofu Registry:
Search the OpenTofu Registry: Find providers, modules, resources, and data sources using simple search queries
Get provider details: Retrieve detailed information about specific providers by namespace and name
Get module details: Access detailed information about specific modules by namespace, name, and target
Get resource documentation: Fetch documentation for specific resources by provider namespace, provider name, and resource name
Get data source documentation: Obtain documentation for specific data sources by provider namespace, provider name, and data source name
Offers a remote deployment option as a Cloudflare Worker, providing globally distributed access to the OpenTofu Registry data.
Enables running the MCP server locally as a Node.js application for accessing the OpenTofu Registry.
Provides search and retrieval of OpenTofu Registry content, including information about providers, modules, resources, and data sources, along with their documentation and configuration examples.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenTofu MCP Server search for AWS provider details"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenTofu MCP Server
A Model Context Protocol (MCP) server for accessing the OpenTofu Registry. This server allows language model assistants to search for and retrieve information about OpenTofu providers, modules, resources, and data sources.
Available as both a local Node.js server and a remote Cloudflare Worker deployment.
Features
Search the OpenTofu Registry for providers, modules, resources, and data sources
Get detailed information about specific providers and modules
Access documentation for resources and data sources
Retrieve comprehensive OpenTofu configuration examples
MCP-compatible interface for AI assistants
Related MCP server: terraform-best-practices-mcp-server
Installation
You can use this MCP server with any AI assistant that supports the Model Context Protocol. Choose between the hosted service or local installation:
Hosted Service (Recommended)
The easiest way to get started is to use our hosted service at mcp.opentofu.org. Benefits include:
✅ No local installation required
✅ Always up-to-date with the latest OpenTofu Registry data
✅ Globally distributed via Cloudflare Workers
✅ High availability and performance
Claude Code
Add the hosted OpenTofu MCP server to Claude Code:
claude mcp add opentofu -t streamable-http https://mcp.opentofu.org/mcpCursor / VS Code
Automatically install to Cursor in one click
Add this to your settings.json.
{
"mcp": {
"servers": {
"opentofu": {
"type": "streamable-http",
"url": "https://mcp.opentofu.org/mcp"
}
}
}
}You do not need to define any inputs.
Generic MCP Configuration
{
"mcpServers": {
"opentofu": {
"transport": "streamable-http",
"url": "https://mcp.opentofu.org/mcp"
}
}
}Local Server
Basic Usage
You can also run the server locally with npx:
npx @opentofu/opentofu-mcp-serverGlobal Installation
Install globally for repeated use:
npm install -g @opentofu/opentofu-mcp-server
opentofu-mcp-serverClaude Code (Local)
Add the local server to Claude Code:
claude mcp add opentofu -- npx @opentofu/opentofu-mcp-serverGeneric MCP Configuration (Local)
{
"mcpServers": {
"opentofu": {
"command": "npx",
"args": ["-y", "@opentofu/opentofu-mcp-server"]
}
}
}Available Tools
The OpenTofu MCP server provides the following tools:
Registry Search and Information
search-opentofu-registry: Search for providers, modules, resources, and data sourcesget-provider-details: Get detailed information about a specific providerget-module-details: Get detailed information about a specific moduleget-resource-docs: Get documentation for a specific resourceget-datasource-docs: Get documentation for a specific data source
Available Tools
5 toolsget-datasource-docsA
Get detailed documentation for a specific OpenTofu data source by provider namespace, provider name, and data source name.
Inputs: namespace (required), name (required), dataSource (required), version.
get-module-detailsA
Get detailed information about a specific OpenTofu module by namespace, name, and target. Use the simple module name, NOT the full repository name.
Inputs: namespace (required), name (required), target (required).
get-provider-detailsB
Get detailed information about a specific OpenTofu provider by namespace and name. Do NOT include 'terraform-provider-' prefix in the name.
Inputs: namespace (required), name (required).
get-resource-docsA
Get detailed documentation for a specific OpenTofu resource by provider namespace, provider name, and resource name.
Inputs: namespace (required), name (required), resource (required), version.
search-opentofu-registryA
Search the OpenTofu Registry to find providers, modules, resources, and data sources. Use simple terms without prefixes like 'terraform-provider-' or 'terraform-module-'.
Inputs: query (required), type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: one for data source docs, one for module details, one for provider details, one for resource docs, and one for general search. No overlap or ambiguity.
Four tools follow a 'get-<object>-<suffix>' pattern using kebab-case, while the fifth uses 'search-<target>'. This is mostly consistent with a minor deviation, but still predictable.
Five tools is well-scoped for a registry query server, covering the main object types (providers, modules, resources, data sources) plus a search function. No tools are extraneous.
The tool set provides documentation and details for all major registry entities, and a general search covers discovery. Missing direct listing tools, but search mitigates this gap.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Search and browse every MCP server in the Model Context Protocol registry.
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceConnects AI models to the Terraform Registry via MCP, enabling provider lookups, resource usage examples, and module recommendations for streamlined Terraform workflows.1,276 npm120MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol (MCP) server for producing better Terraform through CLI analysis (tflint, checkov, trivy, kics, infracost), best-practice guidance from terraform-best-practices.com, cloud provider recommendations (Azure, AWS, GCP), and Terraform Registry resource and module guidance.18768 npm1MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for querying package registries (npm, PyPI, crates.io) to retrieve metadata, release timelines, and maintenance signals.1MIT