MCP server
This demo ships a Model Context Protocol server, so an AI agent can write
Bmotion code from what the library actually is rather than from what it remembers.
Half of its tools answer from this build's own text - the guide, the XML documentation compiled
into the assembly, the source of every page you have been reading. The other half answer by
running the real animation engine off-screen and reporting what it did. That
second half is the reason it exists: no amount of documentation can tell you that
Bm.Spring(stiffness: 400, damping: 2) wobbles for five seconds, or that morphing an
SVG path's d stops moving the moment your app is served over Blazor Server while
a height animation beside it keeps playing.
Why an animation library needs one
Almost every way of getting an animation wrong is silent. There is no compiler error, no exception, and nothing in the browser console - the page simply does not move, or moves differently in production than it did on your machine. Three examples this server answers directly:
The animation needs something only the C# frame loop can play - a per-frame OnUpdate, an SVG path morph - and Blazor Server has no frame loop.
AnalyzeBmotionAnimation Blazor removed the element the moment the condition flipped. Exit needs a presence component to hold it in the DOM.
ReviewBmotionCode Stiffness and damping do not describe motion out loud. How long it takes and how far it overshoots are consequences, not settings.
SimulateBmotionTransition Connect your agent
The server speaks MCP over HTTP at /mcp. Run this demo, then point any MCP
client at it. The same methods are also plain GET endpoints under
/api/mcp/..., so you can open any of them in a browser tab - which is exactly
what the panels further down this page do.
One command, from anywhere in your project.
claude mcp add --transport http bmotion https://bmotion.bitplatform.dev/mcp
Add it to claude_desktop_config.json, then restart the app.
{
"mcpServers": {
"bmotion": {
"type": "http",
"url": "https://bmotion.bitplatform.dev/mcp"
}
}
}Add it to .vscode/mcp.json in the workspace, and it is offered to Copilot in agent mode.
{
"servers": {
"bmotion": {
"type": "http",
"url": "https://bmotion.bitplatform.dev/mcp"
}
}
}Add it to .cursor/mcp.json for this project, or to ~/.cursor/mcp.json for all of them.
{
"mcpServers": {
"bmotion": {
"url": "https://bmotion.bitplatform.dev/mcp"
}
}
}The transition lab
SimulateBmotionTransition plays a transition on the real engine with no browser
involved, and reports what the motion does. Nothing in a transition states its own settle
time - a spring's, and how far it overshoots, fall out of the physics - so this is the only
way to know what one feels like before shipping it. Pass several at once, separated by
semicolons, and it measures them side by side.
The box below is not an approximation: it replays the exact per-frame values the server measured, handed back as keyframes.
Will it work on Blazor Server?
The engine hands the browser almost every animation - as a two-keyframe timeline when one
exact curve covers it, as a recording of the frames its own drivers draw otherwise - and both
play on Blazor Server. Only a few need the C# per-frame loop, which does not exist there, and
become an instant jump. AnalyzeBmotionAnimation does not consult a table - it
starts the animation on the real engine, as each runtime, and watches what the engine does.
Review your markup
ReviewBmotionCode is the pass that closes the loop after an agent writes code.
It looks for the mistakes that compile cleanly and then do nothing - an Exit
with no presence component around it, a @foreach with no @key, a
spring whose duration the engine ignores. The sample below contains several on purpose.
One search across everything
An agent rarely knows which corpus holds the answer. SearchBmotion covers the
guide, every public member, the animatable properties, the easing presets, the recipes, the
setup guides and the demo's sources at once - and every hit carries the exact follow-up call
that returns it in full.
Tools
Loading the catalog...
Prompts
Prompts are the workflows: the order to call the tools in for a whole task. They exist because the failure mode of an agent holding this many tools is not ignorance - it is calling them in a sequence that skips the check which would have caught the bug.
Resources
The same knowledge as URIs, for clients that attach documentation to a conversation up front or let a person browse and pin it. They read the same catalogs the tools do, so neither can go stale relative to the other.
How it stays true
Documentation that is written down separately drifts, and an agent cannot tell a stale answer from a fresh one. So nothing here is written down twice:
- The API reference is reflected out of the shipped assembly and paired with the XML documentation compiled into it. A new component parameter appears the moment it is written, with the default value it actually has - read off a freshly constructed instance. In an animation library the defaults are the behaviour.
- The guide, the demo pages and their sources are embedded into the server assembly, so the tools keep working from a published deployment and always hand out the same text this site renders.
- The motion is measured, not described. A headless
IBmotionInteroplets the server construct a realBmotionAnimationEnginewith no DOM anywhere and advance its frame clock itself. A three-second spring is simulated in microseconds. - The playback verdict is observed. The engine decides whether the browser
plays an animation - and whether as a timeline or as a recording - through a long rule set;
restating that rule set here would mean maintaining a second copy of it and being wrong in
exactly the cases that matter. Instead the server starts the animation, as WebAssembly and
as Blazor Server, and records what the engine handed the Web Animations API - including for
every animatable property, once, to build the table behind
GetBmotionAnimatableProperties.