
连接 Claude 与 Cavalry 动画软件的 MCP 服务器。创建图层、设置属性、用关键帧动画、渲染帧等——所有这些都通过自然语言完成。
概览
连接 Claude 与 Cavalry 动画软件的 MCP 服务器。创建图层、设置属性、用关键帧动画、渲染帧等——所有这些都通过自然语言完成。 MCP 服务器通过 Stallion 桥(运行于 Cavalry 内部的 HTTP 服务器,运行于 127.0.0.1:8080)向 Cavalry 发送 JavaScript。 - 骑兵(启用种马文字时:)- Node.js >= 18 创建一个跳跃文本,写着“Hello World”,Claude 将: 1. 创建 textShape 图层 2.设置文本内容、字体大小和颜色 3.为跳跃添加位置关键帧 4.应用 BounceOut 缓和 basicShape、textShape、null、colorPlane、group、subMesh、linear Gradient、duplicator、connectShape、noiseDeformer、stagger、trail、javaScriptUtility、javaScriptShape、imageAsset、videoAsset、soundAsset - position.x, position.y — 图层位置 - 旋转 — 旋转度数 - scale.x, scale.y — 缩放 - 不透明度 — 图层不透明度(0–100) - fontSize — 文本图层字体大小 - 填充颜色 — 填充颜色(十六进制字符串) - stroke.color, stroke。
概述(AI 翻译)
连接 Claude 与 Cavalry 动画软件的 MCP 服务器。创建图层、设置属性、用关键帧动画、渲染帧等——所有这些都通过自然语言完成。
它是如何运作的
MCP 服务器通过 Stallion 桥(运行在 127.0.0.1:8080 内的 HTTP 服务器)向 Cavalry 发送 JavaScript。
先修条件
- 骑兵(启用种马文字时:>种马文字//种马)
- Node.js >= 18
布置
在 Claude Desktop 中配置
补充你的claude_desktop_config.json:
可用工具
| 工具 | 描述 |
|---|---|
cavalry_ping |
检查骑兵+骏马是否可到达 |
cavalry_run_script |
在骑兵中执行任意JavaScript |
cavalry_create_layer |
创建图层(textShape、basicShape、null 等) |
cavalry_set_attribute |
在图层上设置属性 |
cavalry_get_attribute |
读取属性值 |
cavalry_connect |
连接属性在层之间 |
cavalry_keyframe |
在特定帧设置关键帧 |
cavalry_magic_easing |
对关键帧属性应用缓和 |
cavalry_get_scene_layers |
列出场景中的所有图层 |
cavalry_get_selected_layers |
获取当前选中的图层 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
cavalry-mcp
MCP server that connects Claude to Cavalry animation software. Create layers, set attributes, animate with keyframes, render frames, and more — all through natural language.
How it works
Claude cavalry-mcp Stallion Cavalry
The MCP server sends JavaScript to Cavalry via the Stallion bridge (an HTTP server running inside Cavalry on 127.0.0.1:8080).
Prerequisites
- Cavalry (with Stallion script enabled: Scripts > Stallion)
- Node.js >= 18
Setup
npm install
npm run build
Configure in Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"cavalry": {
"command": "node",
"args": ["/absolute/path/to/cavalry-mcp/dist/index.js"]
}
}
}
Available tools
| Tool | Description |
|---|---|
cavalry_ping |
Check if Cavalry + Stallion are reachable |
cavalry_run_script |
Execute arbitrary JavaScript in Cavalry |
cavalry_create_layer |
Create a layer (textShape, basicShape, null, etc.) |
cavalry_set_attribute |
Set attributes on a layer |
cavalry_get_attribute |
Read an attribute value |
cavalry_connect |
Connect attributes between layers |
cavalry_keyframe |
Set a keyframe at a specific frame |
cavalry_magic_easing |
Apply easing to keyframed attributes |
cavalry_get_scene_layers |
List all layers in the scene |
cavalry_get_selected_layers |
Get currently selected layers |
cavalry_select_layers |
Select layers by ID |
cavalry_delete_layers |
Delete layers by ID |
cavalry_get_composition_info |
Get resolution, frame range, FPS |
cavalry_set_current_frame |
Move the playhead |
cavalry_render_png |
Render current frame as PNG |
cavalry_set_generator |
Set a generator on a layer (ellipse, rectangle, etc.) |
cavalry_duplicate_layer |
Duplicate a layer |
cavalry_get_bounding_box |
Get a layer’s bounding box |
cavalry_save_scene |
Save the scene |
cavalry_open_scene |
Open a .cv scene file |
cavalry_add_dynamic_attribute |
Add a dynamic attribute to a layer |
Example conversation
You: Create a bouncing text that says “Hello World”
Claude will:
- Create a textShape layer
- Set the text content, font size, and color
- Add position keyframes for the bounce
- Apply BounceOut easing
Common layer types
basicShape, textShape, null, colorPlane, group, subMesh, linearGradient, duplicator, connectShape, noiseDeformer, stagger, trail, javaScriptUtility, javaScriptShape, imageAsset, videoAsset, soundAsset
Common attribute paths
position.x,position.y— Layer positionrotation— Rotation in degreesscale.x,scale.y— Scaleopacity— Layer opacity (0–100)fontSize— Text layer font sizefill.color— Fill color (hex string)
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"cavalry": {
"command": "node",
"args": ["/absolute/path/to/cavalry-mcp/dist/index.js"]
}
}
}