Manim MCP Server

Manim MCP Server

Enables Claude to create mathematical animation videos using Manim, allowing visualization of complex mathematical concepts like equations, graphs, geometric transformations, and calculus through programmatically generated animations.

Category
访问服务器

README

Manim MCP Server

A Model Context Protocol (MCP) server that enables Claude Desktop to create mathematical animations using Manim (Mathematical Animation Engine).

This server allows Claude to generate video artifacts of mathematical explanations, making it easy to visualize complex mathematical concepts through animations.

Features

  • Create Math Animations: Generate mathematical animations by providing Manim scene code
  • Multiple Quality Options: Render videos in low (480p), medium (720p), or high (1080p) quality
  • Example Templates: Get example code for common animation types (equations, graphs, geometry, etc.)
  • Easy Integration: Works seamlessly with Claude Desktop through MCP

Installation

Option 1: MCPB Bundle (Easiest - One-Click Install)

For end users - Recommended!

  1. Download the latest .mcpb file from Releases
  2. Double-click the .mcpb file (or drag-and-drop into Claude Desktop)
  3. Follow the installation prompts in Claude Desktop
  4. Install system dependencies (see below)

MCPB bundles provide:

  • ✅ One-click installation in Claude Desktop
  • ✅ No manual configuration required
  • ✅ Automatic updates
  • ✅ Easy uninstall

Building MCPB yourself: See MCPB_BUILD.md for instructions on creating your own .mcpb bundle.

Option 2: Direct Install (For Developers)

Install from GitHub

pip install git+https://github.com/Stelath/manim-mcp.git

Install from Local Clone

git clone https://github.com/Stelath/manim-mcp.git
cd manim-mcp
./install.sh  # On macOS/Linux
# OR
install.bat   # On Windows

Using uvx (Isolated environments)

uvx --from git+https://github.com/Stelath/manim-mcp.git manim-mcp

This will install:

  • manim-mcp - The MCP server command
  • manim - The Manim Community Edition library
  • mcp - The Model Context Protocol SDK

Prerequisites

Additional System Dependencies

Manim requires some system dependencies. Install them based on your OS:

macOS:

brew install py3cairo ffmpeg
brew install --cask mactex-no-gui

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
sudo apt-get install texlive texlive-latex-extra

Windows:

For detailed installation instructions, see the Manim installation guide.

Configuration

MCPB Users (Option 1)

No manual configuration needed! The .mcpb bundle handles configuration automatically.

Manual Configuration (Option 2 - For Direct Install Only)

If you installed via pip/uvx, add this server to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Linux: ~/.config/Claude/claude_desktop_config.json

Add the following to your configuration:

{
  "mcpServers": {
    "manim": {
      "command": "manim-mcp"
    }
  }
}

That's it! Just one line. No paths, no environment variables needed.

Alternative: Using uvx (for direct GitHub installation without pip)

{
  "mcpServers": {
    "manim": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Stelath/manim-mcp.git",
        "manim-mcp"
      ]
    }
  }
}

Restart Claude Desktop

After updating the configuration, restart Claude Desktop for the changes to take effect.

Usage

Once configured, you can ask Claude to create mathematical animations. Here are some examples:

Example 1: Simple Text Animation

Create a Manim animation that displays "Hello, Mathematics!" and then fades out.

Example 2: Mathematical Equation

Create a Manim animation showing Euler's identity: e^(iπ) + 1 = 0
Animate the equation being written, then highlight it.

Example 3: Graph Visualization

Create a Manim animation of a sine wave being drawn on a coordinate system,
with the equation y = sin(x) labeled.

Example 4: Geometric Transformation

Create a Manim animation showing a circle transforming into a square,
then into a triangle, demonstrating geometric morphing.

Example 5: Calculus Visualization

Create a Manim animation showing the area under the curve y = x^2 from 0 to 2,
illustrating the concept of integration.

Available Tools

The server exposes the following MCP tools:

create_math_animation

Create and render a mathematical animation.

Parameters:

  • scene_code (required): Python code defining a Manim Scene class
  • scene_name (required): Name of the Scene class to render
  • quality (optional): Render quality - "low", "medium" (default), or "high"
  • output_filename (optional): Custom filename for the output video

Returns: Path to the generated video file

get_manim_example

Get example Manim code for common animation types.

Parameters:

  • example_type (required): One of:
    • basic_text - Simple text animation
    • equation - Mathematical equation
    • graph - Function graph
    • geometry - Geometric shapes
    • transformation - Shape transformations
    • calculus - Calculus visualization

Returns: Example code and usage instructions

Output Location

Generated videos are saved to: {system_temp_dir}/manim_mcp_output/

  • macOS/Linux: /tmp/manim_mcp_output/
  • Windows: C:\Users\{username}\AppData\Local\Temp\manim_mcp_output\

Troubleshooting

Server Not Appearing in Claude Desktop

  1. Check that the configuration file path is correct
  2. Verify the Python path in the configuration
  3. Restart Claude Desktop completely
  4. Check Claude Desktop logs for errors

Manim Rendering Errors

  1. Ensure all system dependencies are installed (ffmpeg, LaTeX, Cairo)
  2. Test Manim independently: manim --version
  3. Check the error messages returned by the tool

Import Errors

  1. Verify the package is installed: pip show manim mcp
  2. Check that PYTHONPATH includes the src directory
  3. Try reinstalling: pip install -e . --force-reinstall

Development

Building MCPB Bundles

To create a .mcpb bundle for distribution:

  1. Install MCPB CLI:

    npm install -g @anthropic-ai/mcpb
    
  2. Ensure icon.png exists (512x512 PNG file)

  3. Build the bundle:

    ./build_mcpb.sh  # macOS/Linux
    # OR
    build_mcpb.bat   # Windows
    # OR
    mcpb pack        # Direct CLI
    
  4. Test the bundle:

    • Double-click the generated .mcpb file
    • Or drag-and-drop into Claude Desktop
    • Verify both tools work correctly

For complete build instructions, see MCPB_BUILD.md.

Project Structure

manim-mcp/
├── manifest.json         # MCPB manifest
├── icon.png             # Extension icon
├── src/
│   └── manim_mcp/
│       ├── __init__.py
│       ├── __main__.py
│       └── server.py    # Main MCP server implementation
├── pyproject.toml       # Package configuration
├── README.md
├── MCPB_BUILD.md       # MCPB build guide
└── LICENSE

Running Tests

pytest

Code Formatting

black src/
ruff check src/

Learn More

License

See LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Credits

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

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

官方
精选
Exa MCP Server

Exa MCP Server

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

官方
精选