opentofu-mcp-server
OpenTofu MCP Server for accessing the OpenTofu Registry
Documentation
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:
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 sources
- `get-provider-details`: Get detailed information about a specific provider
- `get-module-details`: Get detailed information about a specific module
- `get-resource-docs`: Get documentation for a specific resource
- `get-datasource-docs`: Get documentation for a specific data source
Frequently asked questions
What is opentofu-mcp-server?
opentofu-mcp-server is OpenTofu MCP Server for accessing the OpenTofu Registry
How do I install opentofu-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is opentofu-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/opentofu/opentofu-mcp-server and has 108 stars.
Related MCP tools
Model Context Protocol Servers
The Open-Source Multimodal AI Agent Stack: Connecting Cutting-Edge AI Models and Agent Infra
A MCP for Claude Desktop / Claude Code / Windsurf / Cursor to build n8n workflows for you
MCP server to provide Figma layout information to AI coding agents like Cursor
The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Instant is the best backend for AI-coded apps. You get auth, permissions, storage, presence, and streams — everything you need to ship apps your users will love.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP