Skip to main content
Glama

Spine MCP

面向 Spine 4.3 的本地动画工具,让 AI 检查骨骼和约束、生成简单动作草稿、逐轨道调整关键帧、预览结果,再由动画师在 Spine 编辑器中继续修正。

安装与接入

需要 Node.js 22 或更高版本,以及已授权的 Spine 4.3 Professional。仅读取导出的 JSON 可以不安装 Spine;工程导入、导出与原生渲染需要本机 CLI。

Set-Location F:\spine-mcp
npm ci
npm run build

在支持 stdio MCP 的客户端中添加以下配置,将路径替换为自己的安装位置:

{
  "mcpServers": {
    "spine": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": ["F:\\spine-mcp\\dist\\index.js"],
      "env": {
        "SPINE_BIN": "C:\\Program Files\\Spine\\Spine.com",
        "SPINE_VERSION": "4.3.26"
      }
    }
  }
}

启动后先让 AI 调用 spine_doctor 检查安装,再提供工程的绝对路径。MCP 进程通过标准输入输出通信;直接运行 npm start 后会等待客户端请求。

默认加载动画制作所需的 15 个工具,减少工具定义占用的上下文。需要完整的素材、绑定、媒体、QA 和 Unity 功能时,在客户端配置的 env 中添加 "SPINE_MCP_TOOLSET": "all",并重启 MCP。全部模式提供 39 个工具。

若主要使用 AI 编写关键帧,可设置 "SPINE_MCP_TOOLSET": "core",仅加载检查、预览、增改动画和备份所需的 11 个工具;此模式不加载生成器与动画派生的大参数定义。

单次文本结果超过 8000 字符时会返回摘要、完整报告文件和可分页读取的 MCP resource 链接。按需读取报告页即可;图片预览不受文本预算限制。

Related MCP server: Spine MCP Server

可以做什么

  • 读取与检查:骨骼、slot、约束、皮肤、动画轨道、循环、运行时表现和资源预算。

  • 制作动作草稿:呼吸、眨眼、摇摆、注视、跟随、走跑、口型,以及基于姿势的动作。

  • 局部修改:复制动画,新增、覆盖、替换或删除轨道关键帧,设置缓动曲线;支持骨骼、slot、约束、事件、绘制顺序和附件形变。

  • 调整已有动作:改变速度和幅度、镜像、重复、错开时间、清理关键帧、烘焙物理和跨骨架转移动画。

  • 预览与交付:Spine 原生渲染、联系表、运动轨迹、评审视频,以及运行时资源导出。

  • 接入美术与游戏工程:导入分层素材、建立初始绑定、更新图片,并检查或导入 Unity 资源。

推荐使用流程

  1. 提供 .spine 工程路径,让 AI 检查骨架、约束和现有动画。

  2. 描述动作目标、时长、幅度和循环要求,先生成新名字的草稿。

  3. 用局部关键帧编辑调整转折和停顿,再渲染预览。

  4. 在 Spine 中导入新动画,调整曲线、姿势和附件形变。

  5. 检查循环与混合后,导出给游戏使用。

可以直接这样说:

读取 F:\spine-mcp\DFY\DFY.spine,检查骨架和 IK。基于 idle 做一个轻微低头发呆的草稿,使用新动画名,先 dry-run,再预览和写入。

动画写入工具默认 apply: false。加上 apply: true 后会建立备份,通过官方 CLI 仅导入目标动画,再回读核对。编辑器打开时默认写入 staging 副本;根据返回路径打开副本或执行 Import Project,才能在编辑器中看到结果。

文档

文档

用途

使用指南

检查工程、生成草稿、编辑关键帧、预览和人工接手

工具参考

39 个工具的用途、路径格式、参数与环境变量

参数参考

MCP 工具的完整参数定义

上游来源

核心工程工作流来自 Berkan Işık 的 berkanisk/spine-mcp。

Available Tools

15 tools
spine_add_animationAdd animation to projectA
Destructive

Adds one Spine 4.3 JSON animation to a .spine project. Dry-run validates against the skeleton; apply backs up, imports only this animation through the CLI, re-exports, verifies and rolls back on any mismatch. Existing names need replace; prefer a new name. Times in seconds; rotate uses value; bezier curve is absolute [cx1,cy1,cx2,cy2] per channel.

Inputs: name (required), project (required), animation (required), apply, +6 more.

spine_derive_animationDerive animation variantA
Destructive

Builds a new animation from an existing one with ops applied in order on the server, then adds it like spine_add_animation (validated, backed up, verified; dry-run unless apply). Ops: docs/USAGE.md#derive-operations.

Inputs: ops (required), name (required), source (required), project (required), +7 more.

spine_doctorCheck Spine setupA
Read-only

Checks the Spine CLI, editor version and license, spine-core version and work folder. Run first when something fails.

Inputs: no named parameters.

spine_edit_animationCopy and edit animation keyframesA
Destructive

Copies source to name, edits timelines in order, then uses backed-up CLI import and readback verification. Dry-run by default. edits:[] duplicates. path is JSON segments, e.g. ['bones','head','rotate']; times are seconds. set replaces whole keys at matching times. easing is normalized; raw key.curve is absolute Spine 4.3. See docs/USAGE.md#keyframe-editing.

Inputs: name (required), edits (required), source (required), project (required), +7 more.

spine_editor_statusSpine editor status and import checkC
Read-only

