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.
- 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
For end users - Recommended!
- Download the latest
.mcpbfile from Releases - Double-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.
Install from GitHub
pip install git+https://github.com/Stelath/manim-mcp.gitInstall from Local Clone
git clone https://github.com/Stelath/manim-mcp.git
cd manim-mcp
./install.sh # On macOS/Linux
# OR
install.bat # On WindowsUsing uvx (Isolated environments)
uvx --from git+https://github.com/Stelath/manim-mcp.git manim-mcpThis will install:
manim-mcp- The MCP server commandmanim- The Manim Community Edition librarymcp- The Model Context Protocol SDK
- Python 3.10 or higher
- Claude Desktop
Manim requires some system dependencies. Install them based on your OS:
macOS:
brew install py3cairo ffmpeg
brew install --cask mactex-no-guiUbuntu/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-extraWindows:
- Install Chocolatey
- Run:
choco install manimce
For detailed installation instructions, see the Manim installation guide.
No manual configuration needed! The .mcpb bundle handles configuration automatically.
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"
]
}
}
}After updating the configuration, restart Claude Desktop for the changes to take effect.
Once configured, you can ask Claude to create mathematical animations. Here are some examples:
Create a Manim animation that displays "Hello, Mathematics!" and then fades out.
Create a Manim animation showing Euler's identity: e^(iπ) + 1 = 0
Animate the equation being written, then highlight it.
Create a Manim animation of a sine wave being drawn on a coordinate system,
with the equation y = sin(x) labeled.
Create a Manim animation showing a circle transforming into a square,
then into a triangle, demonstrating geometric morphing.
Create a Manim animation showing the area under the curve y = x^2 from 0 to 2,
illustrating the concept of integration.
The server exposes the following MCP tools:
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 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
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\
- 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
- Ensure all system dependencies are installed (ffmpeg, LaTeX, Cairo)
- Test Manim independently:
manim --version - Check the error messages returned by the tool
- Verify the package is installed:
pip show manim mcp - Check that PYTHONPATH includes the
srcdirectory - Try reinstalling:
pip install -e . --force-reinstall
To create a .mcpb bundle for distribution:
-
Install MCPB CLI:
npm install -g @anthropic-ai/mcpb
-
Ensure icon.png exists (512x512 PNG file)
-
Build the bundle:
./build_mcpb.sh # macOS/Linux # OR build_mcpb.bat # Windows # OR mcpb pack # Direct CLI
-
Test the bundle:
- Double-click the generated
.mcpbfile - Or drag-and-drop into Claude Desktop
- Verify both tools work correctly
- Double-click the generated
For complete build instructions, see MCPB_BUILD.md.
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
pytestblack src/
ruff check src/See LICENSE file for details.
Contributions are welcome! Please feel free to submit issues or pull requests.
- Manim Community - Mathematical Animation Engine
- Anthropic - Model Context Protocol and Claude
- 3Blue1Brown - Original Manim creator