Skip to main content
Glama
OhaoTech

niua-godot-mcp

by OhaoTech

NIUA Godot MCP

v0.1.12

你的AI能在你的机器上构建真正的Godot游戏。

安装一次。聊天。Godot打开,场景出现,游戏运行。全本地。


60秒安装

选项A——粘贴到你的AI中(最简单)

复制到Claude Code、Cursor、Codex或任何有shell访问权限的代理中:

Install NIUA Godot MCP for me.
Follow: https://raw.githubusercontent.com/OhaoTech/niua-godot-mcp/main/docs/godot-mcp/INSTALL-BY-AGENT.md
Ask before writing any config. Then call get_godot_version.

当它提示时重启AI客户端。完成。

选项B——自己动手

需要: Node 20+ · Godot 4.7 · Claude / Cursor / Codex / 等。

git clone https://github.com/OhaoTech/niua-godot-mcp.git
cd niua-godot-mcp
mkdir -p ~/Godot/NIUAProjects

Claude Code:

claude mcp add niua-godot -s user \
  --env GODOT_MCP_ALLOWED_PROJECT_ROOTS="$HOME/Godot/NIUAProjects" \
  -- node "$(pwd)/src/godot-mcp/cli.js"

Codex / Claude Desktop / Cursor:

# preview
node src/godot-mcp/cli.js setup --client codex --project-root "$HOME/Godot/NIUAProjects"
# write (use --client claude or --client generic for others)
node src/godot-mcp/cli.js setup --client codex --project-root "$HOME/Godot/NIUAProjects" --write

重启你的AI工具。


Related MCP server: Gear

第一个游戏

询问你的AI:

Create a Godot project at ~/Godot/NIUAProjects/first-game.
Build a 3D scene with a ground, a cube, a camera, and a light.
Save it, set it as main, then call run_playtest_evidence and tell me the evidence claims.

你应该会看到Godot打开并出现一个真实的游戏窗口。代理会获得一个紧凑的验证包(运行+观察+截图协议),而不是手动构建的工具循环。


如果出问题

问题

修复

Unable to run Godot

安装Godot 4.7,或者在MCP配置中设置GODOT_BIN=/path/to/godot

outside allowed project roots

将项目放在~/Godot/NIUAProjects(或你选择的文件夹)下

bridge is not reachable

询问AI:'open the project with open_project'

工具缺失

安装后重启AI客户端

Godot卡在对话框

在Godot中按Esc;要求AI在运行前保存场景

健康检查:

cd niua-godot-mcp && node src/godot-mcp/doctor.js

更多帮助:故障排除


可选

# Claude Code
mkdir -p ~/.claude/skills && cp -r skills/niua-godot ~/.claude/skills/

# Codex / agents
mkdir -p ~/.agents/skills && cp -r skills/niua-godot ~/.agents/skills/

AI打开项目一次后:

node examples/sdk-quickstart.mjs ~/Godot/NIUAProjects/first-game
import { connect } from "niua-godot-mcp/sdk";
const godot = connect({ expectedProjectRoot: "/path/to/project" });
// no tokens to configure

默认是core(约52个工具)——足以制作真实游戏。

  • full——所有稳定工具

  • compact——13个路由器后的完整表面

node src/godot-mcp/cli.js setup --client codex --project-root "$HOME/Godot/NIUAProjects" --profile full --write

实验性工具(多人游戏、导航、导出等)保持隐藏,除非你设置NIUA_MCP_EXPERIMENTAL=on。目录:tools.md

npm test
npm run godot:mcp:docs

许可证

PolyForm Small Business 1.0.0 ——对个人和约100人以下/约100万美元收入的组织免费。更大的组织请联系:team@ohao.tech

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that gives AI assistants direct control over Godot 4 game development projects. It enables launching the editor, running projects, creating and editing scenes, writing GDScript, and inspecting assets through natural language commands.
    44
    15 npm
    4
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI assistants to directly run, inspect, modify, and debug Godot game development projects through 110+ tools covering scenes, scripts, resources, runtime debugging, and asset management.
    33
    21 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A security-first MCP server and Godot editor addon enabling AI agents to observe and control Godot games through bounded, permission-gated tools for debugging, input automation, and project editing.
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    An MCP server that lets AI coding agents work on Godot 4 projects, including reading and editing scenes, writing and validating GDScript, running the game, and capturing screenshots.
    25
    50 npm
    MIT