unity-manual-mcp
Unity Manual MCP
本地 MCP 服务器(stdio),为你的 AI 助手提供本地 Unity 文档安装服务。
文档文件夹通常位于 Unity Editors 安装目录下的 Data\Documentation\en 中。
Manual/— 操作指南文章,按章节组织(约 ~3.5k 页)ScriptReference/— 完整脚本 API 参考,每个类 / 属性 / 方法一页 (约 ~42k 页)
首次启动时,服务器会为每个页面构建 SQLite 全文索引 (采用 Mozilla-Readability 风格提取文章正文,去除样板内容, 保留代码示例),并将其缓存在操作系统临时目录中。 后续启动会复用该索引;如果文档文件数量发生变化,索引会自动重建。
要求
Python 3.10+ — 在
pyproject.toml中声明(fastmcp3.x 要求)。 uv 会复用任何已安装且满足此要求的 Python,并且仅在不存在兼容解释器时下载新的。
设置
克隆仓库
在克隆的仓库中打开终端
运行
uv sync
这会创建 .venv 并从 pyproject.toml 安装依赖。
运行
uv run server.py "C:\Program Files\Unity\Hub\Editor\<ver>\Editor\Data\Documentation\en"如果你指向 ...\Documentation 或
...\Editor\Data,则会自动检测 en 文件夹。
参数:
--selftest— 构建索引并运行示例查询,然后退出(不启动 MCP 服务器;适合验证新安装)--rebuild— 强制重建索引--prune— 从清单中删除过期的缓存条目(db 文件缺失)UNITY_DOCS_PATH环境变量 — 位置参数的替代
ℹ 新安装后手动运行一次服务器,以预先索引文档,避免首次使用时等待
uv run server.py --selftest "C:\Program Files\Unity\Hub\Editor\<ver>\Editor\Data\Documentation\en"
添加 MCP 服务器
这是一个 stdio 服务器,因此任何可以启动本地进程的客户端都可以使用。 每个客户端运行相同的命令:
uv run --directory "<repo>" server.py "<docs path>"其中 <repo> 是此仓库的文件夹,<docs path> 是你的 Unity 文档的
en 文件夹(如果你指向 ...\Documentation 或
...\Editor\Data,则会自动检测)。uv run 会自动创建并同步 .venv
环境,因此客户端只需要在 PATH 中有 uv。
Claude Desktop
claude_desktop_config.json(替换为你自己的路径):
{
"mcpServers": {
"unity-manual": {
"command": "uv",
"args": ["run", "--directory", "<repo>", "server.py", "<docs path>"]
}
}
}Claude Code
claude mcp add unity-manual -- uv run --directory "<repo>" server.py "<docs path>"OpenCode
opencode.json 位于项目中,或全局配置
(~/.config/opencode/opencode.json):
{
"mcp": {
"unity-manual": {
"type": "local",
"command": ["uv", "run", "--directory", "<repo>", "server.py", "<docs path>"],
"enabled": true
}
}
}Codex
codex mcp add unity-manual -- uv run --directory "<repo>" server.py "<docs path>"或者编辑 ~/.codex/config.toml(与 ChatGPT 桌面应用和 IDE 扩展共享;
在受信任的项目中,项目级 .codex/config.toml 也可以使用):
[mcp_servers.unity-manual]
command = "uv"
args = ["run", "--directory", "<repo>", "server.py", "<docs path>"]工具
全部只读(readOnlyHint):
工具 | 用途 |
| 全文搜索(全部 / 手册 / API) |
| 将一页读取为纯文本(路径来自搜索结果) |
| 浏览手册章节,或章节内的页面 |
| 通过 C# 名称查找类 / 成员 API 页面 |
索引缓存
%TEMP%\unity-manual-mcp\ 为每个编辑器保存一个 db 文件(例如 <hash>.db)
外加一个 manifest.json,用于将每个文档路径映射到其 db 文件。切换编辑器
会复用缓存的索引;它通过 HTML 文件数量进行验证。删除 db 文件
(或使用 --rebuild)以强制重建。--selftest 报告 **过时** 条目
(db 文件缺失)和 **孤立** 条目(文档文件夹已删除,但 db 仍然存在);
--prune 删除过时的条目。
致谢
完全由 Qwen 3.8 27b 编写 🙂
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
An MCP server that gives your AI access to the source code and docs of all public github repos
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Noctree/unity-manual-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server