How zhoushengmin/spine-mcp-server works
Spine MCP Server exposes Spine 3.8.75 project inspection, editing, rendering, and production workflows as MCP tools for AI clients. The principal flow is an MCP request through tool dispatch to a domain tool and its Spine service; project changes use JSON editing and can round-trip through Spine’s CLI. A separate pipeline automates asset-to-animation production, while the documented Cocos extension provides a panel for service management and configuration. Some service wiring is unsampled, so unverified links are omitted.
Main entry points: pipeline-service.ts Production Pipeline · registry.ts Tool Registry · render-preview.tool.ts Preview Tools · server.ts MCP Server
Components 23
MCP Entry
- MCP Server
src/server.ts - Tool Registry
src/tools/registry.ts - Configuration
src/config-manager.ts
Spine Tools
- Tool Base
src/tools/base.tool.ts - Project Inspection
src/tools/info.tool.ts - Skeleton Editing
src/tools/bones-control.tool.ts - Animation Tools
src/tools/animation-generate.tool.ts - Preview Tools
src/tools/render-preview.tool.ts - Pipeline Tool
src/tools/pipeline.tool.ts
Spine Services
- Spine CLI
src/spine/cli-executor.ts - Spine JSON Editing
src/spine/json-handler.ts - Project Export
src/spine/export-service.ts - Project Import
src/spine/import-service.ts - Animation Rendering
src/spine/render-service.ts - JS Render Runtime
src/spine/render-runtime.ts
Asset Production
- Production Pipeline
src/spine/pipeline-service.ts - Atlas Part Cutting
src/spine/cut-parts-service.ts - Skeleton Assembly
src/spine/assemble-service.ts - Skeleton Mirroring
src/spine/mirror-service.ts - Animation Generation
src/spine/animation-generate-service.ts - Atlas Repacking
src/spine/repack-atlas-service.ts
Cocos Extension
- Cocos Panel
cocos-extension/panel/panel.js
Other components
- AI Client
Connections 24
- AI Client → MCP Server: sends MCP requests
README.md - MCP Server → Tool Registry: dispatches tools
src/server.ts - MCP Server → Configuration: loads configuration
src/server.ts - Tool Registry → Project Inspection: registers tools
src/tools/registry.ts - Tool Registry → Skeleton Editing: registers tools
src/tools/registry.ts - Tool Registry → Animation Tools: registers tools
src/tools/registry.ts - Tool Registry → Preview Tools: registers tools
src/tools/registry.ts - Tool Registry → Pipeline Tool: registers tools
src/tools/registry.ts - Project Inspection → Spine CLI: reads project info
- Skeleton Editing → Spine JSON Editing: edits project JSON
src/tools/bones-control.tool.ts - Animation Tools → Spine JSON Editing: updates keyframes
src/tools/animation-generate.tool.ts - Preview Tools → Animation Rendering: renders frames
src/tools/render-preview.tool.ts - Preview Tools → JS Render Runtime: renders runtime frames
src/tools/render-preview.tool.ts - Preview Tools → Project Export: exports project
src/tools/render-preview.tool.ts - Pipeline Tool → Production Pipeline: runs workflow
src/tools/pipeline.tool.ts - Production Pipeline → Atlas Part Cutting: cuts image parts
src/spine/pipeline-service.ts - Production Pipeline → Skeleton Assembly: assembles skeleton
src/spine/pipeline-service.ts - Production Pipeline → Skeleton Mirroring: mirrors skeleton
src/spine/pipeline-service.ts - Production Pipeline → Animation Generation: generates animation
src/spine/pipeline-service.ts - Production Pipeline → Atlas Repacking: repacks atlas
src/spine/pipeline-service.ts - Production Pipeline → Animation Rendering: renders frames
src/spine/pipeline-service.ts - Cocos Panel → MCP Server: manages service
README.md - Project Export → Spine CLI: exports via CLI
src/spine/export-service.ts - Project Import → Spine CLI: imports via CLI
src/spine/import-service.ts