godot-mcp

godot-mcp

Bridges AI assistants with the Godot 4 editor, exposing tools to inspect scenes, create nodes, modify properties, capture screenshots, debug scripts, and manage project files via the Model Context Protocol.

Category
访问服务器

README

<p align="center"> <img src="https://img.shields.io/badge/Godot-4.x-478CBF?style=for-the-badge&logo=godotengine&logoColor=white" alt="Godot 4"> <img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=for-the-badge" alt="MCP"> <img src="https://img.shields.io/badge/Python-3.10+-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python 3.10+"> <img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge" alt="License"> <img src="https://img.shields.io/badge/version-0.1.0-blue?style=for-the-badge" alt="Version"> </p>

Godot MCP

Control the Godot 4 editor from Claude Code (or any MCP client) via the Model Context Protocol.

Godot MCP is a bridge between AI assistants and the Godot 4 engine. It exposes 18 MCP tools + 3 editor-side endpoints that let you inspect scenes, create nodes, modify properties, capture screenshots, debug scripts, and manage project files — all without leaving your terminal.

Architecture

┌─────────────┐       stdio        ┌─────────────────┐      HTTP       ┌──────────────────┐
│  MCP Client │◄──────────────────►│  godot-mcp       │◄──────────────►│  Godot 4 Editor  │
│ (Claude Code)│                    │  (Python server) │  localhost:6789 │  (Editor Plugin) │
└─────────────┘                    └─────────────────┘                 └──────────────────┘

The system has two components:

  1. MCP Server (Python) — Receives tool calls via stdio, translates them into HTTP requests
  2. Editor Plugin (GDScript) — Runs inside Godot 4, exposes an HTTP API on 127.0.0.1:6789

Installation

1. Install the Python package

cd godot-mcp
pip install -e .

2. Install the Godot plugin

Copy the plugin folder into your Godot project:

cp -r godot_plugin/addons/godot_mcp /path/to/your/godot-project/addons/

Then in Godot: Project → Project Settings → Plugins → Enable "Godot MCP"

3. Configure Claude Code

Add to your Claude Code MCP settings (~/.claude.json or project config):

{
  "mcpServers": {
    "godot-mcp": {
      "command": "godot-mcp",
      "type": "stdio"
    }
  }
}

Available Tools

Tool Description
get_editor_state Get current editor state (open scenes, selected nodes)
get_scene_tree Get the full scene tree hierarchy
get_node_properties Get all properties of a specific node
set_node_property Modify a node property in real-time
create_node Create a new node (any Godot class) in the scene tree
delete_node Remove a node from the scene tree
save_scene Save the current scene to disk
run_scene Run the current or a specific scene
stop_scene Stop the running scene
execute_script Execute GDScript code in editor context
get_project_files List project files with glob pattern filtering
read_script Read the contents of a GDScript file
write_script Write or modify a GDScript file
get_viewport_screenshot Capture the editor viewport as base64 PNG
get_logs Get recent logs and errors from the Godot console
search_assets Search the Godot Asset Library
download_asset Download and install an asset from the Asset Library
preview_asset Preview an image file from the project as base64 PNG

Editor-Side Endpoints (GDScript plugin)

These endpoints are available directly on the Godot HTTP server and can be accessed by the MCP tools internally:

Endpoint Description
GET /editor/errors Get filtered error messages from the editor error buffer
POST /script/check Validate GDScript syntax without executing it
GET /editor/debugger Get runtime debugger messages via MCPDebugCapture

Usage Example

Once both the Godot plugin is enabled and Claude Code is configured, you can interact with your Godot project naturally:

You: "Show me the scene tree of the current scene"
Claude: [calls get_scene_tree] → returns the full node hierarchy

You: "Move the Player node to position (100, 200)"
Claude: [calls set_node_property("Player", "position", "Vector2(100, 200)")]

You: "Run the game and check if it works"
Claude: [calls run_scene] → launches the scene in Godot

You: "Create a new script that makes the player jump"
Claude: [calls write_script("res://scripts/player.gd", "...GDScript code...")]

You: "Check my script for syntax errors"
Claude: [calls execute_script via /script/check] → returns compilation errors if any

You: "Show me the recent errors"
Claude: [calls get_logs(level="error")] → returns filtered error messages

Requirements

  • Godot 4.x with the editor plugin enabled
  • Python 3.10+
  • Dependencies: mcp >= 1.0.0, httpx >= 0.27.0

Project Structure

godot-mcp/
├── src/godot_mcp/
│   ├── __init__.py
│   └── server.py            # MCP server (18 tools)
├── godot_plugin/addons/godot_mcp/
│   ├── plugin.cfg            # Plugin metadata
│   ├── plugin.gd             # Plugin entry point
│   └── godot_mcp_server.gd   # HTTP server + error tracking + debug capture
└── pyproject.toml

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选