MakeHuman AI 捏人 MCP
Drives an FBX→Blender→GLB export pipeline through mh_export, with options for white/nude model output and automatic removal/restoration of hair and clothing during export.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MakeHuman AI 捏人 MCP
让 Claude Code 通过 MCP 直接操控 MakeHuman Community 1.3.0:捏脸/改体型、换发型服装皮肤姿势、控制相机、截图回传给 AI 看、存取 .mhm、走 FBX→Blender→GLB 导出管线、加载插件、以及 run_python 逃生舱。
架构
Claude Code ──stdio(uv + mcp SDK)──> makehuman_mcp 服务器(本项目)
│ NDJSON over TCP 127.0.0.1:12346
v
插件 9_ai_mcp(MakeHuman 安装目录 plugins\,py3.7 纯标准库)
│ mh.callAsyncThread → Qt 主线程执行,Event 同步等结果
v
MakeHuman 主线程(human / modelCamera / grabScreen / 导出)插件源码(本仓库内):
plugin/9_ai_mcp/(__init__.py配置与启停、server.pyTCP 线程、ops.py全部 op、state.py共享状态)配置:
<用户目录>\Documents\makehuman\v1py3\ai_mcp.cfg(首次运行自动生成),键:enabled / host / port / max_width / blender / converter / glb_out_root日志:
makehuman.log搜关键字ai_mcp离线单测:
plugin/offline_test.py(桩 MakeHuman 模块 + 真实 TCP 往返,30 项)
Related MCP server: Blender Open MCP
安装
把
plugin/9_ai_mcp/整目录复制到 MakeHuman 安装目录的plugins\下 (Windows 默认:C:\Program Files\makehuman-community\makehuman\plugins\)在 MCP 客户端(如 Claude Code)注册本服务器:
{
"mcpServers": {
"makehuman": {
"command": "uv",
"args": ["--directory", "<本项目路径>", "run", "makehuman-mcp"]
}
}
}导出的 GLB 落在
<用户目录>\Documents\makehuman\v1py3\exports\<角色名>\下,可用ai_mcp.cfg的glb_out_root改改动插件后:改
plugin/9_ai_mcp/→ 整目录复制到部署路径 → 重启 MakeHuman插件语法门禁:必须 py3.7 能编译(禁 walrus 等 3.8+ 语法),
python -m py_compile <文件>验证
工具清单(23 个)
状态:mh_status mh_start_makehuman(DETACHED 拉起 MakeHuman 并等桥就绪)
捏脸:mh_list_modifier_groups mh_list_modifiers(group/search/limit) mh_get_modifier mh_set_modifiers(values 批量,一次 applyAllTargets) mh_set_macro mh_reset_modifiers mh_symmetry
相机:mh_camera(preset: front/back/left/right/top/bottom/face/reset,可叠加 zoom 等) mh_get_camera
截图:mh_screenshot(返回图片给 AI 直接看;square=true 人像特写)
资产:mh_list_assets mh_wear_asset mh_remove_asset mh_get_outfit(type: hair/clothes/eyes/eyebrows/eyelashes/teeth/tongue/skin/pose)
模型:mh_save_model mh_load_model mh_list_models
导出:mh_export(format: glb 走 Blender 管线约 30-60s / fbx / obj;glb 的 nc=true 额外出白膜,自动卸发脱衣导完穿回)
插件:mh_list_plugins mh_load_plugin
逃生舱:mh_run_python(主线程执行,预注入 G/app/human/mh/gui3d/os/json/importlib/getpath)
取值域速记
宏 modifier 0..1:Age 0=1岁 / 0.5=25岁 / 1=90岁;Gender 0=女 1=男;Height/Weight/Muscle/Caucasian/African/Asian 均 0..1
双侧滑条 -1..1(名字含
-decr|incr,负减小正增大);其余单侧滑条 0..1modifier 全名 =
组名/名(如head/head-age-decr|incr),组名首段见mh_list_modifier_groups相机:inclination 俯仰度(0 平视/90 顶视)、rotation 水平度(0 正面/180 背面)、zoom 0.25..15(1=全身)
face 预设用眼球代理几何当锚点(proxy 模型也稳),不再依赖 basemesh 顶点号
对 MakeHuman 本体的一个修复(重要)
<MakeHuman 安装目录>\makehuman\lib\glmodule.py 的 drawBegin() 需要打一个 3 行补丁
(打补丁前备份原文件,升级/重装 MakeHuman 后需重打):
根因:1.3.0 alpha 把 3D 视口从 QGLWidget 换成了 QOpenGLWidget(qtui.py class Canvas(QtWidgets.QOpenGLWidget))。Qt 的 2D 绘制引擎与 3D 共享 GL 上下文,合成控件树后会把 GL_DEPTH_TEST/深度写入关掉;而 MH 只在 OnInit() 里开一次深度状态 → 从第二帧起整个 3D 场景在没有深度测试的情况下绘制,渲染优先级高的眼球/牙齿/舌头/头发(prio 5~50)全部盖到人体(prio 0)之上——表现为"眼珠牙舌透脸渲染""头发糊在脸上"(发丝实际在脸平面之后)。
补丁(drawBegin 每帧清屏后恢复状态):
glEnable(GL_DEPTH_TEST)
glDepthMask(GL_TRUE)补丁原理与取证过程见仓库 docs/ 与会话记录;重启 MakeHuman 后生效,几何数据(眼球/牙/舌位置)本来就正确,无需动任何模型。
排障
症状 | 处理 |
工具报"无法连接 MakeHuman AI 服务" | MH 未启动或插件没装:调 |
| 改 |
截图报"窗口已最小化" | 恢复 MakeHuman 窗口(QOpenGLWidget 最小化时 GL 不可用) |
修改不进撤销栈 | AI 的 modifier 直改不走 Ctrl+Z;需要回退就重载 .mhm 或 reset_modifiers |
重装/升级 MakeHuman 后透脸 bug 复发 | 重打上面的 drawBegin 补丁 |
开发
cd <本项目路径>
uv run pytest tests/ -q # MCP 客户端协议单测(8 项)
uv run python plugin/offline_test.py # 插件离线单测(30 项,需内嵌 py3.7)
uv run python e2e_check.py # 端到端(需 MakeHuman 在跑)Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate 3D models, worlds, PBR materials, and coordinated asset packs from AI agents.
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Build editable 3D scenes, direct characters and cameras, and export AI video references with MCP.
Generate and edit images, video, voice, lip-sync and 3D models from your AI agent.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables AI agents to control Blender through 150+ tools across 24 modules, including modeling, materials, lighting, animation, rendering, mesh quality analysis, and visual feedback, plus expert prompts and goal-first workflow management.2094MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to control a live Blender session, manage scenes, objects, materials, and renders, download PolyHaven assets, and switch between multiple LLM backends at runtime.-
- AlicenseAqualityBmaintenanceEnables AI agents to model, texture, animate, inspect, and export game assets directly in Blender, with rendered previews and glTF read-back for Godot and three.js.4048 PyPIApache 2.0
- AlicenseAqualityBmaintenanceEnables AI assistants to create, modify, and delete 3D objects, apply materials, run Blender Python code, and pull in generated assets and models through a two-way socket connection to Blender. It also provides renders and multi-angle, wireframe, and X-ray views so the AI can verify its own work.10MIT