Move to 'uv' for environment and dependency management, add stdio FastMCP server #2458
Open
arbeiterz wants to merge 7 commits into3b1b:masterfrom
Open
Move to 'uv' for environment and dependency management, add stdio FastMCP server #2458arbeiterz wants to merge 7 commits into3b1b:masterfrom
arbeiterz wants to merge 7 commits into3b1b:masterfrom
Conversation
- Replace setup.py, setup.cfg, and MANIFEST.in with pyproject.toml - Switch build backend from setuptools to hatchling - Bump requires-python from >=3.7 to >=3.10 (drop EOL versions) - Remove setuptools and typing-extensions from dependencies - Add missing undeclared dependencies: trimesh, pywavefront - Remove Python <3.8 importlib_metadata fallback in __init__.py - Add uv.lock and *.egg-info to .gitignore
New mcp_server/ package with 6 tools: - render: full scene animation to mp4/gif/png via subprocess - preview: single-frame capture with base64 PNG response - validate: syntax/import checking without GPU - list_mobjects: introspect 137 available mobject classes - list_animations: introspect 103 available animation classes - get_example: curated example scenes for 8 common patterns Two resources: manim://constants (directions, colors, buffers) and manim://config (default rendering configuration). Runs via: uv run --extra mcp manimgl-mcp FastMCP added as optional dependency under [project.optional-dependencies].
README.md: - Update Python requirement from 3.7 to 3.10+ (matches pyproject.toml) - Add uv as recommended install method, keep pip as alternative - Remove outdated Anaconda section - Consolidate platform-specific notes - Add MCP Server section documenting tools and client config - Add explicit Linux pango install instruction - Promote Documentation from subsection to top-level heading mcp_server/renderer.py: - Fix gif output: pass -i flag to manimgl (was silently producing mp4)
New modules: - style_guide.py: 3b1b visual style guide (animation timing, color conventions, camera work) and pedagogy principles (concrete before abstract, geometry before algebra, progressive revelation) - math_helpers.py: reusable helper functions for 6 math domains (calculus, linear algebra, complex analysis, vector calculus, differential geometry, probability) - topics.py: 8 structured video templates from basic to advanced, each with concept arc and renderable scene code, inspired by patterns in the 3b1b/videos repository New tools (server now has 9): - list_topics: browse templates by category and difficulty level - get_topic_template: get full video plan with scene code - get_math_helpers: get domain-specific math helper functions New resources (server now has 4): - manim://style-guide - manim://pedagogy
New examples covering key ManimGL animation patterns: - value_tracker_graph: dynamic dot + label tracking along a curve - grid_transformation: linear transformation deforming a grid - vector_field_2d: 2D vector field visualization - color_gradient_surface: 3D surface colored by height - progressive_equation: step-by-step equation building with color - parametric_curve: animated Lissajous curve drawing - side_by_side: dual-view pattern (time vs frequency domain) - camera_orbit_3d: full camera orbit around a torus - staggered_animation: LaggedStartMap for staggered entrances - updater_chain: chained updaters keeping objects connected Updated get_example tool docstring to list all 18 topics.
New mcp_server/video_planner.py (260 lines): - Keyword matching engine that maps natural language math topic descriptions to relevant templates, helper domains, and examples - Assembles structured video plans with scene code, pedagogy guidance, duration/pacing notes, and level-specific advice New tool: create_math_video — takes a topic description, difficulty level, and duration hint; returns a complete plan with matched templates, math helpers, technique examples, and 3b1b-style pedagogical principles. Server now has 10 tools total. Also broadened keyword coverage for eigenvalue/eigenvector queries across topic, helper, and example keyword maps.
- Document all 10 tools including create_math_video, list_topics, get_topic_template, and get_math_helpers - Add Resources table documenting all 4 resources - Add /latex_cache to .gitignore (runtime artifact)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Proposed changes
Test
Code:
Result: