
opentofu/opentofu-mcp-server 是从 https://github.com/opentofu/opentofu-mcp-server. 导入的 MCP 服务器候选
概览
opentofu/opentofu-mcp-server 是从 https://github.com/opentofu/opentofu-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
一个用于访问OpenTofu注册表的模型上下文协议(MCP)服务器。该服务器允许语言模型助手搜索和检索关于OpenTofu提供者、模块、资源和数据源的信息。
既有本地Node.js服务器,也有远程 Cloudflare Worker 部署。
特色
- 在OpenTofu注册库中搜索提供者、模块、资源和数据来源
- 获取特定提供者和模块的详细信息
- 访问资源和数据源的文档
- 检索全面的OpenTofu配置示例
- 支持MCP的AI助手界面
安装
你可以将该MCP服务器与任何支持模型上下文协议的AI助手一起使用。请选择托管服务或本地安装:
托管服务(推荐)
最简单的起步方式是使用我们在mcp.opentofu.org的托管服务。优势包括:
- ✅ 无需本地安装
- ✅ 始终更新最新的OpenTofu注册表数据
- ✅ 通过 Cloudflare Workers 全球分发
- ✅ 高可用性和高性能
克劳德·科德
将托管的 OpenTofu MCP 服务器添加到 Claude Code:
本页由 AI 翻译,技术细节请以原文为准。
README
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/mcp
Cursor / 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-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 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
安装
npx -y @opentofu/opentofu-mcp-server配置
{
"mcpServers": {
"opentofu": {
"transport": "streamable-http",
"url": "https://mcp.opentofu.org/mcp"
}
}
}