Manim

Provides an MCP server to compile Manim code and download videos via HTTP API or MCP clients.
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

This MCP server provides two modes for compiling and serving Manim animations: an HTTP API server for REST interactions and a standard MCP server for compatibility with MCP clients. It supports compiling Manim code into videos, downloading the resulting videos, and managing workflows through LangGraph integration, all secured with token-based authentication.

How to use

You interact with the server through an MCP client to compile Manim code and retrieve the resulting videos. Start the HTTP API server to access REST endpoints for compilation and download, or run the standard MCP server to connect with clients that expect an MCP-compatible endpoint. Use the provided tools to submit Manim Python code, specify the scene to render, and then fetch the finished video by its ID. Authentication is enforced with JWT tokens, and you can leverage LangGraph for workflow orchestration.

How to install

Prerequisites you need before installing: Python 3.8 or newer, Manim Community Edition (v0.19.0 or later), FFmpeg, and the required Python packages listed in the project requirements.

Step 1: Prepare your environment. Create and activate a virtual environment.

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Step 2: Install dependencies. Install the Python packages from the requirements file and then install Manim.

pip install -r requirements.txt
pip install manim

Step 3: Configure environment variables for security and token management. Create a .env file with at least the following keys.

SECRET_KEY=your-secret-key-here
ACCESS_TOKEN_EXPIRE_MINUTES=30

Step 4: Start the server. You have two options depending on how you want to run the service.

# Option 1: Use the startup script (recommended)
./start_server.sh

# Option 2: Run the server directly with uvicorn
uvicorn app.server:app --reload

Configuration

Set up environment variables in a .env file. The common keys include SECRET_KEY and ACCESS_TOKEN_EXPIRE_MINUTES. You can extend this with other tokens or secrets as needed for your deployment.

Security notes

Use HTTPS in production to protect data in transit. Enforce authentication for all endpoints, validate and sanitize inputs, and configure appropriate cross-origin resource sharing (CORS) policies based on your use case.

Examples of common tasks

Compile Manim code, specify the scene, and receive a video ID you can download later.

Notes on running

The server exposes a REST API and an MCP-compatible interface. The REST API is useful for testing and web integrations, while the MCP interface supports traditional MCP clients.

Available tools

manim_compile

Compile Manim code into a video. Submit code and optional scene name to render and receive a video ID.

video_download

Download a previously compiled video by its ID.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational