Moho 14动画软件的MCP桥接服务器——通过AI代理控制Moho
概览
一个MCP(模型上下文协议)服务器——使像Claude Desktop和Claude Code这样的AI助手能够读取、写入、动画化并可视化操作MOHO动画项目。 1. — 运行在MOHO内部的文件IPC服务器,通过MOHO的Lua 5.4 API处理读写操作 2.— Node.js进程将MCP协议(stdio)桥接到基于文件的JSON-RPC 3。— 来自Moho手册的键盘快捷键和工具参考数据 需要2+操作时,总是优先batch_execute。10个操作的批次和1个单独通话的时间一样。 将 moho-plugin/contents 复制到 MOHO 的脚本文件夹,或使用提供的安装脚本: 运行install-plugin.bat(或手动复制到 C:\Program Files\Moho 14\Resources\Support\Scripts\Menu) 运行 chmod +x install-plugin.sh & & ./install-plugin.sh(或手动复制到 /Applications/Moho 14/Moho Pro.app/Contents/Resources/Support/Scripts/Menu/) 要复制的文件:- MohoMCP_Server.lua - MohoMCP_Poller.lua - json。
概述(AI 翻译)
一个适用于 Moho Pro 14 的 MCP(模型上下文协议)服务器——使 AI 助手如 Claude Desktop 和 Claude Code 能够读取、写入、动画并可视化操作 MOHO 动画项目。
完全跨平台:Windows和macOS。
建筑
三个组成部分:
- Moho Lua 插件 — 运行于 MOHO 内部的文件 IPC 服务器,通过 MOHO 的 Lua 5.4 API 处理读写操作
- MCP 桥接服务器 — Node.js进程将MCP协议(stdio)桥接到基于文件的JSON-RPC
- 静态知识资源 — 来自 Moho 手册的快捷键和工具参考数据
能力
| 能力 | 描述 |
|---|---|
| 读取 | 查询文档结构、图层、骨骼、动画关键帧、网格数据 |
| 写入 | 设置骨骼/图层变换,创建/删除关键帧,修改插值,重命名图层 |
| 看 | 捕捉渲染后的场景帧或完整的MOHO界面截图 |
| 互动将鼠标点击、拖拽和键盘快捷键发送到MOHO窗口 | |
| ** 了解** | 所有 Moho 14 工具和键盘快捷键的内置参考数据 |
可用工具(26)
只读工具
| 工具 | 描述 |
|---|
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MohoMCP
An MCP (Model Context Protocol) server for Moho Pro 14 — enabling AI assistants like Claude Desktop and Claude Code to read, write, animate, and visually operate MOHO animation projects.
Fully cross-platform: Windows and macOS.
Architecture
┌─────────────────────┐ File-based IPC ┌──────────────────────┐
│ MCP Bridge Server │◄──────────────────► │ Moho Lua Plugin │
│ (TypeScript/Node) │ $TMPDIR/moho-mcp/ │ (runs inside MOHO) │
└────────┬────────────┘ JSON-RPC 2.0 └──────────────────────┘
│ MCP Protocol (stdio)
┌────────▼────────────┐
│ MCP Client/Host │
│ (Claude Desktop, │
│ Claude Code, etc) │
└─────────────────────┘
Three components:
- Moho Lua Plugin — File-based IPC server running inside MOHO, handles read/write operations via MOHO’s Lua 5.4 API
- MCP Bridge Server — Node.js process bridging MCP protocol (stdio) to file-based JSON-RPC
- Static Knowledge Resources — Keyboard shortcuts and tool reference data from the Moho manual
Capabilities
| Capability | Description |
|---|---|
| Read | Query document structure, layers, bones, animation keyframes, mesh data |
| Write | Set bone/layer transforms, create/delete keyframes, change interpolation, rename layers |
| See | Capture rendered scene frames or full MOHO UI screenshots |
| Interact | Send mouse clicks, drags, and keyboard shortcuts to the MOHO window |
| Know | Built-in reference data for all Moho 14 tools and keyboard shortcuts |
Available Tools (26)
Read-Only Tools
| Tool | Description |
|---|---|
document_getInfo |
Document metadata (name, path, dimensions, FPS, frame range) |
document_getLayers |
Full layer tree with hierarchy |
layer_getProperties |
Detailed layer properties (type, visibility, transform) |
layer_getChildren |
Direct children of a group layer |
layer_getBones |
List bones in a bone layer |
bone_getProperties |
Bone details (position, angle, scale, parent) |
animation_getKeyframes |
Keyframes for a channel on a layer |
animation_getFrameState |
Full layer state at a specific frame |
mesh_getPoints |
Point positions in a vector layer |
mesh_getShapes |
Shape data (fill, stroke, curves) |
Write Tools
| Tool | Description |
|---|---|
bone_setTransform |
Set bone angle/position/scale at a frame (creates keyframes) |
bone_selectBone |
Select a bone in the MOHO UI |
animation_setKeyframe |
Set keyframe value (scalar or vec2) on any channel |
animation_deleteKeyframe |
Remove a keyframe at a specific frame |
animation_setInterpolation |
Set easing mode (linear, smooth, ease_in, ease_out, step) |
document_setFrame |
Navigate to a specific frame on the timeline |
layer_setTransform |
Set layer translation/rotation/scale at a frame |
layer_setVisibility |
Show or hide a layer |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"moho-mcp": {
"command": "node",
"args": ["C:/path/to/MohoMCP/bridge/dist/index.js"]
}
}
}