Godot Forge

io.github.gregario由 GitHub 帳號 gregario 發布v0.1.2更新於 Oct 28, 2026

Godot 4 MCP server — test runner, API docs, script analysis, scene parsing, LSP.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

Godot 4 的 MCP 伺服器,讓 AI 助理執行 GUT/GdUnit4 測試、查詢 Godot 4 API 文件與 3→4 遷移對照、分析 GDScript 與場景,並可啟動專案或截圖。

可以做什麼
  • 執行 GUT/GdUnit4 測試,回傳結構化的通過/失敗結果與失敗位置
  • 檢索 Godot 4 API 文件,並提供 Godot 3→4 的棄用 API 遷移對照
  • 分析 GDScript 腳本中的十類常見陷阱,解析 .tscn/.tres 場景檔並檢查反模式與格式錯誤
  • 檢視專案結構概覽,並從 Godot 語言伺服器取得 LSP 診斷資訊
  • 啟動或停止專案並擷取除錯輸出,以及把視埠畫面截圖存成 PNG
適用情境
適合在 AI 助理撰寫或審查 Godot 4 專案的 GDScript、容易寫出 Godot 3 棄用 API 時使用;也適合想在對話中直接跑測試、檢查場景與截圖,而不必手動操作編輯器的人。
執行需求
透過 npx 在本機執行,需要 Node.js 18+。Godot 4.x 會自動偵測(可用 GODOT_PATH 覆寫),僅執行測試、啟動專案與截圖時需要;LSP 診斷需在 Godot 編輯器開啟專案時使用。專案目錄會向上尋找 project.godot 自動定位,也可用 --project 參數指定。未宣告任何驗證機制。
安裝前請注意
啟動專案與截圖會在你的機器上執行 Godot 執行檔,LSP 診斷會連線到正在執行的編輯器。伺服器會讀取並解析專案檔案與腳本,請留意其傳送給助理的內容。未要求任何憑證或付費。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Godot Forge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Godot Forge

The MCP server for Godot 4. Test runner, API docs, script analysis, and more.

[npm version] [npm downloads] [MIT License] [Node.js 18+] [MCP Compatible] [godot-forge MCP server]


AI coding assistants are structurally bad at GDScript. Models trained on data skewed towards Godot 3 hallucinate deprecated APIs (yield instead of await, KinematicBody instead of CharacterBody3D, export var instead of @export var). Godot Forge fixes this.

8 tools. Zero config. Works with every MCP-compatible IDE.

[godot-forge MCP server]

Install

bash
npx -y godot-forge

That's it. Godot Forge auto-detects your Godot binary (Steam, Homebrew, direct download) and finds your project.godot automatically.

Add to your IDE

Claude Code
bash
claude mcp add godot-forge -- npx -y godot-forge
Cursor

Add to .cursor/mcp.json:

json
{  "mcpServers": {    "godot-forge": {      "command": "npx",      "args": ["-y", "godot-forge"]    }  }}
VS Code (Copilot)

Add to .vscode/mcp.json:

json
{  "servers": {    "godot-forge": {      "command": "npx",      "args": ["-y", "godot-forge"]    }  }}
Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "godot-forge": {      "command": "npx",      "args": ["-y", "godot-forge"]    }  }}
Zed

Add to settings.json:

json
{  "context_servers": {    "godot-forge": {      "command": {        "path": "npx",        "args": ["-y", "godot-forge"]      }    }  }}
Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "godot-forge": {      "command": "npx",      "args": ["-y", "godot-forge"]    }  }}
More IDEs (Codex, Gemini CLI, JetBrains, Continue, Cline, Roo Code, Neovim, OpenCode, Kiro)

See IDE Setup Guide for configuration snippets for all supported IDEs.

Tools

ToolDescriptionNeeds GodotNeeds Editor
godot_run_testsRun GUT/GdUnit4 tests, get structured pass/fail resultsYesNo
godot_search_docsSearch Godot 4 API docs with 3→4 migration mappingNoNo
godot_analyze_scriptDetect 10 GDScript pitfalls (deprecated API, coupling, re-entrancy)NoNo
godot_analyze_sceneParse .tscn/.tres, detect antipatterns and format errorsNoNo
godot_get_project_infoProject structure overview with progressive disclosureNoNo
godot_get_diagnosticsLSP diagnostics from Godot's language serverNoYes
godot_run_projectLaunch/stop project, capture debug outputYesNo
godot_screenshotCapture viewport screenshot as base64 PNGYesNo

