Godot文档服务器

一个为AI助手提供完整Godot引擎文档访问的服务器,帮助开发者通过LLM直接获取Godot开发文档。

作者 By Nihilantropy
本地部署 Godot引擎 文档服务
GitHub

Godot MCP文档服务器

一个模型上下文协议(MCP)服务器,为AI助手提供对完整Godot引擎文档的访问,通过直接向LLM提供文档来帮助开发人员进行Godot开发。

目的

此服务器弥合了AI助手和Godot文档之间的差距,使开发人员能够在不离开AI聊天界面的情况下获得有关Godot类、教程和功能的即时、准确的答案。

部署

  1. 克隆存储库:

BASH``` 1 2git clone https://github.com/Nihilantropy/godot-mcp-docs.git cd godot-mcp-docs

2. **构建Docker镜像:**


BASH```
1docker build -f deploy/Dockerfile -t godot-mcp-docs:local .
  1. 配置您的MCP客户端 (克劳德桌面示例):

JSON``` 1 2 3 4 5 6 7 8 9 10 11 12 13{ “mcpServers”: { “godot-mcp-docs”: { “command”: “docker”, “args”: [ “run”, “—rm”, “-i”, “godot-mcp-docs:local” ] } } }



## 文档结构


服务器提供对完整的官方Godot文档的访问,其结构如下:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69docs/ ├── _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)` -检索特定文档文件的内容


## 示例使用


**探索文档结构:**

1What documentation is available for Godot?


**获取特定的类文档:**

1Show me the documentation for CharacterBody2D


**了解教程:**

1What tutorials are available for 2D game development?


**获取具体教程内容:**

1Show me the first 2D game tutorial


**比较类:**

1What’s the difference between Node2D and CharacterBody2D?


## 推荐系统提示


为了在使用Godot时获得最佳效果,请使用以下系统提示:


> “处理Godot游戏开发问题时,请务必使用Godot-mcp文档工具搜索最新可用文档 `get_documentation_tree()` 要理解文档结构,请使用 `get_documentation_file()` 检索有关类、教程或功能的特定信息。在提供与Godot相关的帮助时,优先考虑官方Godot文档而不是一般知识。"


## 截图


### Claude桌面中的MCP集成





### 文档访问示例





## 更新文档


要更新到较新版本的Godot文档,请执行以下操作:


**选项1:重建映像**


BASH```
1docker build -f deploy/Dockerfile -t godot-mcp-docs:local . --no-cache

选项2:在容器内手动更新

BASH``` 1 2 3 4docker 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](https://creativecommons.org/licenses/by/3.0/)
- 类参考文件(`classes/` 文件夹):MIT许可证
- 署名:“胡安·利涅茨基、阿里尔·曼祖尔和戈多社区”