ca-scene-mcp
Enables prompt-driven scene generation for computer animation using a JSON-serializable scene model and physics simulation backend.
README
Computer Animation - Exercise
Overview
This repository contains the code for the computer animation exercise. The code uses Newton@2a6df66 as a backend for the physics simulation.
Agent scene framework
The repository also contains a prompt-driven framework for generating animations:
ca_framework.scenedefines a backend-neutral, JSON-serializable scene model for rigid bodies, cloth, fluids, constraints, and external fields.ca_framework.mcpprovides protocol-independent scene editing tools.mcp_serverexposes those tools through the official Python MCP SDK as a standalone stdio or Streamable HTTP server.knowledge/skillscontains focused simulation knowledge that an agent can load when translating a prompt into a scene.
The runtime and agent-facing files intentionally contain no reference scenes or
reference answers. The ten canonical acceptance cases, their assertions, and
benchmark commands live under evaluation/; do not expose that directory to an
agent during a prompt-to-video experiment.
Start the stdio MCP server from the repository root:
uv run --project mcp_server ca-scene-mcp
Scene files are stored in .ca-scenes by default. Set CA_SCENE_WORKSPACE to use another directory. SceneExecutorLocal compiles rigid bodies and cloth to Newton XPBD/VBD, advances smoke and APIC/FLIP fluid routes, caches every simulated frame, and renders an output bundle. Final jobs use run_scene(scene_name, output_dir) and write animation.mp4, scene.json, program.py, metrics.json, diagnostics.jsonl, and cache/.
Development tests remain under tests/. Evaluation assets and instructions are
documented separately in evaluation/README.md.
Installation
-
Install Git and uv on your system. On Windows, uv can be simply installed by running the following command in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" -
Clone this repository:
git clone http://dalab.se.sjtu.edu.cn/gitlab/courses/ca-framework-2026.git -
Install dependencies:
uv sync --extra examples -
Use any IDE (PyCharm is recommended) of your choice to open the project and run the script in
examples/ca_exercises/directory. PyCharm will automatically recognize the virtual environments, if not, you can activate in the terminal using the command below:./.venv/Scripts/activate -
Then run the python script in the terminal:
python ./newton/examples/ca_exercises/exercise2_xxx_xxx.pyIf everything's alright, you will see a window like below:
Controls:- WASD: move camera
- QE: move camera up/down
- Left click: lock around
Handin
You only need to modify the TODO sections in the code. You can run the code to test your implementation, but please do not modify the code structure or add any new files.
After you finish one exercise, You only need to submit the modified .py files in newton/_src/solvers/ca_exercises/. Please compress these files into a zip file and submit it to Canvas. The file name should be in the format of ca_exercise<n>_<student_id>.zip.
Notes: each exercise may have its own additional requirements, please pay attention.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.