spine-anim-mcp
Generates Spine 4.2 rigs and procedural animations (idle, walk, run, jump, attack, hit) from PSD files, producing .json skeleton files ready for the Spine editor.
Produces Unity-ready .json, .atlas, and .png files with import instructions for spine-unity, enabling use of generated animations in Unity projects.
Click on "Install 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., "@spine-anim-mcpconvert character.psd to Spine rig with idle and walk animations"
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.
spine-anim-mcp
An MCP server that turns a layered PSD character into a Spine 4.2 rig and generates deterministic, parametric 2D/2.5D animations — idle, walk, run, jump, attack, hit — ready for the Spine editor and Unity.
Most PSD→Spine tools stop at rigging — they hand you a skeleton and leave the animation to you. This one generates the animations too, with pure math: same parameters in → byte-identical output. Reproducible, diffable, no broken AI-guessed poses.
PSD ──▶ rig (bones + slots + atlas) ──▶ procedural animations ──▶ .json + .atlas + .pngWhy deterministic instead of AI?
Generative pose prediction produces anatomically broken results that cost more time to fix than to author by hand. Every animation here is a sampled mathematical function — a walk cycle is antiphase leg sines with opposing arm swing and a 2× vertical bob, not a guess. The trade-off is explicit: this tool owns locomotion and combat basics; expressive one-off animation stays in the Spine editor where an artist's eye belongs.
Related MCP server: aseprite-mcp
Features
PSD → joint-correct rig. Layers named after body parts (
head,torso,arm_left,leg_right, …) become a topologically-ordered Spine 4.2 skeleton with anatomical pivots (upper-arm rotates at the shoulder, not the image center).Six procedural generators, each fully parametric (see table below).
Loop-correct cycles.
idle/walk/runare authored so frame 0 == frame N — seamless Spine looping, no popping.Validated before write. Structural invariants the runtime reader assumes (single root, topological bone order, resolvable references, monotonic keyframe times) are checked at generation time, so failures are clear errors instead of silent import breakage.
Idempotent output. Identical inputs overwrite with byte-identical content and touch no other file in the output directory.
Unity-ready. Emits
.json+.atlas+.png; full import guide indocs/UNITY.md.
Validation status
Phase 1 — implemented and validated end-to-end on two PSDs: a synthetic
stick rig (examples/hero) and a real stylized 2D character
(examples/adventurer) — a shaded adventurer with tunic, pants, and boots, split
into 17 convention-named layers.
Real character, posed by the procedural engine
Live animations (looping GIFs), all from the same rig with no hand-keying:
Source PSD → idle → walk (static reference):

