这是一个模型上下文协议(MCP)服务器,它为AI助手提供了访问完整的Godot引擎文档的权限,通过直接向大型语言模型提供文档来帮助开发者进行Godot开发。
此服务器连接了AI助手与Godot文档之间的桥梁,允许开发者在不离开AI聊天界面的情况下获得关于Godot类、教程和功能的即时准确答案。
克隆仓库:
git clone https://github.com/Nihilantropy/godot-mcp-docs.git
cd godot-mcp-docs
构建Docker镜像:
docker build -f deploy/Dockerfile -t godot-mcp-docs:local .
配置您的MCP客户端(以Claude Desktop为例):
{
"mcpServers": {
"godot-mcp-docs": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"godot-mcp-docs:local"
]
}
}
}
该服务器提供了对完整官方Godot文档的访问权限,其结构如下:
docs/
├── _styleguides
├── _tools
│ └── redirects
├── about
├── classes
├── community
│ └── asset_library
├── contributing
│ ├── development
│ │ ├── compiling
│ │ ├── configuring_an_ide
│ │ ├── core_and_modules
│ │ ├── debugging
│ │ │ └── vulkan
│ │ ├── editor
│ │ └── file_formats
│ ├── documentation
│ └── workflow
├── getting_started
│ ├── first_2d_game
│ ├── first_3d_game
│ ├── introduction
│ └── step_by_step
├── img
└── tutorials
├── 2d
├── 3d
│ ├── global_illumination
│ ├── particles
│ └── procedural_geometry
├── animation
├── assets_pipeline
│ ├── escn_exporter
│ └── importing_3d_scenes
├── audio
├── best_practices
├── editor
├── export
├── i18n
├── inputs
├── io
├── math
├── migrating
├── navigation
├── networking
├── performance
│ └── vertex_animation
├── physics
│ └── interpolation
├── platform
│ ├── android
│ ├── ios
│ └── web
├── plugins
│ └── editor
├── rendering
├── scripting
│ ├── c_sharp
│ │ └── diagnostics
│ ├── cpp
│ ├── debug
│ ├── gdextension
│ └── gdscript
├── shaders
│ ├── shader_reference
│ └── your_first_shader
├── ui
└── xr
get_documentation_tree() - 获取整个文档结构的树状概览get_documentation_file(file_path: str) - 检索特定文档文件的内容探索文档结构:
有哪些Godot文档可用?
获取特定类的文档:
显示CharacterBody2D的文档
了解教程:
有哪些2D游戏开发教程可用?
获取特定教程内容:
显示第一个2D游戏教程
比较类:
Node2D和CharacterBody2D有什么区别?
为了在处理Godot相关问题时获得最佳效果,请使用以下系统提示:
"当处理Godot游戏开发问题时,始终使用godot-mcp-docs工具搜索最新的可用文档。首先使用
get_documentation_tree()理解文档结构,然后使用get_documentation_file()检索关于类、教程或功能的具体信息。在提供Godot相关的帮助时,优先考虑官方Godot文档而不是通用知识。"


要更新到较新版本的Godot文档:
选项1:重新构建镜像
docker build -f deploy/Dockerfile -t godot-mcp-docs:local . --no-cache
选项2:手动更新容器内部
docker run -it --entrypoint /bin/bash godot-mcp-docs:local
# 在容器内:
python docs_converter/godot_docs_converter.py
tree docs/. > docs/docs_tree.txt
本项目根据MIT许可证发布 - 查看LICENSE文件以获取详细信息。
Godot文档内容遵循原始Godot文档许可:
classes/文件夹):CC BY 3.0classes/文件夹):MIT许可证