godot-correctness-mcp

v0.4.0
@tmhs/godot-correctness-mcp Checked 2 days ago Published 4 days ago

Offline static correctness MCP server for Godot 4.x GDScript projects

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

server_info

Report this server's version, the pinned Godot versions it targets (4.4, 4.5), and which correctness pillars (GDScript lint, API symbols, scene/resource analysis) are currently available. Takes no arguments.

api_symbol_lookup

Look up a Godot API symbol (class, method, property, or signal) by name across the pinned Godot versions. Supports 'Owner.member' queries. Returns full signature data, or closest-match suggestions on a miss.

ParameterTypeDescription
symbol *stringSymbol name, e.g. 'Node', 'move_and_slide', or 'Node.get_child_count'
kindstringRestrict results to one symbol kind
versionstringLimit to one version; omit to search all available versions

api_class_summary

Full member listing for one Godot class in one version: inheritance chain, methods, properties, signals, enums, and constants.

ParameterTypeDescription
class *stringClass name, e.g. 'CharacterBody2D'
version *stringWhich Godot version to summarize

api_diff

Diff a Godot class or symbol between two versions (default 4.4 -> 4.5): what was added, removed, or had its signature changed, with old and new signatures side by side.

ParameterTypeDescription
symbol *stringClass name (e.g. 'TileMap') or symbol (e.g. 'move_and_slide')
fromstringBase version (default 4.4)
tostringTarget version (default 4.5)

lint_file

Lint a single GDScript (.gd) file against the default ruleset. 'path' is required; pass 'source' to lint unsaved text instead of reading the file. Config is loaded from the nearest ancestor directory containing godot-correctness.config.json or project.godot (the project root), the same config lint_project uses. Returns a findings array.

ParameterTypeDescription
path *stringPath to the .gd file (used for the reported location and config lookup)
sourcestringInline GDScript source; if omitted, the file at 'path' is read

lint_project

Lint every GDScript file under a project root, honoring include/exclude globs from godot-correctness.config.json. Returns aggregated findings and severity counts, and the Godot version project.godot declares. Pass 'baseline' to see only new findings.

ParameterTypeDescription
path *stringPath to the Godot project root
baselinestringOptional gdcorrect baseline file (from 'gdcorrect <cmd> --write-baseline'); relative paths resolve against the project root. When set, only findings not in the baseline are returned, plus 'baselined'…

list_rules

List every rule gdcorrect can report (GDScript lint rules and the scene, project, and registry checks) with its description and default severity. Pass 'path' (a project root) to also get the effective enabled/severity/options from that project's godot-correctness.config.json and the Godot version project.godot declares.

ParameterTypeDescription
pathstringOptional Godot project root to resolve its config

validate_scenes

Validate every .tscn under a project root: ext_resource paths resolve, ExtResource/SubResource references are declared, there are no duplicate resource ids, node parent paths exist, [connection] targets have the named method, and literal $Path/get_node() paths in attached scripts exist in the scene.

ParameterTypeDescription
path *stringPath to the Godot project root
baselinestringOptional gdcorrect baseline file (from 'gdcorrect <cmd> --write-baseline'); relative paths resolve against the project root. When set, only findings not in the baseline are returned, plus 'baselined'…

validate_project_config

Validate project.godot: the main scene exists, autoload paths exist, input actions are well-formed, and input action names used in scripts are defined.

ParameterTypeDescription
path *stringPath to the Godot project root
baselinestringOptional gdcorrect baseline file (from 'gdcorrect <cmd> --write-baseline'); relative paths resolve against the project root. When set, only findings not in the baseline are returned, plus 'baselined'…

validate_registries

Deep-validate data-driven .tres registries in the configured registryDirs: each parses, its script resolves (recording class_name), and every resource-path property points at an existing file (the dangling-path check).

ParameterTypeDescription
path *stringPath to the Godot project root
baselinestringOptional gdcorrect baseline file (from 'gdcorrect <cmd> --write-baseline'); relative paths resolve against the project root. When set, only findings not in the baseline are returned, plus 'baselined'…

project_report

Aggregate all static checks (scenes, project config, registries, and GDScript lint) into one report with severity counts.

ParameterTypeDescription
path *stringPath to the Godot project root
baselinestringOptional gdcorrect baseline file (from 'gdcorrect <cmd> --write-baseline'); relative paths resolve against the project root. When set, only findings not in the baseline are returned, plus 'baselined'…