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!
Download the latest
.mcpbfile from ReleasesDouble-click the
.mcpbfile (or drag-and-drop into Claude Desktop)Follow the installation prompts in Claude Desktop
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
Install from Local Clone
Using uvx (Isolated environments)
This will install:
manim-mcp- The MCP server commandmanim- The Manim Community Edition librarymcp- The Model Context Protocol SDK
Prerequisites
Python 3.10 or higher
Additional System Dependencies
Manim requires some system dependencies. Install them based on your OS:
macOS:
Ubuntu/Debian:
Windows:
Install Chocolatey
Run:
choco install manimce
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:
That's it! Just one line. No paths, no environment variables needed.
Alternative: Using uvx (for direct GitHub installation without pip)
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
Example 2: Mathematical Equation
Example 3: Graph Visualization
Example 4: Geometric Transformation
Example 5: Calculus Visualization
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 classscene_name(required): Name of the Scene class to renderquality(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 animationequation- Mathematical equationgraph- Function graphgeometry- Geometric shapestransformation- Shape transformationscalculus- 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
Check that the configuration file path is correct
Verify the Python path in the configuration
Restart Claude Desktop completely
Check Claude Desktop logs for errors
Manim Rendering Errors
Ensure all system dependencies are installed (ffmpeg, LaTeX, Cairo)
Test Manim independently:
manim --versionCheck the error messages returned by the tool
Import Errors
Verify the package is installed:
pip show manim mcpCheck that PYTHONPATH includes the
srcdirectoryTry reinstalling:
pip install -e . --force-reinstall
Development
Building MCPB Bundles
To create a .mcpb bundle for distribution:
Install MCPB CLI:
npm install -g @anthropic-ai/mcpbEnsure icon.png exists (512x512 PNG file)
Build the bundle:
./build_mcpb.sh # macOS/Linux # OR build_mcpb.bat # Windows # OR mcpb pack # Direct CLITest the bundle:
Double-click the generated
.mcpbfileOr drag-and-drop into Claude Desktop
Verify both tools work correctly
For complete build instructions, see MCPB_BUILD.md.
Project Structure
Running Tests
Code Formatting
Learn More
License
See LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Credits
Manim Community - Mathematical Animation Engine
Anthropic - Model Context Protocol and Claude
3Blue1Brown - Original Manim creator