Chalkcast

io.github.FredMichelPublished by GitHub account FredMichelv0.1.0Updated Oct 29, 2026

Author, render and visually verify Manim math animations from natural language

VerifiedSTDIODesktop onlyDeveloper ToolsMedia & DesignAI & ML

Overview

AI-generated overview

Chalkcast lets an assistant author, measure, fix and render Manim math animations, returning a video plus a structured verdict instead of a blind script.

What you can do
  • Open, inspect and close project sessions, with quality, frame rate and theme settings
  • Add scenes, parameters, LaTeX equations, plots, shaded areas, Riemann sums, text and shapes
  • Edit the timeline and objects: update or remove objects with cascade, remove steps, tween parameters
  • Verify a scene without video by measuring framing, collisions, legibility, timing, compile and curve fidelity, then auto-repair mechanical problems
  • Render a scene to video with sampled frames, or take a fast single-frame preview, and export a GIF
  • Check which providers (Manim, LaTeX, ffmpeg, vision) are installed and what degrades without them
When to use it
Useful when you want animated math or science explainers produced from natural language and want the result checked on screen rather than trusting a script that merely renders. Aimed at educators, students and STEM content creators who would rather not hand-write Manim or LaTeX.
Requirements
Runs locally as a Python package (Python 3.11 or newer) over stdio; the render extra brings Manim and a bundled ffmpeg, and equations also need a LaTeX distribution. On macOS, cairo and pkg-config must be installed first. A doctor command checks Manim, LaTeX, dvisvgm, physics.sty and ffmpeg. No accounts, API keys or environment variables are declared.
Before you install
Rendering writes video and GIF files to the local machine and can be slow or resource-heavy. Export is blocked while error obligations remain and refuses renders older than the latest edit. The project is labelled alpha, and vision-based intent verification is not yet available.

Installation

In SourceWeft

  1. Open Chalkcast 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

Chalkcast

Describe a concept. Get a verified animated explainer.

Chalkcast is an MCP server that lets an agent author, render, and visually verify Manim animations — so the output is a video that's actually correct on screen, not a plausible script that renders wrong.

[license] [python] [status] [MCP]

[Chalkcast showcase]

One continuous animation, authored, verified and rendered entirely through the MCP server (passed on the first render): a Fourier series grows harmonic by harmonic into a square wave, and the Gibbs overshoot (the true one, ≈ 1.179) stays at the edges. Reproduce it with python examples/showcase.py.


Who it's for

  • Educators & students — turn "explain the Fourier series" into a clean animated explainer, without learning Manim or writing LaTeX by hand.
  • STEM content creators — produce 3Blue1Brown-style animations in minutes instead of hours of coding and debugging renders.
  • Agents & tooling — a typed, verifiable MCP surface an AI can drive end to end, with a verdict it can act on instead of a video it can't inspect.

Why another Manim MCP?

Existing Manim MCP servers give the agent one tool: run this code, return the video. The agent writes Manim blind and hopes — but Manim is unforgiving (a LaTeX typo, an off-screen label, two terms overlapping, a transition firing before its target exists). The video "renders" and is still wrong, and the agent has no way to know.

Chalkcast gives the agent eyes and a correction loop:

author scene ──► render ──► inspect (verification lanes) ──► verdict     ▲                                                          │     └──────────────── fix obligations ◄──── needs_fix ─────────┘

Every render returns evidence (the artifact + sampled frames) and a structured verdict. Problems become obligations that block export until resolved. See docs/SPEC.md for the full design.

Install

One command (Claude Code; needs uv):

bash
claude mcp add chalkcast -- uvx --python 3.12 --from "chalkcast[render]" chalkcast serve

--python 3.12 matters: Chalkcast needs Python ≥ 3.11, and uv downloads one if the system Python is older (macOS ships 3.9). Then just ask in natural language.

Or with pip, into any Python ≥ 3.11 environment:

bash
pip install "chalkcast[render]"claude mcp add chalkcast -- chalkcast serve

[render] brings Manim and a bundled ffmpeg. Equations also need a LaTeX distribution. chalkcast doctor checks everything and prints the exact fix command for your OS:

