How hybridindie/godot-mcp works
godot-mcp is an MCP server that lets an AI client operate a live Godot editor through a WebSocket bridge. The main workflow is: the client connects to the server, enables relevant toolsets, inspects project state, makes and verifies changes, then runs or profiles the game. The README also documents analysis, import, export, and other specialized tools. The graph uses README-level evidence for the documented workflow; unsampled tool implementations are represented by their exact paths without claiming unshown internal calls.
Main entry points: server.py MCP server · bridge.py WebSocket bridge · toolsets.py Toolset gating · inspection.py Scene inspection
Components 22
MCP access
- MCP server
mcp_server/server.py - Toolset gating
mcp_server/toolsets.py - Tool subscriptions
mcp_server/subscriptions.py - Workflow prompts
mcp_server/prompts/prompts.py - Project resources
mcp_server/resources/context.py - Safety controls
mcp_server/safety.py
Editor interaction
- Scene inspection
mcp_server/tools/inspection.py - Scene mutation
mcp_server/tools/mutation.py - Script editing
mcp_server/tools/scripts.py - WebSocket bridge
mcp_server/bridge.py
Run and verify
- Play sessions
mcp_server/tools/runtime_session.py - Live game inspection
mcp_server/tools/runtime_inspect.py - Input simulation
mcp_server/tools/input_sim.py - Game testing
mcp_server/tools/testing.py - Performance profiling
mcp_server/tools/profiling.py
Project capabilities
- Static analysis
mcp_server/tools/analysis.py - Asset import
mcp_server/tools/import_asset.py - Build export
mcp_server/tools/export.py - Project tools
mcp_server/tools/project_fs.py - Specialized editing
mcp_server/tools
Other components
- AI client
- Godot editor addon
Connections 23
- AI client → MCP server: connects via MCP
- MCP server → Toolset gating: gates tools
mcp_server/server.py - Toolset gating → Tool subscriptions: announces changes
mcp_server/toolsets.py - MCP server → Workflow prompts: offers prompts
mcp_server/server.py - MCP server → Project resources: offers resources
mcp_server/server.py - MCP server → Safety controls: applies safety
mcp_server/server.py - AI client → Scene inspection: requests inspection
- AI client → Scene mutation: requests changes
- AI client → Script editing: edits scripts
- Scene inspection → WebSocket bridge: routes commands
mcp_server/tools/inspection.py - Scene mutation → WebSocket bridge: routes changes
mcp_server/tools/mutation.py - Script editing → WebSocket bridge: uses editor bridge
- WebSocket bridge → Godot editor addon: sends WebSocket commands
- AI client → Play sessions: controls play
- AI client → Live game inspection: inspects live game
- AI client → Input simulation: simulates input
- AI client → Game testing: tests game
- AI client → Performance profiling: profiles performance
- AI client → Static analysis: requests analysis
- AI client → Asset import: imports assets
- AI client → Build export: exports builds
- AI client → Project tools: manages project files
- AI client → Specialized editing: uses domain tools