Mcp Manimgl

io.github.daedalusPublished by GitHub account daedalusv0.1.2Updated Oct 25, 2026

MCP server exposing manimgl mathematical animation functionality as tools for LLMs

VerifiedSTDIODesktop onlyDeveloper ToolsMedia & Design

Overview

AI-generated overview

A local MCP server that lets an assistant build and render manimgl mathematical animations, including shapes, LaTeX, narration and background music.

What you can do
Create and configure scenes, set the camera and rendering config, and save or restore state or export the generated Python script. Add geometric shapes, lines, arrows, text and LaTeX, function graphs, coordinate systems, matrices and 3D objects. Move, scale, rotate, color and align those objects. Apply animations such as transform, fade, grow, rotate, write and move along a path. Add TTS narration and background music from audio or MIDI files, then render a video or save a single frame.
When to use it
Useful when you want an assistant to produce explanatory math or science animations as video, for example narrated lessons with LaTeX formulas and music, without writing manimgl code by hand.
Requirements
Runs locally as a Python package installed with pip, started over stdio. Rendering needs the render extra plus manimgl and its system dependencies (pangocairo, OpenGL). Audio needs ffmpeg and ffprobe; MIDI needs libfluidsynth3 and a system SoundFont. Narration uses gTTS, so network access is likely needed.
Before you install
Rendering writes video and frame files to paths you specify. Narration is generated through the gTTS online service, so narration text is sent to a third party. Background music and MIDI files are read from local paths. Rendering is compute-heavy and depends on working OpenGL and audio libraries.

Installation

In SourceWeft

  1. Open Mcp Manimgl in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

mcp-manimgl — MCP server exposing manimgl (Manim OpenGL) mathematical animation functionality as tools for LLMs.

[PyPI] [Python] [Ruff]

mcp-name: io.github.daedalus/mcp-manimgl

Install

bash
pip install mcp-manimgl

Optional extras:

bash
# For rendering (requires manimgl + system deps)pip install "mcp-manimgl[render]"
# For audio narration + MIDI music supportpip install "mcp-manimgl[audio]"

System Dependencies

DependencyRequired forInstall
ffmpeg + ffprobeAudio mixing, narration sync, music duckingapt install ffmpeg
libfluidsynth3MIDI file rendering to audioapt install libfluidsynth3
SoundFont (.sf2/.sf3)MIDI instrument soundsapt install fluidr3mono-gm-soundfont
pangocairo, OpenGLManim rendering engineSee manimgl docs

The server checks for non-Python dependencies at startup and reports any missing ones to stderr and via the mcp-manimgl://info resource.

Usage

MCP Server

bash
# Run with stdio transport (default for MCP)mcp-manimgl

In Claude Desktop / Cursor / MCP clients

Add to your mcp.json:

json
{  "mcpServers": {    "mcp-manimgl": {      "command": "mcp-manimgl"    }  }}

Tools

The server exposes these tool categories:

Scene Management

  • create_scene — Create/configure a new scene
  • clear_scene — Remove all elements
  • add_wait — Add wait/pause
  • set_camera — Configure camera
  • set_config — Set global rendering config
  • save_state / restore_state — State management
  • generate_scene_script — Get the generated Python script

Mobject Creation

  • add_circle, add_square, add_rectangle, add_polygon
  • add_line, add_arrow, add_dot
  • add_text, add_tex (LaTeX)
  • add_function_graph, add_parametric_curve
  • add_coordinate_system, add_vector
  • add_labeled_point, add_brace, add_number_line
  • add_decimal_number, add_matrix
  • add_3d_object (sphere, cube, torus, cone, cylinder)

Mobject Manipulation

  • move_to, shift, scale, rotate
  • set_color, set_opacity
  • next_to, align_to

Animations

  • animate_transform, animate_fade_in/out, animate_grow
  • animate_rotate, animate_scale, animate_shift
  • animate_indicate, animate_write, animate_set_color
  • animate_move_along_path, animate_group

Audio

  • add_narration — Generate TTS (gTTS) narration that plays at the current timeline position
  • add_background_music — Add background music from audio files or MIDI files (auto-rendered via FluidSynth). Supports volume control, looping, and sidechain ducking during narration.

Rendering

  • render_scene — Render to video (auto-mixes background music + narration with ducking)
  • save_frame — Save single frame
  • get_render_status — Check environment

Audio Features

Narration

python
# TTS narration at current timeline positionadd_narration("Shor's algorithm factors large numbers in polynomial time.")

Background Music

Accepts audio files (.mp3, .wav, .ogg) or MIDI files (.mid, .midi). MIDI files are rendered to audio using FluidSynth and the system SoundFont.

python
# From an audio fileadd_background_music("/path/to/music.mp3", volume=0.3, loop=True)
# From a MIDI file (auto-rendered)add_background_music("/path/to/classical.mid", volume=0.2)
# With ducking configurationadd_background_music(    "bach_chorale.mid",    volume=0.25,    loop=True,    duck_threshold="-20dB",    duck_ratio=6,    duck_attack=0.05,    duck_release=0.3,)

When both background music and narration are present, render_scene automatically:

  1. Renders the video without audio via manimgl
  2. Places the music track (looped if needed) at the configured volume
  3. Places each narration track at its timeline position
  4. Applies sidechain compression so music volume ducks during narration
  5. Composites everything into the final MP4 via ffmpeg

Example: Shor's Algorithm

A narrated animation explaining Shor's algorithm with LaTeX, 5 TTS narration tracks, and classical MIDI background music.

Watch: [YouTube]

MCP tool call sequence:

# 1. Configure scenecreate_scene(background_color="#0a0a2e", resolution="1920x1080", fps=30)
# 2. Background music (auto-loops to fill video duration)add_background_music("classical.mid", volume=0.25, loop=True)
# 3. Create mobjects + animate (5 sections)add_tex("Shor's Algorithm", font_size=72, color="#FFD700")add_tex("Integer Factorization on Quantum Computers", font_size=36, color="#88CCFF")animate_fade_in("m_...", run_time=1.5)# ... more shapes, LaTeX formulas, fade-ins, fade-outs ...
# 4. Narration at specific timeline positionsadd_narration("Shor's algorithm factors large numbers...")   # ~3.5sadd_narration("The factoring problem...")                     # ~18.5sadd_narration("Key insight: reduce factoring to period...")   # ~36.1sadd_narration("Quantum period finding uses superposition...") # ~55.4sadd_narration("Summary of Shor's algorithm...")               # ~76.3s
# 5. Render (auto-mixes video + narrations + ducked BGM)render_scene(output_path="data/Shors_Algorithm.mp4")

See the full scene script at shor_mcp.py in the repository root.

MIDI Rendering

MIDI files are rendered using pyfluidsynth with a system SoundFont. On Debian/Ubuntu:

bash
sudo apt install fluidr3mono-gm-soundfont libfluidsynth3pip install "mcp-manimgl[audio]"

Auto-discovered SoundFont paths:

  • /usr/share/sounds/sf3/ (.sf3)
  • /usr/share/sounds/sf2/ (.sf2)
  • /usr/share/fluidr3mono-gm-soundfont/

Development

bash
git clone https://github.com/dclavijo/mcp-manimgl.gitcd mcp-manimglpip install -e ".[test]"
# run testspytest
# formatruff format src/ tests/
# lint + type checkprospector --with-tool ruff --with-tool mypy src/
# security scansemgrep --config=auto --severity=ERROR src/
# find unused codevulture --min-confidence 90 src/

MCP

mcp-name: io.github.dclavijo/mcp-manimgl

Source: README.md at commit ddfe74f

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts