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.
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!
- 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.
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 commandmanim- The Manim Community Edition librarymcp- The Model Context Protocol SDK
Prerequisites
- Python 3.10 or higher
- Claude Desktop
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:
- 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:
{
"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 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 --version - Check the error messages returned by the tool
Import Errors
- Verify the package is installed:
pip show manim mcp - Check that PYTHONPATH includes the
srcdirectory - Try 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/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.
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
- Manim Community - Mathematical Animation Engine
- Anthropic - Model Context Protocol and Claude
- 3Blue1Brown - Original Manim creator
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
E2B
Using MCP to run code via e2b.