Skip to content
Back to search

spine2d-animation-mcp

MCP server for creating SPINE2D animations

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ampersante--spine2d-animation-mcp/badge.svg)](/listings/ampersante--spine2d-animation-mcp)

HTML

<a href="/listings/ampersante--spine2d-animation-mcp"><img src="/api/listings/ampersante--spine2d-animation-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

uv sync

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 89 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # spine2d-mcp
  2. An MCP server that converts a layered PSD character into a [Spine](http://esotericsoftware.com/) 4.2 project — skeleton JSON, texture atlas, and atlas page PNG(s) — ready to import into the Spine editor and Unity.
  3. The goal is to cut the manual rig-and-import work for a character from days down to roughly an hour.
  4. ## Status
  5. **Phase 0 (proof of concept):** PSD → a correct, importable rig (no animations yet).
  6. The pipeline is implemented and covered by tests against synthetic fixtures. It has not yet been validated against a real PSD in the Spine editor / Unity — that is the next milestone. Animation generation, headless preview, and Unity export are planned for later phases.
  7. ## What it does today
  8. Given a PSD whose layers are named after body parts (`head`, `body`/`torso`, `arm_left`, `hand_right`, `leg_left`, `foot_right`, …), the `import_psd_to_spine` tool produces:
  9. - `<name>.json` — Spine 4.2 skeleton (bones, slots, default skin, region attachments)
  10. - `<name>.atlas` — libgdx/Spine texture atlas
  11. - `<name>.png` — packed atlas page(s)
  12. Key behaviors:
  13. - **Multi-segment skeleton** (`root → hip → torso → chest → neck → head`, limbs off `chest`, legs off `hip`); missing intermediate bones are created as positioned virtual bones.
  14. - **Joint-correct pivots** — each bone pivots at the joint edge of its part (or an explicit `<part>[pivot]` marker layer), not the image center, so rotation behaves anatomically.
  15. - **PSD draw order** is preserved as Spine slot order.
  16. - **Structural validation** of the skeleton against the invariants the Spine 4.2 reader enforces.
  17. Format source of truth: `reference/SkeletonJson.java` (spine-runtimes 4.2).
  18. ## Requirements
  19. - Python 3.11+
  20. - [uv](https://docs.astral.sh/uv/)
  21. ## Setup
  22. ```bash
  23. uv sync
  24. ```
  25. ## Run the tests
  26. ```bash
  27. uv run pytest
  28. ```
  29. ## Run the MCP server
  30. ```bash
  31. uv run spine2d-mcp
  32. ```
  33. This starts a stdio MCP server exposing a single tool:
  34. ```
  35. import_psd_to_spine(psd_path: str, out_dir: str | None = None)
  36. -> { project_path, atlas_path, png_paths }
  37. ```
  38. Point an MCP client (e.g. Claude Desktop / Claude Code) at it, then ask it to import a PSD by path.
  39. ## Project layout
  40. ```
  41. src/spine2d_mcp/
  42. server.py FastMCP server + import_psd_to_spine tool
  43. pipeline.py PSD -> Spine project orchestration
  44. psd/parser.py PSD -> flat layer list (+ pivot markers)
  45. psd/conventions.py bone hierarchy, joint sides, [pivot] tag
  46. spine/schema.py Pydantic models for Spine 4.2 JSON
  47. spine/builder.py layers -> SpineProject
  48. spine/writer.py SpineProject -> JSON
  49. spine/validator.py structural validation
  50. atlas/packer.py rectpack bin packing
  51. atlas/writer.py .atlas text + composite PNG
  52. reference/ SkeletonJson.java, spineboy.atlas (format references)
  53. tests/ pytest suite (synthetic PSD fixtures)
  54. ```
  55. ## License
  56. This project is released under the MIT License.
  57. You may use, copy, modify, merge, publish, distribute, sublicense, and sell copies
  58. of the software, provided that the original copyright notice and license text are
  59. included with substantial portions of the software.
  60. The software is provided "as is", without warranty of any kind. See
  61. [LICENSE](LICENSE) for the full license text.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.