spine-mcp
spine-mcp — Spine 2D 动画 MCP 服务器
从拆分好的角色直接制作可用于生产的 Spine 2D 动画——直接来自 .psd 或 PhotoshopToSpine 导出文件夹。灵感来自 ampersante/spine2d-animation-mcp,但它提供的是可在 spine-pixi / pixi 游戏中运行的真正运行时骨架,以及 可编辑的 .spine 工程(通过获得许可的 Spine 4.3 CLI),并带有手工制作的动作,而不是现成模板。
cut parts (you, in Photoshop) ──▶ rig_and_animate
PSD or PhotoshopToSpine export │
├─▶ <name>.json runtime skeleton (Spine 4.2)
├─▶ <name>.atlas + .png packed atlas
└─▶ <name>.spine EDITABLE project (open in your Spine)
──▶ preview (montage PNG) / wire into the game为什么它比原版更好
ampersante MCP | spine-mcp(本工具) | |
骨架 | 按图层名自动生成 | 骨骼放置在关节点,头/身体层级结构 |
动作 | 预定义模板 | 手工制作的 idle/win/blink/pop、挤压拉伸、换脸 |
图集 | Pillow | 真正的 Spine CLI 打包器 |
输出 | JSON / PNG / GIF 预览 | 可在游戏中运行的运行时骨架 + 可编辑的 |
头部状态 | 绘制为堆叠 | 合并到一个插槽,在 win/blink 中切换 |
Related MCP server: spine-mcp
工具
spine_doctor— 检查 Spine CLI 和 Python 依赖inspect_source— 在装配前列出部件 / 检测到的头部状态族rig_and_animate(source, out_dir, name?, kind?, anims?, make_editable?)— 主要工具pack_atlas(images_dir, out_dir, name)— Spine-CLI 图集打包make_project(runtime_json, out_spine)— 运行时 json → 可编辑的.spineexport_project(project, out_dir, fmt)—.spine→ 运行时 json+atlasproject_info(project_or_json)— 骨骼/插槽/动画preview(rig_dir, images_dir?, out_png?, maxpx?)— 关键帧拼贴 PNGbatch(roster_dir, out_root, kind?, make_editable?)— 为每个导出子文件夹装配骨架
输入约定
头部状态族: 将备用面部命名为
<base>_win/<base>_blink(例如head、head_win、head_blink,或face、face_win、face_blink)。 它们会自动合并到一个插槽,并在win/blink中切换。发光图层 命名为
Layer 2→ 加法混合 + 脉冲。名称包含*fire*的部件 → 闪烁。名称包含*rot*的部件 → 旋转点缀骨骼。在每个部件的关节下方留一个小 重叠片,这样弯曲时不会撕裂。
安装
最简单的方式,是连同那个知道如何使用它的“大脑”一起安装:
/plugin marketplace add egorfedorov/mozg-plugin
/plugin install mozg-spine@mozg或者直接接入——需要 uv:
claude mcp add spine -- uvx --from git+https://github.com/egorfedorov/spine-mcp spine-mcp从代码检出开始,用于自行修改:
uv venv && uv pip install -e .
./.venv/bin/spine-mcp # stdio MCP server你的 Spine 许可证仍归你所有
本项目不包含 Spine 的任何部分,也不授予其任何许可证。Spine 是 Esoteric Software 的商业软件,每个人都在自己的许可证下运行自己的安装。服务器会在 /Applications/Spine.app/Contents/MacOS/Spine 或 SPINE_BIN 指向的位置查找它。
没有许可证也能工作。 装配和动画从不启动 Spine 进程——它们只是基于 Pillow 和 psd-tools 的纯 Python 代码。许可证会额外提供三个工具:
需要 Spine | |
| 否 |
| 否 |
| 是 |
| 是 |
| 是 |
spine_doctor 会报告它找到的内容。一个人的许可证永远不会传到另一个人那里,也不会因为别人有不同许可证而导致任何功能降级。
它假设的命名约定
_classify 根据一个针对某工作室美术调优的单词列表来判断什么是头部——head, face, golova, crown, tooth。名为 kopf 或 cabeza 的图层会被归入身体。与其重命名你的美术资源,不如覆盖它:
export SPINE_HEAD_WORDS="kopf,gesicht,krone"文件
server.py— FastMCP 服务器(工具层)spine_rig.py— 装配 + 动画构建器(纯 Python,可导入,可独立运行)spine_cli.py— Spine 4.3 CLI 封装(打包 / 导入 / 导出 / 信息)spine_preview.py— 关键帧拼贴渲染器
许可证
MIT — 参见 LICENSE。为 mozg 的 Spine 2D Animation brain 编写并被其使用,后者是知道骨架应该如何移动的那一半。
Available Tools
9 toolsbatchB
Rig every PhotoshopToSpine export subfolder under roster_dir into out_root//. Returns per-character summaries.
Inputs: out_root (required), roster_dir (required), kind, make_editable.
export_projectB
Export a .spine project to runtime files (fmt: json|binary, +pack for atlas).
Inputs: out_dir (required), project (required), fmt.
inspect_sourceA
List the parts and detected head-state families of a .psd or a PhotoshopToSpine export folder, WITHOUT building anything. Use this first to confirm what will be rigged.
Inputs: source (required).
make_projectB
Import a runtime skeleton json into an EDITABLE .spine project.
Inputs: out_spine (required), runtime_json (required).
pack_atlasB
Pack a folder of PNGs into .atlas + .png with the Spine packer.
Inputs: name (required), out_dir (required), images_dir (required).
previewB
Render a keyframe-montage PNG of a built rig (idle/win/blink/pop poses).
rig_dir folder holding .json (the out_dir from rig_and_animate) images_dir folder with the part PNGs (defaults to the source export images) out_png output path (defaults to <rig_dir>/_preview.png)
Inputs: rig_dir (required), maxpx, out_png, images_dir.
project_infoB
Print bones/slots/animations of a .spine project or skeleton .json.
Inputs: project_or_json (required). Returns: result
rig_and_animateA
Build a rigged + animated Spine skeleton from a cut-up character.
source path to a .psd OR a PhotoshopToSpine export folder out_dir where to write .json/.atlas/.png (e.g. a game's static/assets/spine//) name skeleton name (defaults to the source basename) kind "symbol" or "mascot" (reserved; both rig the same body+head now) anims subset of ["idle","win","blink","pop"] (default all applicable) make_editable also emit an editable .spine next to the source (Spine CLI)
Returns a summary incl. file paths and an editable-project path.
Inputs: source (required), out_dir (required), kind, name, +2 more.
spine_doctorA
Report whether the Spine CLI and Python deps are available.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct action: packing, project creation, export, info, preview, batch, environment check, source inspection, and rigging. No two tools overlap in purpose.
Tool names mix conventions: some verb_noun (pack_atlas, make_project), some nouns (project_info, spine_doctor), and single verbs (preview, batch). This inconsistency makes the set less predictable, though still readable.
9 tools is well-scoped for a Spine workflow server, covering creation, conversion, inspection, preview, and batch operations without bloat.
The server covers the full lifecycle from source inspection and rigging to atlas packing, project conversion, info, preview, and batch processing. No obvious missing operations for the stated purpose.
Related MCP Connectors
Remote MCP server with 23 tools to generate and reuse 2D game sprites, animations, maps, and audio.
An MCP server that provides asset auto generator
Generate authentic pixel art - sprites, animations, and tilesets - from any MCP client
Game-dev sprite tools: PNG/GIF to spritesheet, split, trim, animate. OAuth-authenticated MCP server.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for Spline.design code generation and asset management.5BSD 3-Clause
- AlicenseAqualityDmaintenanceLocal MCP server for automating Spine projects via the official CLI, enabling AI tools to inspect, export, import, and add animations to .spine files.1625Apache 2.0
- AlicenseAqualityDmaintenanceAn MCP server that converts layered PSD characters into Spine 4.2 rigs with deterministic, parametric 2D/2.5D animations (idle, walk, run, jump, attack, hit) ready for the Spine editor and Unity.45MIT
- FlicenseBqualityCmaintenanceMCP server for reading, validating, and modifying Spine 4.1.24 JSON animation files, with tools for animation timeline editing, validation, preview, and agent integration.36-