bash
chalkcast doctor               # Manim / LaTeX / dvisvgm / physics.sty / ffmpegchalkcast demo                 # builds + verifies + renders the demo scene

macOS: pycairo (pulled in by Manim) has no macOS wheel and builds from source, so it needs brew install cairo pkg-config first. On a machine where Manim's native deps were built by hand, see scripts/dev-env.sh and scripts/serve.sh.

What the agent gets

GroupTools
Sessionopen_project · inspect_project · close_project
Authoringadd_scene · add_equation · add_plot · add_area · add_riemann · add_text · add_shape · add_parameter · add_step
Editingupdate_object · remove_object (cascade) · remove_step
Verificationinspect_render (measured, no video) · fix_scene (auto-repair)
Renderingrender_scene · render_frame
Exportexport_gif (blocked while error obligations remain)
Discoveryinspect_environment
  • Continuous animation: add_parameter("t"), use t in plot expressions or shape anchors (at_x="t"), then add_step("tween", param="t", value=6.28). Curves, areas and anchored dots follow it frame by frame. with_previous=True plays a step at the same time as the one before.
  • Fail fast, nothing implicit: expressions are validated when authored (an AST whitelist: x, math functions, np.<fn>, declared parameters). Colors, ranges, step targets, timeline order, and arguments that don't apply to a shape or step are rejected with a message saying what to do. Edits are all-or-nothing. Side effects (cascade removals, regrouped steps, redeclared parameters, default ranges) are reported in the result. export_gif refuses a render that predates the latest edit. Thirty-two independent audits (22, then 17, 14, 8, 4, 9, 4, 7, 5, 5, 7, 8, 5, 8, 7, 7, 10, 4, 5, 5, 8, 7, 7, 5, 7, 9, 7, 4, 10, 9, 7 and 6 findings, the last with no high-severity one; in the last thirteen, 9, 10, 8, 10, 9, 9, 9, 9, 9, 10, 8, 9 and 10 of 10 fresh explainers reached a correct GIF within two renders, and in the last one every verdict matched its frames; the last twenty-three built realistic explainers end to end and compared verdicts with frames, one of them over the real MCP stdio protocol) are pinned one test per finding in tests/test_ergonomics.py.
  • Faithful plots: dense sampling, curves split at jumps and poles (no invented risers or overshoot), clipping to the axes. A fidelity lane measures the drawn curve against the true function. Areas and Riemann sums are refused when they could not show the integral (function undefined or off the axes, y = 0 not visible).

How verification works

