tafel

tafel

MCP server that lets Claude Code create explainer videos from plain English requests by writing and rendering manim animations locally, then publishing the result as a shareable artifact.

Category
访问服务器

README

Tafel

An MCP server for Claude Code that turns "explain X with an animation" into a rendered explainer video on a chalkboard-style viewer page: the video plays muted on a loop, with a title, a summary and detailed, click-to-seek explanation blocks beneath it. Claude publishes the page as a claude.ai artifact, so you get a shareable link - no local file to manage.

Claude writes the animation code; your machine renders it.

Example

"explain how Fourier series build a square wave from sine waves, with an animation"

Fourier series building a square wave, 25 terms, showing the Gibbs overshoot

Final frame above - ▶ watch the full render to see it build up: one odd harmonic added at a time, the running sum snapping closer to a dashed target square wave with each term, the formula at the top growing in matching colors, ending on 25 terms and the Gibbs overshoot that never goes away. Rendered end-to-end from that one sentence - full interactive version (with the synced explanation blocks) here.

Why it exists

Claude is a text model: on its own it can describe how a Fourier series or a TCP handshake works, or sketch a single static diagram - it cannot output a video, and generating even one genuinely coherent image showing motion or a process over time is out of reach. Tafel closes that specific gap. Claude writes a manim scene - code, which it's good at - and manim renders that code into real video frames locally. For anything where a moving picture explains more than words or a still image (a process unfolding, a wave building term by term, state changing over time), that's a capability Claude doesn't otherwise have.

Why it's cheap

AI video generators (Sora, Veo, Runway, Pika, ...) generate pixels directly: the model outputs the video itself, frame by frame, so cost and time scale with duration and resolution - a few seconds of video can cost real money and take minutes, every single time, even for small tweaks.

Tafel doesn't generate video at all. Claude only writes a manim Python script - a few hundred tokens of code describing shapes, text, and motion - plus the title/summary/ explanation text. Manim (a deterministic, open-source animation engine, the same one behind 3Blue1Brown's videos) then renders that script into actual pixels locally, using ffmpeg/cairo/pango on your own machine. The model never sees or produces a single frame.

Consequences:

  • Cost is bounded by text, not video - a 30s clip and a 3-minute deep dive cost roughly the same in tokens; only your local render time differs.
  • Iteration is nearly free - "slow down step 3" or "make the arrows curved" is a small code edit, not a full pixel regeneration from a prompt.
  • Rendering is free and unlimited - it's your CPU/GPU, not a metered API, so there's no per-render fee and no external service dependency once the Python packages are installed.
  • Fully offline after install - no network calls happen during a render; everything runs locally except the one Claude Code conversation.

Requirements

  • macOS or Linux (Windows: install inside WSL2 and follow the Linux steps there)
  • Claude Code
  • Optional: LaTeX for mathematical formulas (several GB - see Troubleshooting)

Install

Unpack this folder anywhere permanent (e.g. ~/Documents/tafel), then:

cd tafel
./install.sh

The script installs the native dependencies (ffmpeg, cairo, pango) via Homebrew on macOS or your Linux package manager (apt/dnf/pacman), installs uv if missing, and registers the server with Claude Code as tafel (user scope, all projects). uv resolves the right Python version and the project's Python packages itself - no manual venv or Python install needed.

Manual equivalent, if you prefer:

# macOS
brew install ffmpeg cairo pango uv
# Linux (Debian/Ubuntu)
sudo apt-get install ffmpeg libcairo2-dev libpango1.0-dev pkg-config
curl -LsSf https://astral.sh/uv/install.sh | sh

chmod +x run-stdio.sh
claude mcp add tafel -s user -- "$PWD/run-stdio.sh"

Then open a new Claude Code session (servers load at session start) and check with /mcp that tafel shows as connected.

Usage

Just ask in any session:

explain how an SSL/TLS handshake works with an animation

Steer it with plain words - they map to the tool's settings below. Say things like "quick overview", "deep dive", "low quality, I'm iterating", or "give me a gif" and Claude picks the matching value; it defaults to standard depth and medium quality if you don't specify.

Settings

Setting Values Effect
depth overview / standard (default) / deep_dive Animation length and explanation depth. overview: ~30s, 2-3 points, core idea only. standard: ~60s, 4-6 points, step-by-step. deep_dive: 90-180s, 8+ points, edge cases, failure modes, underlying internals.
quality low / medium (default) / high / fourk Render resolution: 480p / 720p / 1080p / 4K. Higher quality renders noticeably slower - use low while iterating on a scene, bump it up for the final version.
format mp4 (default) / webm / gif Output video container. gif has no audio/speed controls on the viewer page.
scene_name - Only needed if the animation script defines more than one Scene class and a specific one should render.

When the render finishes, Claude publishes the viewer page as a claude.ai artifact and shares the link - it does not open a local browser window. Iterate conversationally: "slow down step 3", "make the arrows curved", "redo this in high quality" - Claude edits the scene or settings and re-renders.

Environment variables

Variable Default Effect
TAFEL_OUTPUT_DIR ~/.tafel/renders Where finished renders land before being published and cleaned up.
TAFEL_TIMEOUT 300 (seconds) Per-render timeout; doubled automatically for deep_dive. Raise it if high/fourk renders are timing out.

Set these before running install.sh, or edit them into run-stdio.sh after install (export TAFEL_TIMEOUT=600 before the exec uv run line), then reconnect the server with /mcp.

Output and cleanup

Each render briefly lands in the output directory (TAFEL_OUTPUT_DIR above) as <timestamp>_<Scene>.mp4 plus a matching self-contained .html viewer page (video embedded as a data URI). Claude deletes both right after publishing the artifact, so nothing accumulates on disk under normal use. If a session ends before cleanup runs, stale files may be left behind - safe to delete the directory's contents manually at any time.

Troubleshooting

  • Tool missing in a session - servers load at session start; run /mcp to reconnect or open a new session. Same after updating server.py.
  • Formula scenes fail ("latex: command not found" in the error) - install LaTeX: brew install --cask mactex-no-gui on macOS (~5 GB), or sudo apt-get install texlive texlive-latex-extra texlive-fonts-extra on Linux. Optional - only needed for Tex/MathTex formulas, not plain animations.
  • Render timeout - see TAFEL_TIMEOUT under Environment variables above; raise it if high/fourk or deep_dive renders are cutting off.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选