Cubism External Edit MCP
This MCP server enables AI agents to control Live2D Cubism Editor 5.4 Alpha via natural language, offering:
Connection & Authorization: Check status and permissions (Allow for read/write, Edit for editing) with automatic reconnection and persistent tokens.
Document & Model Access: Retrieve current model UID, list open documents (Modeling, Physics, Animation), get document details, and query the active editing mode.
Parameter Management: Read/write/clear parameter values; fetch parameter metadata (type, range, groups) and group structures; set values instantly without transactions.
Model Structure Queries: Explore full hierarchical trees of parameters, parts (ArtMesh, WarpDeformer, RotationDeformer, Part, Glue, etc.), and deformers; get individual object details, list selected objects, and identify keyframe bindings.
Editing Operations (auto-wrapped in transactions): Add, edit, or delete parameters, groups, parts, deformers, art meshes, glues, and keyframes; move objects on the palette; adjust hierarchies; control editor selection programmatically.
Batch Editing: Execute multiple edit actions in a single atomic transaction with automatic rollback on failure, ensuring safe, cohesive changes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cubism External Edit MCP Show me the parameter structure of the model"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cubism External Edit MCP
将 Live2D Cubism Editor 的外部应用集成 API 封装为 MCP (Model Context Protocol) 工具,让 AI Agent 通过自然语言操控 Cubism Editor 进行建模操作。
架构
graph TD
AI["AI Agent"]
MCP["cubism_mcp.py<br/>MCP Server, 42 Tools"]
Editor["Cubism Editor 5.4 Alpha<br/>外部应用集成 API"]
AI -->|"stdio (MCP Protocol)"| MCP
MCP -->|"WebSocket (ws://localhost:22033)"| EditorRelated MCP server: live2d-to-agent
功能特性
读写操作 — 读取/写入模型参数值、查看文档列表、获取编辑模式(适用 Editor 4.x+)
完整模型查询 — 参数结构、部件结构、变形器结构、单个对象详情(需 5.4 Alpha)
编辑操作 — 增删改查参数/部件/变形器/ArtMesh/Glue,自动事务包裹(需 5.4 Alpha)
批量编辑 — 同一事务内执行多个操作,任一失败自动回滚
权限分级 — 读写需 Allow 授权,编辑需 Edit 授权
自动重连 — Editor 重启后自动重连,3 秒间隔
Token 持久化 — 认证令牌缓存到
~/.cubism-mcp/token.txt,避免重复授权
环境要求
组件 | 版本 |
Python | ≥ 3.10 |
Cubism Editor | 5.4 Alpha(有效期至 2026-09-14) |
操作系统 | Windows / macOS |
使用流程
快速开始
复制以下提示词发给你的 AI Agent:
根据 https://github.com/nana7chi/CubismExternalEditMCP/blob/master/README.md 完成 cubism-mcp 的安装和配置。如果电脑上还没有
uv,请先帮我安装。配置完成后告诉我是否就绪。
第一步:安装 uv(仅一次)
uv 是一个极小的 Python 包管理器,用于自动安装和运行本 MCP。安装后无需再管 Python 环境。
macOS(终端粘贴运行):
curl -LsSf https://astral.sh/uv/install.sh | shWindows(PowerShell 粘贴运行):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"安装完成后重启终端,输入 uv --version 能看到版本号即成功。
第二步:在 AI Agent 中配置 MCP
支持
ClaudeCode,Codex,Workbuddy等各种支持MCP的客户端
第一次启动会自动下载依赖包,耗时约 1–2 分钟,之后秒启。
方式一:PyPI 安装(推荐)
{
"mcpServers": {
"cubism-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["cubism-mcp"],
"description": "Cubism Editor MCP",
"env": { "NO_PROXY": "localhost,127.0.0.1" }
}
}
}国内镜像源配置
如果 PyPI 官方源下载慢,可使用国内镜像(清华/阿里云/腾讯云等均可用):
{
"mcpServers": {
"cubism-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["--index-url", "https://pypi.tuna.tsinghua.edu.cn/simple", "cubism-mcp"],
"description": "Cubism Editor MCP",
"env": { "NO_PROXY": "localhost,127.0.0.1" }
}
}
}也可替换为阿里云
https://mirrors.aliyun.com/pypi/simple或腾讯云https://mirrors.cloud.tencent.com/pypi/simple。
方式二:uvx 在线运行(GitHub 源)
{
"mcpServers": {
"cubism-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "git+https://github.com/nana7chi/CubismExternalEditMCP.git", "cubism-mcp"],
"description": "Cubism Editor MCP",
"env": { "NO_PROXY": "localhost,127.0.0.1" }
}
}
}方式三:本地克隆运行
克隆源码到本地(或下载ZIP并解压)
git clone https://github.com/nana7chi/CubismExternalEditMCP.git添加以下MCP配置(修改
cwd为实际路径):
{
"mcpServers": {
"cubism-mcp": {
"type": "stdio",
"command": "python",
"args": ["cubism_mcp.py"],
"cwd": "J:/修改为实际路径/CubismExternalEditMCP",
"description": "Cubism Editor MCP",
"env": { "NO_PROXY": "localhost,127.0.0.1" }
}
}
}第三步:在 Cubism Editor 中开启外部集成
启动 Cubism Editor 5.4 Alpha,打开一个模型
菜单「文件」→「外部应用程序集成的设置」
确认端口为
22033,打开「使用」开关弹出授权对话框,找到
cubism-mcp,勾选 Allow 和 Edit,点 OK
如果没看到弹窗,检查 Editor 右下角是否有闪烁的外部应用图标,点击即可打开对话框。