Per-animation keyframe breakdowns: examples/adventurer/walk_cycle.png,
attack_sequence.png, jump_sequence.png.
Testing against a real character surfaced — and fixed — several issues that flat rectangles hid: limb parts must overlap at joints to avoid gaps when bent; a bone-hierarchy bug had the foot parented to the upper leg instead of the shin, so it tracked the wrong segment and detached when the knee bent; and the walk now uses 2-bone analytic IK foot-lock — the ankle is placed on a plant/swing path (planted on the ground through stance, arcing forward in swing) and the leg is solved to reach it. Because the foot is the IK target, it stays locked to the shin through the entire stride. No detachment.
Recommended before shipping art: open the generated
.jsonin the actual Spine 4.2 editor and import into spine-unity to confirm against the real runtime. The headless renderer (examples/render_posed.py) solves forward kinematics independently — useful, but it is not the Spine runtime itself.
Animation catalog
Type | Loops | Method | Key parameters (defaults) |
| ✓ | sine breathing on chest/torso, half-freq head sway, arm drift |
|
| ✓ | antiphase leg sine, opposing arm swing, 2× bob, torso counter-rotate |
|
| ✓ | walk with larger amplitudes + constant forward lean |
|
| ✗ | crouch → launch → apex → land → settle pose keys, eased |
|
| ✗ | windup → stepped strike → follow-through; |
|
| ✗ | sharp recoil on root/torso/head then settle |
|
Generators are rig-agnostic within the humanoid convention: a 4-bone stick figure and an 18-bone character both animate; roles the rig lacks are silently skipped.
Install
git clone https://github.com/K-ulucay/spine_anim_mcp.git
cd spine-anim-mcp
pip install -e . # pulls mcp, pydantic, Pillow, psd-toolsRequires Python 3.11+.
Run the tests
python3 tests/test_pipeline.pyRun the MCP server
spine-anim-mcp # or: python -m spine_anim_mcp.serverThen point an MCP client (Claude Desktop / Claude Code) at it.
Quickstart
Given hero.psd with layers named head, neck, chest, torso, hip,
arm_upper_left, arm_lower_left, leg_upper_right, … ask your MCP client to
call:
import_psd_to_spine(
psd_path = "hero.psd",
animations = [
{ "type": "idle" },
{ "type": "walk", "params": { "stride": 34, "bob": 4 } },
{ "type": "run" },
{ "type": "attack", "name": "slash", "params": { "hand": "left", "swing": 95 } }
]
)Output (in hero_spine/):
hero.json # skeleton + idle, walk, run, slash animations
hero.atlas # texture atlas
hero.png # packed atlas pageImport into Unity per docs/UNITY.md (note: rename
hero.atlas → hero.atlas.txt, spine-unity requires the .txt extension).
MCP tools
Tool | Purpose |
| Full pipeline: PSD → rig + animations → files. Defaults to |
| Add animations to an existing Spine skeleton (bones auto-mapped by name). |
| List available generators. |
| Tunable parameters + defaults for one type. |
animations is a list of { type, name?, params? }. type selects the
generator; optional name renames the produced animation; params overrides
defaults from the catalog above.
Layer naming
Layer names are matched to roles flexibly (lowercased, separators normalised), so
Left Arm, arm_l, upperarm.L, and arm_upper_left all resolve to the same
role.
Region | Roles |
Spine |
|
Left arm |
|
Right arm |
|
Left leg |
|
Right leg |
|
Full alias table: src/spine_anim_mcp/psd/conventions.py.
Project layout
src/spine_anim_mcp/
server.py FastMCP server + tool definitions
pipeline.py orchestration; idempotent file writes
psd/parser.py PSD -> flat part list (+ spec fallback for tests)
psd/conventions.py hierarchy, name->role aliases, pivot fractions
spine/schema.py Pydantic models = source of truth for Spine 4.2 JSON
spine/builder.py parts -> bones/slots/attachments (world->local transform)
spine/writer.py JSON serialiser + structural validator
anim/generators.py the procedural animation engine
atlas/writer.py shelf packer -> .atlas text + composite PNG
docs/
SPECIFICATION.md architecture, Spine 4.2 contract, animation math, roadmap
UNITY.md spine-unity 4.2 import + scripting guide
tests/
test_pipeline.py end-to-end test on a synthetic 18-bone humanoidRoadmap
Real-PSD round-trip through the pipeline with FK-verified rig (
examples/hero)2-bone IK foot-lock on walk/run (
anim/ik.py) — feet stay plantedConfirm
examples/adventurer/adventurer.jsonin the live Spine 4.2 editor + spine-unityExtract real per-part PNG pixels into the atlas (currently bounds-only)
<part>[pivot]marker-layer support for per-part pivot overridesBezier easing on cyclic anims (currently linear/stepped) for snappier feel
Mesh-deform + skin-swap timelines (stronger 2.5D perspective)
Emit Spine IK constraints directly (so the editor re-solves), not just baked angles
Contributing
PRs welcome — especially:
Real-PSD test fixtures and Spine/Unity round-trip reports. This is the most valuable contribution right now.
New generators (add
gen_<name>(rig, **params)toanim/generators.py, register inGENERATORS, document params inserver.PARAM_DOCS).Non-humanoid rig conventions (vehicles, creatures).
Generators must stay deterministic — no randomness, no model calls.
License
MIT — see LICENSE.
Available Tools
4 toolsanimate_existingA
Add procedural animations to an EXISTING Spine 4.2 skeleton JSON.
The skeleton's bones are auto-mapped to canonical roles by name. Bones whose names already follow the role convention (head, leg_upper_left, ...) map directly; others are ignored by the generators. Returns JSON with the updated project path and the animations added.
| Name | Required | Description | Default |
|---|---|---|---|
| skeleton_json_path | Yes | ||
| animations | Yes | ||
| out_dir | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must cover behavior fully. It discloses auto-mapping by name and ignored bones, but lacks details on side effects (e.g., file modification), permissions, error handling, or prerequisites for the skeleton file.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is four sentences, each adding value: purpose, mapping logic, ignored bones, return format. It is front-loaded and concise with no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 3 parameters and no annotations. The description covers the skeleton mapping and return format, but leaves the animations array undefined, which is critical for usage. The presence of an output schema partially compensates for return value clarity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It clarifies skeleton_json_path as input skeleton and animations as what to add, but does not explain the structure of the animations array or the out_dir parameter. This is insufficient for a 3-parameter tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Add' and the resource 'EXISTING Spine 4.2 skeleton JSON', distinguishing it from siblings (describe_animation_type, import_psd_to_spine, list_animation_types) which cover description, import, and listing respectively.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when you have an existing skeleton and want procedural animations, and mentions that bones not following naming conventions are ignored, providing a context hint. However, it does not explicitly exclude alternatives or state when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_animation_typeA
Return the tunable parameters and defaults for one animation type.
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description implies a read-only operation by stating it returns information, but does not explicitly declare non-destructiveness or other behavioral traits. No annotations are present to supplement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, clear sentence that front-loads the purpose with no extraneous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple query tool with one parameter, the description is mostly sufficient. It could reference the sibling tool list_animation_types for valid inputs, but the output schema likely covers return values.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description associates the 'type' parameter with the animation type, but provides no details on valid values, format, or examples, leaving the agent to infer.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the tool returns tunable parameters and defaults for a single animation type, distinguishing it from sibling tools that animate, import, or list types.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied by the name and description, but no explicit guidance on when to use or alternatives is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
import_psd_to_spineA
Convert a layered PSD into a Spine 4.2 project and generate animations.
psd_path: path to a .psd whose layers are named after body roles (head, torso, arm_left, leg_right, ...). animations: list of {type, name?, params?}. If omitted, generates a default set: idle + walk. Returns JSON with project_path, atlas_path, png_path, animations.
| Name | Required | Description | Default |
|---|---|---|---|
| psd_path | Yes | ||
| animations | No | ||
| out_dir | No | ||
| name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the return format (JSON with project_path, atlas_path, png_path, animations) and the animation parameter structure, which is useful. However, it does not mention potential side effects, permissions, error handling, or behavior for missing parameters out_dir and name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded with the core purpose. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although output schema exists, the description omits details for two of four parameters and does not cover prerequisites, output file locations, or error conditions, leaving gaps for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds meaning for psd_path (layer naming convention) and animations (object structure and default behavior). This is valuable, but out_dir and name are left undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts a layered PSD into a Spine 4.2 project and generates animations, specifying the resource and expected output. This distinguishes it from siblings like animate_existing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives (siblings) is provided. The description implies its use for converting PSDs but does not state when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_animation_typesA
List the procedural animation types this server can generate.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the burden. It correctly states the tool lists types (read-only) with no destructive effects, matching expectations for a list operation. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that conveys the tool's purpose without superfluous words. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and an output schema present, the description fully covers the tool's behavior. No additional context is necessary for an agent to select and invoke this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so schema coverage is 100%. The description adds no parameter info, but none is needed; a baseline of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and resource ('procedural animation types'), clearly distinguishing this from siblings like 'animate_existing' (which performs animation) and 'import_psd_to_spine' (which imports data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for discovery (listing available animation types) but does not explicitly state when to use it versus other tools like 'describe_animation_type' or provide alternative scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
animate_existing - First observed
describe_animation_type - First observed
import_psd_to_spine - First observed
list_animation_types
TDQS
Each tool has a clearly distinct purpose: importing PSDs, listing animation types, describing parameters, and adding animations to existing skeletons. No overlap in functionality.
All tool names follow a consistent verb_noun pattern with underscores (animate_existing, describe_animation_type, import_psd_to_spine, list_animation_types), making them predictable.
With 4 tools, the server is well-scoped for its domain (Spine procedural animations). Each tool earns its place, covering essential operations without excess.
The tool set covers the core workflows: project creation, animation type discovery, parameter lookup, and application. A minor gap is the lack of an update/delete tool for animations, but the surface is sufficient for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Generate authentic pixel art - sprites, animations, and tilesets - from any MCP client
Generate game-ready 3D models, textures, and audio from natural language, over MCP.
MCP server for Flux AI image generation
MCP server for Hailuo (MiniMax) AI video generation
Related MCP Servers
- AlicenseAqualityDmaintenanceLocal MCP server for automating Spine projects via the official CLI, enabling AI tools to inspect, export, import, and add animations to .spine files.161511Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for programmatically creating and editing Aseprite sprites, enabling AI agents to draw, manage layers and frames, and iterate until the desired result is achieved.MIT
- 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-
- AlicenseNot gradedqualityAmaintenanceAn MCP server that lets AI agents draw in a live Aseprite editor or headless mode, featuring one-action Unity sprite-sheet export, art-QA sweeps, and game-dev tools.3MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/K-ulucay/spine_anim_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server