Manim MCP logo

Manim MCP

by wstcpyt

A Docker-based environment for creating mathematical animations with Manim, featuring both a CLI interface and a web API with Model Context Protocol (MCP) support for AI assistants.

View on GitHub

Last updated: N/A

What is Manim MCP?

Manim MCP is a project that provides a containerized environment for creating mathematical animations using Manim. It offers both a command-line interface (CLI) and a web API for interacting with Manim, including integration with AI assistants through the Model Context Protocol (MCP).

How to use Manim MCP?

To use Manim MCP, you can either pull the prebuilt Docker image or build it locally. After installation, you can create animations using the CLI mode by placing Python scripts in the animations directory and running the docker compose run manim command. Alternatively, you can use the API mode by starting the API server and accessing the API documentation at /docs.

Key features of Manim MCP

  • Containerized Manim Environment

  • Web API for Animation Management

  • MCP Integration for AI Assistants

  • File Management (Upload/Download)

  • Custom LaTeX Support

Use cases of Manim MCP

  • Creating mathematical animations for educational purposes

  • Generating visualizations for presentations

  • Automating animation creation with AI assistants

  • Developing interactive learning tools

  • Producing high-quality videos with custom LaTeX formulas

FAQ from Manim MCP

How do I run animations in CLI mode?

Create a Python file in the animations directory and run docker compose run manim -pql animations/example.py ExampleScene.

How do I access the API documentation?

Start the API server with docker compose up -d manim-api and access the documentation at http://localhost:8000/docs.

What are the different quality settings?

The available quality settings are -ql (480p, 15fps), -qm (720p, 30fps), -qh (1080p, 60fps), and -qk (1440p, 60fps).

How can I mount custom directories?

Modify the docker-compose.yml file to add a volume mapping, e.g., volumes: - ./my_custom_dir:/manim/custom.

What should I do if I encounter issues?

Check the Manim documentation, search existing GitHub issues, and create a new issue with details about your problem.