[!TIP] 6 of 8 tools work without Godot installed. Only test running, project launching, and screenshots need the binary.

Features

Test Runner

Auto-detects GUT and GdUnit4. Returns structured JSON with pass/fail counts, failure details with file paths and line numbers. Supports filtering by script, method, or inner class.

Ask your AI: "Run the water profile tests"→ { total: 5, passed: 5, failed: 0, duration_ms: 462 }

Godot 3→4 Migration Mapping

The #1 reason AI writes broken GDScript. When your AI queries a deprecated API, it gets the correct Godot 4 equivalent instantly (30+ mappings covering classes, methods, syntax, and constants).

Query: "KinematicBody"  →  "Renamed to CharacterBody3D in Godot 4"Query: "yield"          →  "yield(obj, 'signal') → await obj.signal"Query: "instance()"     →  "instance() → instantiate()"

Script Analysis: 10 Pitfalls

Every pitfall detected from real game development:

#PitfallWhat It Catches
1Godot 3→4 APIyield, connect("signal"), export var, instance()
2Giant scriptsOver 300 lines. Should be split
3:= on VariantType inference on Dictionary.get() causes parse errors
4Tight couplingExcessive get_node("../../...") references
5Signal re-entrancySignal emitted between state changes
6Autoload misuseToo many autoloads, static func on autoloads
7Missing disconnectconnect() without _exit_tree() cleanup
8_init() timingNode tree access before node is in tree
9Python-ismsList comprehensions, len(), Python imports
10.tres type fieldCustom class name instead of type="Resource"

Scene Analysis

Parses .tscn and .tres files. Detects deep nesting (>8 levels), oversized scenes (>100 nodes), missing script references, preload() in .tres, integer resource IDs, and more.

LSP Diagnostics

Connects to Godot's built-in language server (runs automatically when the editor is open). Returns real compiler errors and warnings (no guesswork).

[!NOTE] Requires the Godot editor to be running with your project open. All other tools work without the editor.

Screenshot Capture

Captures the game viewport as a PNG image. Loads the project's main scene (or a specified scene), waits for rendering, and returns the screenshot as base64 for the AI to see.

Configuration

Godot Binary

Auto-detected in this order:

  1. GODOT_PATH environment variable
  2. godot / godot4 in PATH
  3. Steam installation (macOS, Windows, Linux)
  4. Platform defaults (/Applications/Godot.app, Homebrew, Scoop, Flatpak, Snap, etc.)

Override manually:

bash
export GODOT_PATH="/path/to/godot"

See Godot Detection for the full list of searched paths.

Project Directory

Auto-detected by walking up from the current directory to find project.godot. Override:

bash
npx godot-forge --project /path/to/godot/project

Requirements

  • Node.js 18+: for npx execution
  • Godot 4.x: auto-detected (optional for 6 of 8 tools)
  • Any MCP-compatible IDE: Claude Code, Cursor, VS Code, Windsurf, Zed, and more

Design Principles

  • Outcomes, not operations: Each tool delivers a complete result, not raw API wrapping
  • 8 curated tools: No 93-tool context bloat (why this matters)
  • Progressive disclosure: Summaries first, details on demand
  • spawn() not exec(): No command injection, no Windows quoting bugs
  • Actionable errors: Every error includes a suggestion the AI can act on
  • Cross-platform: macOS, Windows, Linux. Steam and non-Steam installs.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Development

bash
git clone https://github.com/gregario/godot-forge.gitcd godot-forgenpm installnpm run buildnpm test        # 74 tests across 12 test files

Running locally

bash
# Point your IDE at the local buildclaude mcp add godot-forge-dev -- node /path/to/godot-forge/dist/index.js

Roadmap

See ROADMAP.md for planned features.

Phase 2: Input simulation, runtime scene tree inspection, performance profiling, shader validation, export/CI pipeline.

Licence

MIT

來源:README.md,提交 401f414

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分