
ryanmazzolini/minimal-godot-mcp
Developer toolsMCP server bridging Godot's native LSP to AI coding assistants for GDScript validation
Overview
MCP server bridging Godot's native LSP to AI coding assistants for GDScript validation
README
minimal-godot-mcp
MCP server bridging Godot’s native LSP to AI coding assistants for GDScript validation
Table of Contents
- Quick Start
- Configuration
- Features
- MCP Tools
- Development
- Troubleshooting
- Works Well With
- References
- License
Quick Start
Prerequisites: Node.js 22+, Godot 3.2+ or 4.x with LSP enabled
Configure your MCP client to run the server with npx (see examples below). Start Godot with your project open, and your MCP client will connect automatically.
Configuration
MCP Client Setup
Features
- Zero-config LSP - Uses Godot’s native Language Server, no plugins required
- Fast diagnostics - Single-file checks return quickly
- Minimal footprint - Lightweight responses to minimize token usage
- Resilient connections - Handles Godot restarts automatically
- Workspace scanning - Bulk check all
.gdfiles in a project
MCP Tools
get_diagnostics
Check a single GDScript file for errors.
// Input
{ "file_path": "/path/to/script.gd" }
// Output
{
"diagnostics": {
"/path/to/script.gd": [
{ "line": 5, "column": 14, "severity": "error", "message": "Expected identifier", "code": "parse-error" }
]
}
}
scan_workspace_diagnostics
Scan all .gd files in the workspace (excludes addons/ and .godot/).
// Input
{}
// Output
{
"files_scanned": 150,
"files_with_issues": 3,
"scan_time_seconds": 1.5,
"diagnostics": { ... }
}
get_console_output
Get console output from Godot debug session. The server connects to Godot’s debug adapter at startup and keeps the connection across runs, so output is captured from the moment a scene starts (F5 in Godot).
// Input (all optional)
{
"limit": 50,
"category": "console",
"since": 1706000000000
}
// Output
{
"entries": [
{ "timestamp": 1706000001234, "category": "console", "message": "Player spawned", "source": "/project/player.gd", "line": 42 }
],
"total_buffered": 150
}
Categories: console (print statements), stdout, stderr (printerr() and runtime errors).
Runtime errors (for example calling a method on a null value) are reported by Godot as a debugger stop, not as output. They appear as stderr entries with the file and line of the failing frame. push_error() and push_warning() are not sent over DAP by Godot and cannot be captured.
clear_console_output
Clear the console output buffer.
// Input
{}
// Output
{ "cleared": true }
Development
Architecture
flowchart LR
MCP[MCP Client] |stdio| Server[minimal-godot-mcp]
Server |LSP :6005| Godot[Godot Editor]
Server |DAP :6006| Godot
- LSP (Language Server Protocol, solid line): Always connected for diagnostics
- DAP (Debug Adapter Protocol, dotted line): Connects at startup and retries every 5 seconds while Godot is not reachable (set
GODOT_DAP_CONNECT=lazyto connect on the firstget_console_outputcall instead)
See also:
Building from Source
Prerequisites: npm 12.0.1 with a supported Node.js release (^22.22.2, ^24.15.0, or >=26)
git clone https://github.com/ryanmazzolini/minimal-godot-mcp.git
cd minimal-godot-mcp
npm install && npm run build
Then use node /path/to/minimal-godot-mcp/dist/index.js instead of npx in your MCP client config.
Commands
npm test # Run tests
npm run lint # ESLint + Prettier
npm run build # Compile TypeScript
Contributing
- Run
npm run format && npm testbefore submitting - Test with a real Godot project
- Keep scope focused on diagnostics
Troubleshooting
See docs/troubleshooting.md for connection issues, missing diagnostics, and debug logging.
Works Well With
godot-mcp by @satelliteoflove provides runtime control, scene manipulation, screenshots, stack traces, and direct editor interaction through a Godot addon. This project handles the LSP and DAP side — diagnostics and console output with no addon needed.
The two servers are complementary and can run side by side.
References
- Model Context Protocol - Protocol specification
- Godot LSP - Language Server setup
License
MIT - see LICENSE
Install
npx -y @ryanmazzolini/minimal-godot-mcp@latestConfiguration
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["-y", "@ryanmazzolini/minimal-godot-mcp@latest"]
}
}
}