manim-web
MCP server for creating math animations with manim, enabling AI-driven real-time interactive creation and browser preview.
README
<div align="center">
🎬 manim-web
AI × Math Animation — 让 AI 成为你的动画导演
说一句话,AI 帮你写代码、渲染、预览 — 全程浏览器实时可见
pip install manim-web-mcp · 快速上手 · AI 使用指南 · API 参考
</div>
🎥 看看效果
<table align="center" width="100%"> <tr> <td align="center" width="50%"><b>🔵 图形变换</b></td> <td align="center" width="50%"><b>📐 数学公式</b></td> </tr> <tr> <td align="center"><img src="https://raw.githubusercontent.com/1Cyrvox/manim-mcpweb/main/docs/demo_shapes.gif" width="450" /></td> <td align="center"><img src="https://raw.githubusercontent.com/1Cyrvox/manim-mcpweb/main/docs/demo_math.gif" width="450" /></td> </tr> <tr> <td align="center"><sub><code>web_persistent_add("Circle → Square → Triangle")</code></sub></td> <td align="center"><sub><code>web_persistent_add("MathTex a²+b²=c²")</code></sub></td> </tr> <tr> <td align="center"><b>📈 函数图像</b></td> <td align="center"><b>✨ 综合动画</b></td> </tr> <tr> <td align="center"><img src="https://raw.githubusercontent.com/1Cyrvox/manim-mcpweb/main/docs/demo_graph.gif" width="450" /></td> <td align="center"><img src="https://raw.githubusercontent.com/1Cyrvox/manim-mcpweb/main/docs/demo_composite.gif" width="450" /></td> </tr> <tr> <td align="center"><sub><code>web_persistent_add("Axes + sin(x) + cos(x)")</code></sub></td> <td align="center"><sub><code>web_persistent_play("DrawBorderThenFill")</code></sub></td> </tr> </table>
💡 上面每个动画,AI 只需 3 行 MCP 调用就能生成
web_persistent_start(project="demo") # 🚀 启动
web_persistent_add(code="c = Circle(radius=1, color=BLUE)") # 🎨 创建图形
web_persistent_add(code="self.play(Create(c))") # ▶️ 播放动画
web_persistent_render_video() # 🎬 导出视频
⚡ 30 秒上手
pip install manim-web-mcp # 📦 内置优化版 manim,无需 pip install manim
manim-web-mcp # 🚀 启动!浏览器自动打开预览
<details> <summary>📋 系统依赖</summary>
- Python 3.12+
- ffmpeg — 视频编码
- Cairo + Pango — 矢量渲染 & 文字
- TeX Live(可选)— LaTeX 公式渲染
</details>
🔥 为什么选 manim-web
| manim-web | 传统 CLI | VSCode 插件 | 在线 Playground | |
|---|---|---|---|---|
| AI 驱动 | ✅ MCP 协议 | ❌ | ❌ | ❌ |
| 浏览器实时预览 | ✅ WebSocket | ❌ | 仅 VSCode | ✅ |
| 会话跨对话保持 | ✅ 持久化 | ❌ | ❌ | ❌ |
| 多项目并行 | ✅ 独立场景 | ❌ | ❌ | ❌ |
| 沙箱安全 | ✅ 三级策略 | ❌ | ❌ | ❌ |
🛠 MCP 工具一览
| 🔥 核心 | 说明 |
|---|---|
web_persistent_start |
启动项目 + 打开浏览器预览 |
web_persistent_add |
执行 manim 代码(最常用) |
web_persistent_play |
快捷播放动画 |
web_persistent_mobject |
快捷创建图形 |
| 👁 预览 | 说明 |
|---|---|
web_persistent_frame |
查看当前帧 |
web_persistent_capture |
高质量截图 |
web_persistent_render_video |
渲染 mp4 / gif / webm |
| ⚙️ 管理 | 说明 |
|---|---|
web_persistent_export |
导出 .py 文件 |
web_persistent_reset |
重置场景 |
web_persistent_status |
查询状态 |
web_persistent_list |
列出所有项目 |
web_persistent_stop |
停止会话 |
📖 MCP 工具参考 · manim API 参考 — 74 动画 + 141 图形 + 40 缓动 + 149 工具
🔒 沙箱安全
| 级别 | 文件 I/O | import | exec/eval | 用途 |
|---|---|---|---|---|
strict |
❌ | ❌ | ❌ | 默认,最安全 |
relaxed |
仅项目目录 | 白名单 | ❌ | 需要读写文件 |
full |
✅ | ✅ | ✅ | 完全信任 + 危险检测 |
📚 文档
| 📖 | 链接 |
|---|---|
| 🚀 快速上手 | 5 分钟入门 |
| 🤖 AI 使用指南 | MCP 标准流程 |
| 🔧 工具参数 | MCP 工具参考 |
| 📐 API 签名 | manim API 参考 |
| 🏗 架构设计 | 模块架构 |
| 📝 更新日志 | 版本历史 |
| ❓ 常见问题 | 故障排查 |
<div align="center">
🤝 欢迎共建 · 提交 Issue · 代码贡献 · 行为准则
📄 MIT License · 上游 manim (MIT) · 安全漏洞
</div>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.