Godot MCP文档服务器
](https://www.docker.com/)   
一个模型上下文协议(MCP)服务器,为AI助手提供对完整Godot引擎文档的访问,通过直接向LLM提供文档来帮助开发人员进行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客户端 (克劳德桌面示例):
{
"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)-检索特定文档文件的内容
示例使用
探索文档结构:
What documentation is available for Godot?获取特定的类文档:
Show me the documentation for CharacterBody2D了解教程:
What tutorials are available for 2D game development?获取具体教程内容:
Show me the first 2D game tutorial比较类:
What's the difference between Node2D and CharacterBody2D?推荐系统提示
为了在使用Godot时获得最佳效果,请使用以下系统提示:
“处理Godot游戏开发问题时,请务必使用Godot-mcp文档工具搜索最新可用文档get_documentation_tree()要理解文档结构,请使用get_documentation_file()检索有关类、教程或功能的特定信息。在提供与Godot相关的帮助时,优先考虑官方Godot文档而不是一般知识。"
截图
Claude桌面中的MCP集成
文档访问示例
更新文档
要更新到较新版本的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
# Inside container:
python docs_converter/godot_docs_converter.py
tree docs/. > docs/docs_tree.txt许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
Godot文档内容遵循原始Godot文档许可:
- 文件内容(不包括
classes/文件夹): CC乘以3.0 - 类参考文件(
classes/文件夹):MIT许可证 - 署名:“胡安·利涅茨基、阿里尔·曼祖尔和戈多社区”
