opentofu
OpenTofu MCP Server for accessing the OpenTofu Registry
claude mcp add --transport stdio opentofu-opentofu-mcp-server npx -y @opentofu/opentofu-mcp-server
How to use
The OpenTofu MCP Server provides an MCP-compatible interface to search the OpenTofu Registry and retrieve detailed information about providers, modules, resources, and data sources. It also serves comprehensive OpenTofu configuration examples and documentation through a consistent API that AI assistants can query. You can run the server locally with npx or use the hosted Cloudflare-backed service, and then connect your client or IDE tools to the MCP endpoint to perform searches, fetch provider/module details, and obtain resource/docs content. The available tooling includes search, provider/module detail lookups, and docs retrieval for resources and data sources, enabling you to build richer AI-assisted OpenTofu workflows.
How to install
Prerequisites:
- Node.js and npm installed on your machine (Node.js 14+ recommended).
- Internet access to install the MCP server via npm/pnpm/yarn.
Local installation and run:
- Ensure you have Node.js and npm: node -v npm -v
- Run the MCP server locally using npx (no global install required): npx @opentofu/opentofu-mcp-server
- Alternatively, install globally for repeated use: npm install -g @opentofu/opentofu-mcp-server opentofu-mcp-server
Configuration examples:
- Basic local configuration (JSON): { "mcpServers": { "opentofu": { "command": "npx", "args": ["-y", "@opentofu/opentofu-mcp-server"] } } }
Notes:
- If you prefer using the hosted service, see the hosted configuration options in the README (no local install required).
- The server supports standard MCP client configurations and can be integrated into editors like Claude Code or Cursor via the provided snippets.
Additional notes
Tips and common topics:
- The hosted service URL for the MCP stream is https://mcp.opentofu.org/sse. Use this for quick testing or to avoid local setup.
- If you run locally, you can query for registry data using the following tools exposed by the server: search-opentofu-registry, get-provider-details, get-module-details, get-resource-docs, get-datasource-docs.
- In environments behind proxies, ensure Node.js can access the internet to fetch the MCP server package when using npx.
- If you need a different transport (e.g., SSE vs other MCP transports), adjust the mcpServers entry accordingly in your client configuration.
- For automation, you can embed the mcp config into your app startup or CI workflows to ensure consistent MCP endpoints across environments.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud