GodotLens: AI-First Code Analysis for GDScript
An MCP server providing 15 semantic analysis tools for GDScript, powered by Godot's built-in Language Server.
Built for AI Agents
AI coding agents work with text files but lack semantic understanding of GDScript. When an agent uses grep to find usages of a function, it cannot distinguish a function call from a comment containing the same name, a signal declaration from a signal emission, or an overridden method from an unrelated function.
GodotLens bridges this gap by exposing Godot's built-in Language Server through the Model Context Protocol (MCP), giving AI agents compiler-accurate code intelligence for GDScript — go to definition, find references, diagnostics, rename, and more.
Example: Finding all usages of _on_player_hit:
| Approach | Result |
|---|---|
grep "_on_player_hit" |
12 matches including comments, strings, and similarly named functions |
gdscript_references |
Exactly 4 call sites where _on_player_hit is invoked |
Prerequisites
- Godot 4.x editor must be running with your project open — Godot's LSP server starts automatically when the editor opens a project
- Python 3.10+ (for pip install) or Node.js 16+ (for npx)





