Manim MCP

by wstcpyt

18 stars
296 downloads
Not rated
GitHub

About

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.

Details

Author
wstcpyt
GitHub stars
18
Downloads
296
Categories
Other

- Containerized Manim environment for isolated, reproducible animations
- Web API for creating and managing animations via HTTP
- MCP integration enabling direct interaction with AI assistants
- File management: upload scripts and download generated animations
- Multiple quality settings from 480p preview to 1440p production
- Custom LaTeX support for mathematical formulas

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Manim MCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Docker and Docker Compose, then pull the prebuilt image or build locally. Use CLI mode with docker compose run manim or API mode with docker compose up -d manim-api; interact via HTTP endpoints or MCP integration.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "manim mcp": {
            "manim-mcp": {
                "command": "docker",
                "args": [
                    "pull",
                    "wstcpyt/manim-docker-mcp:latest"
                ]
            }
        }
    }
}

McpServers

{
    "manim-mcp": {
        "command": "docker",
        "args": [
            "pull",
            "wstcpyt/manim-docker-mcp:latest"
        ]
    }
}

Manim MCP

License: Apache 2.0
Docker
Manim
API

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.

📑 Overview

This project provides:

1. Containerized Manim Environment: Run Manim in an isolated, reproducible Docker environment
2. Web API: Create and manage Manim animations via HTTP requests
3. MCP Integration: Direct interaction with AI assistants like Claude
4. File Management: Upload scripts and download generated animations

🚀 Quick Start

Prerequisites

- Docker and Docker Compose installed on your system

Installation

Option 1: Use the Prebuilt Image (Recommended)

Simply pull the prebuilt image from Docker Hub:

docker pull wstcpyt/manim-docker-mcp:latest

Then run it with docker-compose:

docker compose up -d

Option 2: Build Locally

1. Clone the repository:

   git clone https://github.com/YOUR_USERNAME/manim-docker-mcp.git
cd manim-docker-mcp

2. Build the Docker images:

   docker compose build

Usage

CLI Mode

Create a Python file in the animations directory (see example below), then run:

docker compose run manim -pql animations/example.py ExampleScene

API Mode

Start the API server:

docker compose up -d manim-api

Access the API documentation at http://localhost:8000/docs

🎬 Creating Animations

Basic Example

Create a file animations/example.py:

from manim import *

class CircleToSquare(Scene):
def construct(self):
circle = Circle()
circle.set_fill(BLUE, opacity=0.5)

square = Square()
square.set_fill(RED, opacity=0.5)

self.play(Create(circle))
self.wait()
self.play(Transform(circle, square))
self.wait()

Running the Animation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.