Is a Spine editor window open (and likely on this project)? While it is, writes go to a verified staging copy. With project: what still waits in the staging copy; animations confirms each one after Import Project and a save.

Inputs: staged, project, skeleton, animations.

spine_export_jsonExport project to JSONA
Read-only

Exports a .spine project's skeletons to JSON in the cache folder (never next to the project); re-exports only when the project changed.

Inputs: project (required), refresh.

spine_generate_animationGenerate animation from the rigA
Destructive

Generate a named animation draft. Fill the object matching type; missing controls return suggestions. Dry-run by default; apply uses verified CLI animation import and backup. Types include breathe, blink, gaze, lookAt, sway, settle, followThrough, walk, blocking, turn, squash, lipSync. Seconds/degrees/skeleton units. See docs/USAGE.md#generate-options.

Inputs: type (required), project (required), gaze, name, +17 more.

spine_inspectInspect skeletonB
Read-only

Skeleton structure. view summary (default): counts, bone tree, constraints, per-animation stats; bones|slots|skins|constraints: raw section JSON; animation: every timeline with exact keys.

Inputs: input (required), kind, view, limit, +7 more.

spine_list_backupsList project backupsA
Read-only

Backups made before writes (newest first), ids for spine_restore_backup.

Inputs: project (required).

spine_measureMeasure animation motionB
Read-only

Samples an animation in spine-core (constraints, physics warmed up); per bone: rotation range, path, peak speeds, pops, holds, loop seam. rootMotion: what SkeletonRootMotion reads (travel, sliding feet, in-place speed). parts: how far each slot travels.

Inputs: input (required), animation (required), fps, skin, +7 more.

spine_project_infoSpine project infoA
Read-only

Fast CLI summary (Spine -i): editor version, FPS, skeletons, bone/slot/constraint/animation lists. Several paths per call (one ~3 s CLI start).

Inputs: paths (required).

spine_render_framesRender animation framesA
Read-only

Renders an animation with Spine's renderer (~4 s, cached) and returns a contact sheet. No MSAA or physics warm-up: for checking, not final video.

Inputs: project (required), animation (required), fps, cell, +5 more.

spine_restore_backupRestore project backupA
Destructive

Puts a backup back. Dry-run by default; apply backs up the current file first, then restores atomically.

Inputs: project (required), backupId (required), apply, force.

spine_statusProject status and recent spine-mcp stepsA
Read-only

Instant, no CLI: file state, editor window, staging copy, backups, spine-mcp's last steps on the project and outside changes since. Call first when resuming work.

Inputs: project (required), recent.

spine_validateValidate skeletonB
Read-only

Finds problems: duplicate names, bone order, missing references (Spine drops them on import), mesh indices, key order, curves, keys on physics bones; samples every animation in spine-core (NaN, loop seams, clamps, invisible keys, mesh folds, joints opening). face: blinks vs pose changes and mouth swaps, lashes while shut, mouth bones, blink timing.

Inputs: input (required), fps, face, runtime, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 15 tools

    Disambiguation3/5

    Several clusters blur together: spine_doctor, spine_status, spine_editor_status and spine_project_info all answer 'what's the current state?', and both doctor and status are described as 'call first', which leaves the agent guessing which to invoke. Likewise spine_add_animation, spine_generate_animation, spine_derive_animation and spine_edit_animation all produce a new animation via the same CLI import path, so choosing among them requires reading the long descriptions carefully. Detailed prose helps recover the boundaries, but the overlaps are real.

    Naming Consistency4/5

    Everything is uniformly snake_case with a spine_ prefix, and the majority are verb_noun (export_json, add_animation, restore_backup, render_frames). A handful of exceptions are noun-only (spine_doctor, spine_status, spine_editor_status, spine_project_info), which is a minor deviation from the dominant pattern but still readable.

    Tool Count4/5

    15 tools sit at the top of the ideal 3-15 range and each maps to a plausible domain operation (diagnostics, inspection, validation, rendering, export, authoring, backups). The count is slightly inflated by four overlapping status/diagnostic tools that could arguably be consolidated, but nothing feels gratuitously padded.

    Completeness4/5

    The surface covers a full authoring workflow: inspect, validate, measure, render, export, create/edit/derive/generate animations, and backup/restore with dry-run safety. The notable gap is a delete/remove path — there is no way to remove or rename an existing animation, and backup listing has no corresponding cleanup. These are minor gaps an agent can work around via export and re-import.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables authoring, preview, and export of Spine 2D skeletal animations via natural language from Claude Code or any MCP client, with a web dashboard and tools for keyframing, templates, and GIF preview.
      8
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI clients to directly control Spine 3.8.75 animation workflows through 55 MCP tools, including reading projects, editing keyframes, manipulating skeletons, constraints, meshes, atlases, and rendering previews.
      30 npm
      37
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Enables converting layered PSD or PhotoshopToSpine exports into validated Spine 2D rigs, animations, atlases, previews, runtime JSON, and optionally editable .spine projects. It provides MCP tools and an OpenAI/Codex workflow for rigging, animation generation, validation, preview auditing, and batch processing.
      14
      1
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables an AI assistant to create, edit, validate and animate Esoteric Software Spine 2D skeletons without the editor running, covering bones, slots, attachments, skins, events, constraints, keyframes and reference-safe renames or deletions. When the Spine editor is installed, it also drives the official CLI to import skeleton JSON into a project and export runtime JSON/binary with atlases.
      26
      2
      MIT