
Godot 4.x GDScript 项目的离线静态正确MCP服务器
概览
一个模型上下文协议服务器(和gdre正CLI),静态地检查Godot 4.x GDScript项目的正确性. 它运行着——它从不发射编辑器,从不需要运行的哥多特实例,从不在运行时接触网络. 1. 通过承诺的植树人语法(WASM)进行反模式检测。 规则如 Derta- missuse, 获取点入进程, 缺失即时, 未类型化的宣布, 等待- missuse, 字符串- nodepath, 连接- 无连接, 浮格- 平等, 加上去除的 Api- usage 与 Godot 版本 您的项目声明 。 见Docs/lint.md. 2. 查询类/方法/财产/标志,以及Godot和.之间的API,来自已承诺的离线符号数据库。 见文件/同义词-db.md。 3. 验证.tscn、.tres和project.godot,包括深入验证由数据驱动的.tres登记册( " 夹层-路径检查 " )。 见文件/简报。 它不连接运行中的编辑器或游戏。 - 哥多特内部没有东西可以安装 - 仅限GDScript.
概述(AI 翻译)
** Godot 4.x GDScript 项目的MCP服务器**
– – . . .
用于静态检查 Godot 4.x GDScript 项目的正确性。 它运行无头,离线,和英寸 CI——它从不推出编辑器,从不需要运行的哥多特实例,以及 在运行时绝不接触网络.
□ 三根支柱
- GDScript linting——通过承诺的植树造林进行反模式检测
语法 (WASM). 规则类似[[T1],[T2],
[[T3]、[T4]、[T5]、[T6]、
[[T7],[T8],加上
removed-api-usage与 Godot 版本核对您的项目声明 。 见文件/lint.md。 - Cross-version API检索和diff——查询类/方法/财产/符号 在Godot4.4和4.5之间通过线下实施 符号数据库。 见文件/同义词-db.md。
- ** 场景/资源/登记册分析**——审定[[T10]、[T11]],
project.godot,包括深入审定数据驱动的[T13]登记册 (夹道检查) 见文件/简报。
□ 非目标
- 没有活桥.
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
godot-correctness-mcp
Offline static correctness MCP server for Godot 4.x GDScript projects
A Model Context Protocol server (and gdcorrect CLI) that statically checks the
correctness of Godot 4.x GDScript projects. It runs headless, offline, and in
CI — it never launches the editor, never needs a running Godot instance, and
never touches the network at runtime.
Three pillars
- GDScript linting — anti-pattern detection via a committed tree-sitter
grammar (WASM). Rules like
delta-misuse,get-node-in-process,missing-onready,untyped-declaration,await-misuse,stringly-nodepath,connect-without-disconnect,float-grid-equality, plus theremoved-api-usagecheck against the Godot version your project declares. See docs/lint.md. - Cross-version API lookup & diff — query classes/methods/properties/signals and diff the API between Godot 4.4 and 4.5, from committed offline symbol databases. See docs/symbol-db.md.
- Scene / resource / registry analysis — validate
.tscn,.tres, andproject.godot, including deep validation of data-driven.tresregistries (the dangling-path check). See docs/scenes.md.
Non-goals
- No live bridge. It does not connect to a running editor or game.
- No editor plugin. Nothing to install inside Godot.
- No C#. GDScript only.
- Nothing older than Godot 4.4. Symbol data is pinned to 4.4 and 4.5.
This is deliberately the complement to the live-session Godot MCP tools: it is the one you run in CI and headless pipelines.
Installation
As an MCP server (Claude Desktop / Cursor mcpServers config):
{
"mcpServers": {
"godot-correctness": {
"command": "npx",
"args": ["-y", "@tmhs/godot-correctness-mcp"]
}
}
}
As a CLI:
npx -y -p @tmhs/godot-correctness-mcp@^0.2 gdcorrect lint . --format json
MCP surface
Tools: server_info; api_symbol_lookup, api_class_summary, api_diff;
lint_file, lint_project, list_rules; validate_scenes, validate_project_config,
validate_registries, project_report. The lint, validate, and report tools take an
optional baseline file (the one gdcorrect --write-baseline writes) to return only new
findings; list_rules (and gdcorrect rules) lists every rule id with its default and
per-project severity.
Resources: curated GDScript skill snippets under skill:// (data-driven
resources, signal hygiene, typed GDScript, preload vs load).
CLI and CI
gdcorrect [options], where `` is
lint, validate-scenes, validate-project, validate-registries, or report
(gdcorrect --help lists them all).
| Option | Meaning |
|---|
安装
npx -y @tmhs/godot-correctness-mcp配置
{
"mcpServers": {
"godot-correctness": {
"command": "npx",
"args": ["-y", "@tmhs/godot-correctness-mcp"]
}
}
}