The Problem: The AI Animation Blind Spot
While AI models excel at code generation, copy editing, and generating static concept images, traditional 2D keyframed animation has remained locked behind complex, proprietary GUI software. Traditional animation applications like Toon Boom Harmony, Adobe Animate, or Blender Grease Pencil lack lightweight, standardized programmatic interfaces that AI agents (such as Claude Desktop, Google Antigravity, or Cursor) can control safely and headlessly.
Artists and technical animators were forced to manually create projects, configure frame rates, draw inbetween frames, export sequences, and troubleshoot missing layers.
The Solution: The Model Context Protocol Meets Pencil2D
Pencil2D is a beloved, open-source 2D animation application known for its minimalist, distraction-free hand-drawn raster and vector workflows.
pencil2d-mcp transforms Pencil2D into an autonomous creative engine by implementing the open Model Context Protocol (MCP). It provides a standard JSON-RPC 2.0 stdio server that gives any AI coding agent complete, non-destructive control over:
- Native Archive Manipulation: Reading, editing, and generating
.pclxZIP archives andmain.xmlDOM trees with zero GUI overhead. - Headless Movie Exporting: Calling the bundled Pencil2D Linux AppImage CLI to render MP4, animated GIF, WebM, and transparent PNG sequences directly from terminal environments.
- Multi-Layer Timeline Control: Organizing independent Bitmap, Vector, Sound, and Camera layers.
- Batch Animation Ingestion: Bulk importing entire frame sequences with sub-second turnaround times.
Key Design Principles
- Zero Heavy Runtime Dependencies: Implemented in pure Python (standard library + Pillow). No Qt builds or heavy C++ bindings required to manipulate projects.
- Non-Destructive Workflows: Projects generated by the MCP server remain 100% editable in the visual Pencil2D desktop GUI. Human animators can jump in at any time to refine lines or add colors.
- Privacy & Security First: Operates entirely locally over standard input/output. Your drawings, assets, and project files never leave your machine.
Author & Maintainer
This is my first time building an MCP server as a 20-year-old solo developer! If you encounter any issues, bugs, or have ideas for improvement, please contact me directly at chrizmonsaji@proton.me or open an issue on GitHub.
The project is open source and licensed under the permissive MIT License.