Skip to content
Back to search

opentofu-mcp-server

OpenTofu MCP Server for accessing the OpenTofu Registry

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/opentofu--opentofu-mcp-server/badge.svg)](/listings/opentofu--opentofu-mcp-server)

HTML

<a href="/listings/opentofu--opentofu-mcp-server"><img src="/api/listings/opentofu--opentofu-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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/mcp

Cursor / VS Code

[Automatically install to Cursor in one click](https://cursor.com/install-mcp?name=opentofu&config=eyJ0cmFuc3BvcnQiOiJzdHJlYW1hYmxlLWh0dHAiLCJ1cmwiOiJodHRwczovL21jcC5vcGVudG9mdS5vcmcvbWNwIn0%3D)

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-server

Global Installation

Install globally for repeated use:

npm install -g @opentofu/opentofu-mcp-server
opentofu-mcp-server

Claude Code (Local)

Add the local server to Claude Code:

claude mcp add opentofu -- npx @opentofu/opentofu-mcp-server

Generic 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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 120 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # OpenTofu MCP Server
  2. 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.
  3. Available as both a local Node.js server and a remote Cloudflare Worker deployment.
  4. ## Features
  5. - Search the OpenTofu Registry for providers, modules, resources, and data sources
  6. - Get detailed information about specific providers and modules
  7. - Access documentation for resources and data sources
  8. - Retrieve comprehensive OpenTofu configuration examples
  9. - MCP-compatible interface for AI assistants
  10. ## Installation
  11. You can use this MCP server with any AI assistant that supports the Model Context Protocol. Choose between the hosted service or local installation:
  12. ### Hosted Service (Recommended)
  13. The easiest way to get started is to use our hosted service at `mcp.opentofu.org`. Benefits include:
  14. - ✅ No local installation required
  15. - ✅ Always up-to-date with the latest OpenTofu Registry data
  16. - ✅ Globally distributed via Cloudflare Workers
  17. - ✅ High availability and performance
  18. #### Claude Code
  19. Add the hosted OpenTofu MCP server to Claude Code:
  20. ```bash
  21. claude mcp add opentofu -t streamable-http https://mcp.opentofu.org/mcp
  22. ```
  23. #### Cursor / VS Code
  24. [Automatically install to Cursor in one click](https://cursor.com/install-mcp?name=opentofu&config=eyJ0cmFuc3BvcnQiOiJzdHJlYW1hYmxlLWh0dHAiLCJ1cmwiOiJodHRwczovL21jcC5vcGVudG9mdS5vcmcvbWNwIn0%3D)
  25. Add this to your `settings.json`.
  26. ```json
  27. {
  28. "mcp": {
  29. "servers": {
  30. "opentofu": {
  31. "type": "streamable-http",
  32. "url": "https://mcp.opentofu.org/mcp"
  33. }
  34. }
  35. }
  36. }
  37. ```
  38. You do not need to define any inputs.
  39. #### Generic MCP Configuration
  40. ```json
  41. {
  42. "mcpServers": {
  43. "opentofu": {
  44. "transport": "streamable-http",
  45. "url": "https://mcp.opentofu.org/mcp"
  46. }
  47. }
  48. }
  49. ```
  50. ### Local Server
  51. #### Basic Usage
  52. You can also run the server locally with npx:
  53. ```bash
  54. npx @opentofu/opentofu-mcp-server
  55. ```
  56. #### Global Installation
  57. Install globally for repeated use:
  58. ```bash
  59. npm install -g @opentofu/opentofu-mcp-server
  60. opentofu-mcp-server
  61. ```
  62. #### Claude Code (Local)
  63. Add the local server to Claude Code:
  64. ```bash
  65. claude mcp add opentofu -- npx @opentofu/opentofu-mcp-server
  66. ```
  67. #### Generic MCP Configuration (Local)
  68. ```json
  69. {
  70. "mcpServers": {
  71. "opentofu": {
  72. "command": "npx",
  73. "args": ["-y", "@opentofu/opentofu-mcp-server"]
  74. }
  75. }
  76. }
  77. ```
  78. ### Available Tools
  79. The OpenTofu MCP server provides the following tools:
  80. #### Registry Search and Information
  81. - `search-opentofu-registry`: Search for providers, modules, resources, and data sources
  82. - `get-provider-details`: Get detailed information about a specific provider
  83. - `get-module-details`: Get detailed information about a specific module
  84. - `get-resource-docs`: Get documentation for a specific resource
  85. - `get-datasource-docs`: Get documentation for a specific data source

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.