第四步:开始使用
在 AI Agent 中用自然语言操控 Editor,例如:
"列出当前模型的参数结构"
"查看部件层级"
"把眉毛部件的标签色改成蓝色"
"新建参数 ParamsTest,ID 为 ParamTest,范围 0-1,默认 0.5"
"批量添加 3 个关键帧到 ParamAngleX"注意:每次重启 Cubism Editor 后,都需要重新开启「外部应用集成」开关并勾选 Allow + Edit 权限。
可用工具
诊断
工具 | 说明 |
| 检查连接状态、注册状态、Allow/Edit 授权 |
读写操作
工具 | 参数 | 说明 |
| — | 获取当前打开模型的 UID |
| — | 列出所有打开的文档(建模/物理/动画) |
|
| 按 UID 获取单个文档详情 |
| — | 获取编辑模式(Physics/Modeling/Animation/…) |
|
| 读取模型参数当前值 |
|
| 写入参数值(无需编辑事务) |
|
| 清除 SetParameterValues 的临时缓存 |
|
| 参数元信息(名称/范围/Keyform/类型) |
|
| 参数组列表 |
查询结构(5.4 Alpha 新增)
工具 | 参数 | 说明 |
|
| 参数完整结构树(组+参数层级) |
|
| 部件结构树(ArtMesh/Deformer/Part/Glue) |
|
| 变形器结构树 |
|
| 获取指定对象详情 |
|
| 获取当前选中的对象列表 |
|
| 获取对象的关键帧绑定关系 |
|
| 按参数关键帧反查关联对象 |
编辑操作(5.4 Alpha 新增)
每个编辑 Action 均有独立 Tool(带完整类型签名和参数校验),同时保留 cubism_edit / cubism_edit_batch 用于批量操作。
参数编辑
Tool | Action | 说明 |
| AddParameter | 添加参数 |
| EditParameter | 编辑参数属性 |
| DeleteParameter | 删除参数 |
| AddParameterGroup | 添加参数组 |
| EditParameterGroup | 编辑参数组属性 |
| DeleteParameterGroup | 删除参数组 |
| MoveParameter | 移动参数到指定组 |
| MoveParameterGroup | 调整参数组顺序 |
关键帧编辑
Tool | Action | 说明 |
| AddParameterKey | 添加关键帧 |
| DeleteParameterKey | 删除关键帧 |
| MoveParameterKey | 移动关键帧位置 |
部件编辑
Tool | Action | 说明 |
| AddPart | 添加部件 |
| EditPart | 编辑部件属性 |
| EditArtMesh | 编辑 ArtMesh 属性 |
| EditGlue | 编辑 Glue 属性 |
| DeleteObject | 删除对象 |
| MoveObjectOnPartsPalette | 移动对象在部件面板的位置 |
变形器编辑
Tool | Action | 说明 |
| AddWarpDeformer | 添加弯曲变形器 |
| AddRotationDeformer | 添加旋转变形器 |
| EditWarpDeformer | 编辑弯曲变形器属性 |
| EditRotationDeformer | 编辑旋转变形器属性 |
选择操作
Tool | 说明 |
| 编程式选中对象 |
| 清除所有选中 |
通用
Tool | 参数 | 说明 |
|
| 通用编辑入口(向后兼容) |
|
| 批量编辑(单事务,失败回滚) |
常见问题
症状 | 原因 | 解决 |
MCP 状态红色 | Python 路径/依赖/ | 检查 Python 版本 ≥ 3.10,确认依赖安装、 |
未连接到 Editor | Editor 未启动或外部集成未开启 | 启动 Editor → 加载模型 → 文件菜单开启外部集成 |
未授权 | 弹窗未勾选 Allow | 在外部集成对话框中勾选 Allow |
编辑报错 | 弹窗未勾选 Edit | 在外部集成对话框中勾选 Edit |
重启后失效 | Editor 重启需重新授权 | 重新开启外部集成并勾选权限 |
操作报错 | 参数/ID 不正确 | 先用 |
开发
# 直接运行测试
python cubism_mcp.py
# 依赖
pip install -r requirements.txt依赖
包 | 用途 |
| MCP 服务端框架(FastMCP + stdio 通信) |
| WebSocket 客户端,连接 Editor API |
注意事项
Alpha 版本限制:Cubism Editor 5.4 Alpha 有效期至 2026-09-14,到期后需升级
重启授权:每次重启 Editor 都需要重新开启外部应用集成并勾选权限
单模型:MCP 服务同时只能操作一个打开的模型
事务安全:编辑操作自动包裹
EditBegin/EditEnd,批量操作失败自动Cancel回滚
License
MIT
Available Tools
17 toolscubism_clear_parameter_valuesC
清除发送到模型的临时参数值缓存。与 SetParameterValues 配套使用, 可显式将模型恢复到参数写入前的状态。
Args: model_uid: 模型 UID
Inputs: model_uid (required). Returns: result
cubism_editA
执行编辑操作。会自动处理 EditBegin/EditEnd。
Args: action: 编辑 API 名称,如 AddParameter / EditPart / AddWarpDeformer params: 编辑 API 的参数对象(无需 ModelUID,自动填充)
Inputs: action (required), params (required). Returns: result
cubism_edit_batchA
批量执行多个编辑操作,在同一个 EditBegin/EditEnd 事务内完成。
Args: actions: [{action, params}] 数组,action 是编辑 API 名称,params 是该 API 的参数对象
Inputs: actions (required). Returns: result
cubism_get_current_edit_modeA
获取 Editor 当前的编辑模式。
返回值: Physics/Modeling/Animation/ModelingMeshEdit/FormAnimation
Inputs: no named parameters. Returns: result
cubism_get_deformer_structureC
获取模型的变形器结构树
Args: model_uid: 模型 UID
Inputs: model_uid (required). Returns: result
cubism_get_documentB
通过 DocumentUID 获取单个文档的详细信息。
Args: document_uid: 文档 UID(可通过 cubism_get_documents 获取)
Inputs: document_uid (required). Returns: result
cubism_get_documentsA
列出 Editor 中当前打开的所有文档(工作区)。 按类型分为 PhysicsDocuments(物理模拟)、ModelingDocuments(模型编辑)、 AnimationDocuments(动画编辑),每种各为一个数组,无对应类型时为空数组。
无需 model_uid 参数,返回的是 Editor 全局打开的文档列表。
Inputs: no named parameters. Returns: result
cubism_get_model_uidA
获取当前在 Cubism Editor 中打开的模型 UID
Inputs: no named parameters. Returns: result
cubism_get_objectB
获取指定对象的信息(按 Type 返回不同数据结构:ArtMesh/Part/WarpDeformer/RotationDeformer/Glue)
Args: model_uid: 模型 UID id: 对象 ID
Inputs: id (required), model_uid (required). Returns: result
cubism_get_parameter_groupsB
获取模型的参数组列表(组 UID 和组名称)。
Args: model_uid: 模型 UID
Inputs: model_uid (required). Returns: result
cubism_get_parametersA
获取模型参数的详细元信息(类型、范围、默认值、关键点、融合变形、循环等)。
比 cubism_get_parameter_values 多返回参数名称、类型、范围、GroupUID 等结构信息。
Args: model_uid: 模型 UID
Inputs: model_uid (required). Returns: result
cubism_get_parameter_structureA
获取模型的完整参数结构树(参数组 + 参数,含 Min/Default/Max/KeyValues)
Args: model_uid: 模型 UID(可通过 cubism_get_model_uid 获取)
Inputs: model_uid (required). Returns: result
cubism_get_parameter_valuesA
获取模型当前的参数值。不指定 ids 则返回全部参数。
这是轻量级读取操作,无需 EditBegin/EditEnd 事务。
Args: model_uid: 模型 UID(可通过 cubism_get_model_uid 获取) ids: 可选,要查询的参数 ID 列表。省略则返回所有参数
Inputs: model_uid (required), ids. Returns: result
cubism_get_part_structureB
获取模型的部件结构树(含 ArtMesh/WarpDeformer/RotationDeformer/Part/ArtPath/Glue 类型)
Args: model_uid: 模型 UID
Inputs: model_uid (required). Returns: result
cubism_get_selectedB
获取当前在 Editor 中选中的对象 ID 列表
Args: model_uid: 模型 UID
Inputs: model_uid (required). Returns: result
cubism_set_parameter_valuesA
设置模型的参数值。轻量级写入,无需 EditBegin/EditEnd 事务。
参数通过临时缓冲区生效,物理编辑器/动画模型中可能有延迟。 使用 ClearParameterValues 可显式清除临时缓存。
Args: model_uid: 模型 UID parameters: [{Id: 参数ID, Value: 数值}] 数组,例如 [{"Id":"ParamAngleX","Value":0.5}]
Inputs: model_uid (required), parameters (required). Returns: result
cubism_statusA
检查与 Cubism Editor 的连接及授权状态。未连接或未授权时会返回具体指引。
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool targets a distinct aspect of Cubism Editor interaction, from connection status to model structure, parameter manipulation, editing actions, and selection. There is no overlap; even similar tools like get_parameter_values and get_parameters differ in depth of information.
All tools follow a consistent 'cubism_<verb>_<noun>' pattern using snake_case, such as cubism_get_model_uid, cubism_set_parameter_values, and cubism_edit_batch. This makes the tool set predictable and easy to navigate.
With 17 tools, the set is slightly above the typical well-scoped range (3-15), but each tool addresses a specific need in Cubism model editing, and the count is justified by the complexity of the domain.
The tool set covers all essential operations for external editing: status, document management, parameter get/set/clear, parameter metadata, model structure (parts, deformers, objects), editing (single and batch), and selection. No obvious gaps remain for the stated purpose.
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Lets your AI build and edit websites and apps in Xodia, an AI builder and visual editor for real code (Vite, React, Tailwind CSS or plain HTML in your own git repo): read and write site files, create pages and CMS collections, make database tables and visitor sign-in on the built-in Xodia database or your own Supabase, write server tasks, run typecheck, design, link and security checks, take screenshots, manage forms and translations, and pick up change requests the user sends from the visual editor. 67 tools. Sign in once with your Xodia account (OAuth). Free plan, no card needed. Setup: https://xodia.ai/ai/mcp
AI video, image and audio generation with 140+ AI models from any MCP agent
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to directly control the Cocos Creator 3.8.x editor via MCP protocol, providing over 130 tools for scene, node, component, asset, and project operations.45-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a Live2D desktop pet's expressions and actions via MCP protocol.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to control Blockbench projects via MCP, allowing them to create and delete cubes and inspect model structure. Provides tools for project info, element listing, and cube manipulation.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to inspect and operate the Cocos Creator project currently open, including scenes, nodes, assets, animations, and editor workflows via MCP.MIT