The 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.
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
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:
Cursor / VS Code
Automatically install to Cursor in one click
Add this to your settings.json
.
You do not need to define any inputs.
Generic MCP Configuration
Local Server
Basic Usage
You can also run the server locally with npx:
Global Installation
Install globally for repeated use:
Claude Code (Local)
Add the local server to Claude Code:
Generic MCP Configuration (Local)
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
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
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.
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server providing AI assistants with access to healthcare data tools, including FDA drug information, PubMed research, health topics, clinical trials, and medical terminology lookup.Last updated -10Python
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with Confluence content, supporting operations like retrieving, searching, creating, and updating pages and spaces.Last updated -93TypeScriptMIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -16TypeScript
- AsecurityAlicenseAqualityA flexible Model Context Protocol server that makes documentation or codebases searchable by AI assistants, allowing users to chat with code or docs by simply pointing to a git repository or folder.Last updated -13119JavaScriptMIT License