godot-mcp-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGodot MCP Setup
Godot MCP 安装配置
Enables AI agents to install and configure the Godot MCP (Model Context Protocol) server for programmatic scene management.
让AI Agent能够安装并配置Godot MCP(Model Context Protocol)服务器,以实现程序化场景管理。
When to Use This Skill
何时使用此技能
Use ONLY when:
- User explicitly requests MCP-based scene building
- User wants programmatic scene creation/modification
- User asks about scene automation tools
DO NOT suggest unless:
- User expresses interest in MCP functionality
- Alternative manual methods insufficient
仅在以下情况使用:
- 用户明确要求基于MCP的场景构建
- 用户需要程序化的场景创建/修改
- 用户询问场景自动化工具
除非满足以下条件,否则请勿推荐:
- 用户表达了对MCP功能的兴趣
- 其他手动方法无法满足需求
Available Scripts
可用脚本
mcp_config_generator.gd
mcp_config_generator.gd
Tool script to generate the Claude Desktop config JSON for Godot MCP.
用于为Godot MCP生成Claude Desktop配置JSON的工具脚本。
NEVER Do in MCP Setup
MCP安装配置中的绝对禁忌
- NEVER suggest MCP for simple scene edits — MCP is for automation/batch operations. Single node addition? Use manual editor. MCP overhead (config + restart) wastes time.
- NEVER skip JSON syntax validation — Invalid JSON in = silent MCP failure. ALWAYS validate with
claude_desktop_config.jsonbefore saving.ConvertFrom-Json - NEVER forget to remind user to restart Claude Desktop — MCP changes require full app restart, NOT just new conversation. This is #1 user mistake.
- NEVER use global npm install without user permission — modifies system. ALWAYS prefer
npm install -g(on-demand) unless user specifically wants global.npx - NEVER assume Node.js is installed — Check BEFORE attempting npx. Missing Node = cryptic "command not found" errors.
node --version
- 绝对不要为简单场景编辑推荐MCP —— MCP适用于自动化/批量操作。仅添加单个节点?请使用手动编辑器。MCP的配置和重启开销会浪费时间。
- 绝对不要跳过JSON语法验证 —— 中的无效JSON会导致MCP静默失败。保存前务必使用
claude_desktop_config.json进行验证。ConvertFrom-Json - 绝对不要忘记提醒用户重启Claude Desktop —— MCP的更改需要完全重启应用程序,而不仅仅是开启新对话。这是用户最常犯的错误。
- 绝对不要未经用户许可使用全局npm安装 —— 会修改系统设置。除非用户明确要求全局安装,否则优先使用
npm install -g(按需执行)。npx - 绝对不要假设已安装Node.js —— 在尝试使用npx之前,请先检查。缺少Node.js会导致模糊的"命令未找到"错误。
node --version
Installation Workflow
安装工作流
Step 1: Check if MCP is Already Installed
步骤1:检查MCP是否已安装
For PowerShell (Windows):
powershell
undefined适用于PowerShell(Windows):
powershell
undefinedCheck if the Godot MCP server is configured
Check if the Godot MCP server is configured
$mcpConfigPath = "$env:APPDATA\Claude\claude_desktop_config.json"
if (Test-Path $mcpConfigPath) {
$config = Get-Content $mcpConfigPath | ConvertFrom-Json
if ($config.mcpServers.godot) {
Write-Host "Godot MCP server is already configured."
}
}
undefined$mcpConfigPath = "$env:APPDATA\Claude\claude_desktop_config.json"
if (Test-Path $mcpConfigPath) {
$config = Get-Content $mcpConfigPath | ConvertFrom-Json
if ($config.mcpServers.godot) {
Write-Host "Godot MCP server is already configured."
}
}
undefinedStep 2: Install Godot MCP Server
步骤2:安装Godot MCP服务器
Installation Command (npx):
powershell
undefined安装命令(npx):
powershell
undefinedInstall globally
Install globally
npm install -g @modelcontextprotocol/server-godot
npm install -g @modelcontextprotocol/server-godot
OR use npx for on-demand execution
OR use npx for on-demand execution
npx @modelcontextprotocol/server-godot
undefinednpx @modelcontextprotocol/server-godot
undefinedStep 3: Configure Claude Desktop
步骤3:配置Claude Desktop
The MCP server must be registered in Claude Desktop's configuration file.
Configuration File Location:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Example Configuration:
json
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-godot"]
}
}
}MCP服务器必须在Claude Desktop的配置文件中注册。
配置文件位置:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
示例配置:
json
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-godot"]
}
}
}Step 4: Restart Claude Desktop
步骤4:重启Claude Desktop
After configuration, the user must restart Claude Desktop for MCP changes to take effect.
配置完成后,用户必须完全重启Claude Desktop,MCP的更改才能生效。
Verification
验证
After installation, verify the MCP tools are available by checking if tools are accessible.
mcp_godot_*安装完成后,可通过检查是否能访问工具来验证MCP工具是否可用。
mcp_godot_*Common Issues
常见问题
Issue: MCP server not appearing after restart
- Solution: Verify the JSON syntax in
claude_desktop_config.json - Solution: Check that Node.js and npm are installed
Issue: Permission errors during installation
- Solution: Run PowerShell as Administrator on Windows
问题:重启后MCP服务器未显示
- 解决方案:验证中的JSON语法是否正确
claude_desktop_config.json - 解决方案:检查是否已安装Node.js和npm
问题:安装时出现权限错误
- 解决方案:在Windows上以管理员身份运行PowerShell
Reference
参考资料
- Godot MCP Server: GitHub Repository
- MCP Protocol: Official Documentation
Related
相关技能
- Master Skill: godot-master
- 主技能:godot-master