inspect_render builds the real Manim objects without encoding video (1–3 s) and measures them: exact bounding boxes, curve and axis ink, the drawn-vs-true error of every graph, and a strict LaTeX compile (Manim's batch mode silently "recovers" from LaTeX errors). Lanes: framing · collision · legibility · timing · compile · fidelity · range. fix_scene repairs the mechanical problems (moves, rescales, resampling) and leaves the rest as obligations for the agent.

Measured on labelled scenes (chalkcast bench, chalkcast bench --holdout N). Each held-out set was written and labelled (and checked frame by frame) by an author who never read the verifier. The first run of each set is the honest out-of-sample figure:

SetCasesFirst run: detection / false positivesBugs that run exposed
Held-out 139 (24 defective)95.8 % / 7.7 %over-strict safe margin; aliasing taken for a jump
Held-out 247 (31 defective)90.3 % / 12.8 %estimated noise after a compile error; straight arrows and box sides sampled only at their ends; equation size judged by box height
Held-out 344 (26 defective)96.2 % / 0 %an arrow's shaft was never sampled (only its tip)
Held-out 446 (25 defective)96.0 % / 0 %a label written during a zoom-in was excused as an intentional crop

After each set's bugs were fixed, every set (and the 40-case development set) scores 100 % / 0 %. From then on they are regression tests (tests/test_measured.py), not independent measures. Held-out 3 was written after the fixes for sets 1 and 2, and held-out 4 (continuous tweens, simultaneous beats, transforms, camera moves) after eleven ergonomics audits; each was run once, untouched. Held-out 4 is the current out-of-sample estimate.

Example (what the agent does)

open_project(theme="chalkboard")add_scene(title="Area under a parabola")add_text("Area under y = x^2", y=3)add_plot(functions=[{"expr":"x**2","color":"YELLOW"}], x_range=[0,2,1], y=-0.8)add_equation(r"\int_0^1 x^2 \, dx = \tfrac{1}{3}", y=2)add_step("write", targets=["text_1"])add_step("write", targets=["plot_1"])add_step("write", targets=["equation_1"])add_step("highlight", targets=["equation_1"])inspect_render()    # -> measured verdict in ~2 s, no videofix_scene()         # -> repairs framing / collision / fidelity if neededrender_scene()      # -> video + frames + verdict + obligationsexport_gif()        # -> shareable GIF (blocked if error obligations remain)

Status

Alpha. Scientific correctness is tested numerically (tests/test_science.py): shaded areas equal their integrals, Riemann rectangles their sum, drawn curves their function (including sin 30x), and the Gibbs peak its theoretical value. On PyPI and the MCP Registry (io.github.FredMichel/chalkcast). Vision-based intent verification is next (see docs/SPEC.md).

License

MIT.

Source: README.md at commit 082b28a

Tools

21

open_project

Start a project session and make it the current one (later calls without project_id target it). quality: low (480p) | medium (720p) | high (1080p). fps: frame rate, default 15/30/60 for low/medium/high. theme: chalkboard|whiteboard|dark.

Parametersfpsthemequality

inspect_project

Current project state: scenes, objects, steps, parameters and open obligations.

Parametersproject_id

close_project

Release a project session (default: the current one). If others are open, the most recently opened becomes current; the result names it.

Parametersproject_id

add_scene

Append a scene to the project; it becomes the default target of later calls without scene_id. The title is a label for you (it is not drawn: use add_text).

Parameterstitleproject_id

add_parameter

Declare a continuous scene parameter (e.g. time t). Use it by name in plot expressions or shape anchors (expr='sin(x - t)'), then animate it smoothly with add_step(kind='tween', param=name, value=...). Curves, areas and anchored shapes that use it are redrawn every frame.

Parametersnamerequiredvaluescene_idproject_id

add_equation

Add a LaTeX equation (math mode, e.g. tex=r'e^{i\pi}+1=0'). Dirac notation (\ket{n}, \bra{n}, \braket{a}{b}, \expval{A}) and physics macros work.

Parametersxytexrequiredcolorscalescene_idproject_id

add_plot

Add axes with functions of x. Each function: {'expr': 'sin(x)', 'color': 'YELLOW'}. Expressions use x, bare math functions (sin, exp, sqrt, sign, ...), np.<fn>, and declared scene parameters; they are validated now. Sampling is adaptive (dense, no spline overshoot on jumps, curves split at poles and clipped to the axes); optional overrides: 'smooth': bool, 'dx': step. x_label/y_label are LaTeX. Defaults: x_range [-5, 5, 1], y_range [-3, 3, 1]; a [min, max] range gets a readable tick step (4-8 ticks, starting at min, or at 0 if 0 is inside the range); the result echoes the ranges used. Curves without a color get distinct colors suited to the theme. The axes are centred at (x, y); labels hang off them. Without functions you get bare axes.

Parametersxywidthheightx_labelx_rangey_labely_rangescene_idfunctionsproject_idshow_numbers

add_text

Add a title/label/callout (plain text, any language). The rendered size is font_size x scale.

Parametersxytextrequiredcolorscalescene_idfont_sizeproject_id

add_shape

Add primitive geometry: circle|square|rectangle|triangle|arrow|dot|line, centred at (x, y) (default 0, 0). size (default 1): circle = diameter, square = side, triangle = circumradius, dot = 10 x radius (minimum radius 0.05), line/arrow = length (horizontal). rectangle: width x height (default 1 x 0.5) instead of size. line/arrow: give x1,y1,x2,y2 for an explicit segment (any direction) instead of size/x/y. Anchor in a plot's coordinates with plot_id + at_x + at_y expressions instead of x/y (they may use scene parameters, so a dot can track <x>(t) while a tween runs). Arguments that do not apply to the chosen shape are rejected.

Parametersxyx1x2y1y2at_xat_ysizecolorshapewidth+4 more

add_area

Shade the area between a plotted function and the x-axis on [x_min, x_max] (the integral). [x_min, x_max] must lie within the plot's x_range, y = 0 must be on the axes, and the function must be defined and inside y_range there (otherwise an error says what to widen). It follows its plot (move the plot, not it).

Parameterscolorx_maxx_minopacityplot_idrequiredscene_idproject_idfunction_index

add_riemann

Riemann rectangles (left endpoints, fill opacity 0.6, one color) under a plotted function on [x_min, x_max] within the plot's x_range; (x_max - x_min)/dx must be a whole number, y = 0 must be on the axes and the function inside y_range there. Smaller dx = finer; transform coarse->fine to show convergence. They follow their plot.

Parametersdxcolorx_maxx_minplot_idrequiredscene_idproject_idfunction_index

add_step

Append a timed beat. kind: write|transform|highlight|fade|camera_move|wait|tween. write/highlight/fade: all targets animate together, over `duration` (a plot's axes and curves are drawn together; highlight is a brief 1.2x pulse in the theme's accent color). An object driven by a parameter cannot be written, highlighted or faded in the same beat as a tween of that parameter (Manim freezes it). transform: one target morphs into `to` (the target keeps its id afterwards). camera_move: zoom is absolute (1 = the full frame, 2 = twice as close); focus_x/ focus_y recentre the camera, omitted = keep the current centre. tween: animate scene parameter `param` to `value` continuously (linear in time). with_previous=true plays this step at the same time as the previous one (e.g. move a curve and a dot together); not after a wait. `note` is a label for you (not drawn). Arguments that do not apply to `kind` are rejected.

Parameterstokindrequirednotezoomparamvaluefocus_xfocus_ytargetsdurationscene_idproject_id+1 more

update_object

Change an existing object in place (only the fields you pass). Use it to reposition, rescale, recolor, retype text/LaTeX, replace plot functions or ranges, or adjust an area/Riemann interval -- no need to rebuild the scene. Explicit line/arrow segments move by their endpoints x1, y1, x2, y2. Everything is validated first: on error nothing changes. A plot's color is the default color of its curves without one (axes keep the theme ink). Areas, Riemann sums and anchored shapes follow their plot: move the plot instead.

Parametersxydxx1x2y1y2texat_xat_ysizetext+17 more

remove_object

Delete an object. If steps or other objects (areas, anchored shapes) depend on it, nothing is removed unless cascade=true, which also removes the dependent objects and takes the removed ids out of steps (a step left with nothing to animate is deleted; other targets of a shared step stay). The reply lists exactly what was deleted or changed, and any object left without a step.

Parameterscascadescene_idobject_idrequiredproject_id

remove_step

Delete one step of the timeline (later steps are renumbered). A with_previous step that was joined to the removed one starts its own beat; it is listed in regrouped_steps.

Parametersscene_idproject_idstep_indexrequired

inspect_render

Verify a scene WITHOUT rendering video (~1-2 s): builds the real Manim objects and measures them -- LaTeX/expression compile errors, off-screen objects, label collisions, curve fidelity (drawn vs true function), legibility, timing. Call it after authoring and fix what it reports before render_scene.

Parametersscene_idproject_id

fix_scene

Automatically repair measured problems that have a mechanical fix: objects pushed back inside the frame, labels moved to the nearest free spot, curve sampling corrected, too-small text enlarged. Repeats measure->fix up to max_rounds, reports every change, and lists what still needs the author.

Parametersscene_idmax_roundsproject_id

render_scene

Render one scene to video + sampled frames, then run verification lanes. The scene is measured first; if it cannot compile, no render is attempted.

Parametersscene_idproject_id

render_frame

Fast single-still preview of a scene (last frame).

Parametersscene_idproject_id

export_gif

Export the latest render of a scene as a shareable GIF, resampled to `width` pixels wide at `fps` (defaults keep GIFs small). Blocked by open error obligations of that render and by edits made since it.

Parametersfpswidthscene_idproject_id

inspect_environment

Which providers are present (Manim, LaTeX, ffmpeg, vision) and what degrades without each.

Takes no parameters.

Version history

1
  1. v0.1.0LatestOct 26, 2026

Score

90% 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
  • 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 listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts