Motion Diagram

Motion Diagram

Agent-driven animated diagram renderer that turns API/flow descriptions into animated MP4s or Instagram-style carousels, designed to be driven by an AI agent over MCP.

Category
访问服务器

README

Motion Diagram

Agent-driven animated diagram renderer. Turn an API/flow/architecture description into an animated MP4 (glowing pulses traveling edges, node pops, camera focus, 8-bit sfx) or an Instagram-style carousel (silent GIF + WebP slides).

Built for content creators. Designed to be driven by an AI agent over MCP — the agent designs the scene, this tool renders it.

Stack

  • Remotion (React → MP4 via headless Chrome + ffmpeg)
  • dagre (auto-layout)
  • ffmpeg (sfx synthesis, GIF→WebP)
  • MCP SDK (agent interface)

Install

# one-off, no install
npx motion-diagram render examples/login-flow.json -- --out login.mp4

# or global
npm install -g motion-diagram

# or from a clone
npm install

Check prerequisites (Node >=18, ffmpeg, deps):

npx motion-diagram doctor

First render downloads a headless Chrome (~once). Full guide: docs/INSTALL.md.

CLI

# video (MP4 + sfx)
npm run render examples/login-flow.json -- --out output/login-flow.mp4

# carousel (GIF + WebP per node group)
npm run render examples/login-flow.json -- --mode carousel --out output/login-carousel

# live preview studio
npm run studio

Scene JSON

Agent emits nodes, edges, and a timeline. See docs/SCHEMA.md.

{
  "meta": { "title": "Login Flow", "fps": 30, "width": 1920, "height": 1080 },
  "nodes": [
    { "id": "client", "label": "Client", "shape": "rect", "icon": "user" },
    { "id": "api", "label": "API", "shape": "rect", "icon": "server" },
    { "id": "db", "label": "DB", "shape": "stadium", "icon": "database" },
  ],
  "edges": [
    { "id": "e1", "from": "client", "to": "api", "label": "POST /login" },
    { "id": "e2", "from": "api", "to": "db", "label": "query" },
  ],
  "timeline": [
    { "at": 0, "type": "reveal-node", "target": "client" },
    { "at": 8, "type": "reveal-node", "target": "api" },
    { "at": 16, "type": "reveal-node", "target": "db" },
    { "at": 24, "type": "reveal-edge", "target": "e1" },
    { "at": 42, "type": "reveal-edge", "target": "e2" },
    {
      "at": 60,
      "type": "pulse",
      "edge": "e1",
      "color": "#38bdf8",
      "onArrive": { "flash": true, "sfx": "beep" },
    },
    {
      "at": 95,
      "type": "pulse",
      "edge": "e2",
      "color": "#34d399",
      "onArrive": { "flash": true, "sfx": "ding" },
    },
  ],
}

Motion primitives

type effect
reveal-node node pops in (spring scale + fade)
reveal-edge edge draws like a pen
pulse glowing comet travels edge (data flow), multi-color
flash node glow burst
camera pan/zoom focus to a node

Sound

Bundled 8-bit sfx in public/sfx/: beep, whoosh, ding. Chosen per event by the agent (sfx / onArrive.sfx), or none. Swap the WAV files to rebrand.

Icons

user client server api database cloud queue cache lock key gear bolt globe mobile mail file check cross warning

MCP + skill install (for AI agents)

Motion Diagram is designed to be driven by an AI agent over MCP. Install the skill into your agent with one command:

# auto-detect installed agents and register the MCP server
npx motion-diagram install-skill

# or target a specific client
npx motion-diagram install-skill --client cursor
npx motion-diagram install-skill --client claude
npx motion-diagram install-skill --client pi

This writes a motion-diagram entry into each agent's MCP config:

Agent Config file
Cursor ~/.cursor/mcp.json
Claude Desktop claude_desktop_config.json (OS-specific dir)
Pi ~/.pi/agent/mcp.json

Installing the npm package also runs this automatically (postinstall), so a plain npm install -g motion-diagram registers the skill for any detected agent. Restart your agent afterward to load the tools.

Manual config

Any MCP client works — point it at the motion-diagram-mcp command:

{
  "mcpServers": {
    "motion-diagram": {
      "command": "npx",
      "args": ["-y", "motion-diagram-mcp"]
    }
  }
}

Run the server directly for debugging:

npx motion-diagram-mcp        # or, from a clone: npm run mcp

Tools:

  • get_scene_schema — call first, returns authoring contract
  • render_motion_diagram — scene → MP4
  • render_carousel — scene → GIF/WebP slides (by node group)

Agent guidance: docs/AGENT_SKILL.md. Contributing: CONTRIBUTING.md.

Project layout

src/core/    parser, layout (dagre), timeline normalizer
src/scenes/  Remotion components (node, edge, pulse, composition, root)
src/render/  MP4 + carousel render orchestration
src/cli/     CLI entry
src/mcp/     MCP server
public/sfx/  bundled 8-bit sounds
docs/        SPEC, SCHEMA, AGENT_SKILL
examples/    sample scenes

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选