Godot Mcp Server
@tomyud1
Godot Mcp Server について
Connect your favorite AI Chat to your Godot project!
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"godot": {
"command": "npx",
"args": [
"-y",
"godot-mcp-server"
]
}
}
}ツール
33Check if Godot editor is connected to the MCP server. Use this before attempting Godot operations to see if you'll get real or mock data.
List files and folders under a Godot project path (e.g., res://). Returns arrays of files and folders in the specified directory.
Read a text file from the Godot project, optionally a specific line range. Useful for reading GDScript files, scene files, or any text-based content.
Search the Godot project for a substring and return file hits with line numbers. Useful for finding usages of functions, variables, or any text pattern.
Create a NEW GDScript file (.gd) that does not exist yet. Use this for creating new scripts, NOT for editing existing files (use edit_script for edits).
Create a new Godot scene (.tscn) file with nodes. Use this to create player scenes, UI screens, game objects, etc.
Read and parse a scene file to get its full node structure and properties. Use this to understand a scene before editing.
Add a single node to an existing scene file.
Remove a node from an existing scene file.
Modify a property on a node in a .tscn scene file. ALWAYS use this tool to modify properties in scene files - NEVER edit .tscn files directly. Use this to change positions, colors, sizes, visibility, etc.
Rename a node in a scene.
Move a node to a different parent in a scene and optionally control its position among siblings.
Attach or change a script on a node in a scene.
Remove a script from a node in a scene.
Create and assign a collision shape resource to a CollisionShape2D or CollisionShape3D node. Supports: CircleShape2D, RectangleShape2D, CapsuleShape2D, SphereShape3D, BoxShape3D, etc.
Assign a texture to a Sprite2D/Sprite3D/TextureRect node. Use after generate_2d_asset or to load existing images.
Apply a SMALL, SURGICAL code edit (1-10 lines) to GDScript files. Auto-applies changes. For large changes, call multiple times. ONLY for .gd files - NEVER for .tscn scene files.
Validate a GDScript file for syntax errors using Godot's built-in parser. Call after creating or modifying scripts to ensure they are error-free.
Create a directory (with parent directories if needed).
Delete a file permanently. ONLY use when explicitly requested. NEVER use to "edit" a file.
Rename or move a file, optionally updating references in other files.
List all GDScript files in the project with basic metadata.
Concise project settings summary: main_scene, window size/stretch, physics tick rate, and render basics.
Return the InputMap: action names mapped to events (keys, mouse, gamepad).
Return named 2D/3D physics collision layers from ProjectSettings.
Get available properties for a Godot node type. Use this to discover what properties exist on a node type (e.g., anchors_preset for Control, position for Node2D).
Return the latest lines from the Godot editor output log.
Get errors and warnings from the Godot editor log with file paths, line numbers, and severity. Returns the most recent errors first.
Mark the current position in the Godot editor log. Subsequent get_console_log and get_errors calls will only return output after this point.
Open a file in the Godot editor at a specific line (side-effect only).
Dump the scene tree of the scene currently open in the Godot editor (node names, types, and attached scripts).
Generate a 2D sprite/texture from SVG code and save as PNG. Use for custom visuals (characters, objects, backgrounds, UI). Returns resource_path and dimensions.
Crawl the entire Godot project and build an interactive visual map of all scripts showing their structure (variables, functions, signals), connections (extends, preloads, signal connections), and descriptions. Opens an interactive browser-based visualization.
概要
What is Godot MCP?
Godot MCP is a Model Context Protocol server that gives AI assistants like Claude, Cursor, and other MCP-compatible clients full access to the Godot 4.x editor. It provides 32 tools for reading, writing, and manipulating scenes, scripts, nodes, and project settings directly, enabling faster game development without context switching.
How to use Godot MCP?
Install Node.js (one-time setup), then install the "Godot AI Assistant tools MCP" plugin from the Godot AssetLib. Add the server configuration (npx -y godot-mcp-server) to your MCP-compatible AI client (Claude Desktop, Cursor, Claude Code, Cline, Windsurf, etc.). Restart your AI client and restart your Godot project to see a green "MCP Connected" indicator in the editor's top-right corner.
Key features of Godot MCP
- 32 tools across 6 categories (file, scene, script, project, asset generation, visualization)
- Interactive browser-based project map with real-time code editing
- Scene manipulation: create scenes, add/move nodes, set properties, attach scripts
- Script operations: apply code edits, validate syntax, rename files with reference updates
- Generate 2D sprites from SVG directly in the editor
- Supports Claude Desktop, Cursor, Claude Code, Cline, Windsurf, and any MCP client
Use cases of Godot MCP
- Build game scenes and scripts with AI assistance without copy-pasting
- Debug and refactor code using natural language commands
- Quickly set up node properties, collision shapes, and textures
- Explore project structure and relationships via the interactive visualizer
- Accelerate prototyping by letting AI handle repetitive editor tasks
FAQ from Godot MCP
What versions of Godot does it support?
Godot 4.x.
Which AI clients are compatible?
Any MCP-compatible client, including Claude Desktop, Cursor, Claude Code, Cline, and Windsurf. Configuration examples are provided for Claude Desktop, Cursor, and Claude Code.
What are the main limitations?
The server runs locally on localhost only, supports a single Godot instance at a time, has no undo (changes save directly—use version control), and cannot control runtime (play/simulate input). AI cannot create 100% of a game alone, especially complex UI layouts and compositing.
How does the architecture work?
The AI client communicates with the MCP Server (Node.js) via stdio. The server then connects to the Godot Editor plugin over WebSocket on port 6505. A separate HTTP visualizer runs on port 6510, accessible in a browser.
Is Godot MCP open source?
Yes, it is released under the MIT license.
「その他」の他のコンテンツ
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
コメント