cavalry-mcp
Click on "Deploy 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., "@cavalry-mcpCreate a star layer and set a keyframe on its rotation"
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.
Cavalry MCP
A local, domain-specific MCP server for controlling Cavalry through its installed JavaScript API. It exposes validated tools and structured JSON results instead of arbitrary script execution.
Requirements
Cavalry 2.4 or newer
Node.js 20 or newer
An MCP client with
stdiosupport
Related MCP server: cavalry-mcp
Install from this repository
npm install
node src/index.js --install-bridgeOpen Cavalry, choose Scripts > Stallion, and approve Cavalry's one-time trust prompt. The bundled Stallion bridge listens only on 127.0.0.1:8080.
Configure the MCP client:
{
"mcpServers": {
"cavalry": {
"command": "node",
"args": ["C:/absolute/path/to/cavalry-mcp/src/index.js"]
}
}
}After publication to npm:
npx -y cavalry-mcp installIf Stallion.js already exists and should be replaced, add --force. The legacy
--install-bridge flag remains supported.
{
"mcpServers": {
"cavalry": {
"command": "npx",
"args": ["-y", "cavalry-mcp"]
}
}
}MCP interface
Every successful tool response includes both human-readable text and validated structuredContent.
Tool | Purpose |
| Check the local bridge. |
| Read the active scene, compositions, layers, selection, frame, path, and unsaved state. |
| Read a layer, its attributes, and optional attribute definitions. |
| Create, initialize, and parent a layer. |
| Rename, edit, parent, or unparent a layer. |
| Validate and delete layers. |
| Connect or disconnect layer attributes. |
| Add or replace attribute keyframes. |
| Delete selected frames or an entire animation. |
| Apply JavaScript, SkSL, or render expressions with changed/skipped IDs. |
| Save safely to the current path or an explicit |
| Render and verify a PNG while restoring the playhead. |
| Export and verify native Lottie JSON for a composition. |
| Search exact signatures from the installed Cavalry build. |
| Call any installed |
The read-only cavalry://scene resource exposes the live scene summary to MCP clients that support resources.
Dedicated tools first
Use the dedicated domain tools for normal work. cavalry_api_call is the fallback for the rest of Cavalry's installed @JS_GUI_API surface:
{
"method": "getFrame",
"args": []
}The server rejects unknown methods. Scene replacement and destructive scene operations require confirmDangerous: true. Arbitrary script execution, process execution, browser launches, and general filesystem read/write methods are never exposed by this fallback.
Architecture
MCP client ──stdio──> Cavalry MCP ──HTTP loopback──> Stallion ──> Cavalry api
│
└── installed API metadata for validation/discoveryThe bridge injects generated adapters directly into Cavalry through api.exec. Only the structured result uses a temporary JSON file, which is removed after every call. No desktop mouse/keyboard automation, MCP network listener, or arbitrary-JavaScript tool is exposed.
Configuration
Variable | Default |
|
|
| Auto-detected Cavalry |
| Auto-detected user Scripts directory |
| Auto-detected Cavalry |
Safety
Tool schemas validate input at the MCP boundary. Mutating tools declare MCP safety annotations, saves and renders refuse existing targets unless explicitly allowed, render restores the previous frame, and generic API calls are restricted to installed metadata. New JavaScript Console errors and warnings fail the active MCP operation instead of being silently reported as success.
The MCP never drives Cavalry through desktop input. If the installed JavaScript API does not expose an operation, the tool fails explicitly instead of clicking menus or sending keystrokes.
An MCP client still has substantial authority over the open Cavalry scene. Keep Stallion on loopback and save important work before approving mutations.
Development
npm run check
npm test
npm run smoke
npm run smoke:mcp
npm run smoke:write # creates and removes a temporary layer and PNG
npm pack --dry-runMIT licensed. Stallion remains copyright its original author and is included under its MIT license in THIRD_PARTY_LICENSES.md.
This server cannot be deployed
Maintenance
Related MCP Connectors
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
Remote MCP server for AI.TV creators — delegate account operations to your AI agent over MCP.
Plan, compare, price, generate, and recover AI video from compatible MCP clients.
Cloud Blender for AI agents: scenes, assets, renders, MP4, STL, GLB — over hosted remote MCP.
Related MCP Servers
- FlicenseAqualityFmaintenanceEnables natural language control of Cavalry animation software for creating layers, setting attributes, keyframing, rendering frames, and more via an MCP server.2130-
- FlicenseBqualityCmaintenanceMCP server for driving Cavalry's 2D motion-graphics engine from LLMs, enabling scene creation and animation via natural language.283-
- AlicenseNot gradedqualityCmaintenanceMCP server for Adobe After Effects, enabling structured control over projects, compositions, layers, properties, expressions, keyframes, imports, and rendering through a local authenticated WebSocket bridge.96 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to inspect and operate the Cocos Creator project currently open, including scenes, nodes, assets, animations, and editor workflows via MCP.MIT