Python SDK for MMCP — the Motion Model Context Protocol. Build a vendor-neutral motion-generation server in ~30 lines.
Project description
motionmcp
Python SDK for MMCP — the Motion Model Context Protocol.
Build a vendor-neutral motion-generation HTTP server in ~30 lines: the
SDK handles wire-format validation, glTF encoding, and the standard
error envelope; you implement model loading and a single generate()
method.
Where this fits
MMCP is a small HTTP protocol; this is the Python SDK that makes implementing the server side trivial.
Officially supported servers (built on this SDK):
- motionmcp-kimodo — the Kimodo SOMA model. Open-source, self-hosted.
- MMCP Cloud — hosted product. Adds skeleton retargeting, managed GPUs, batch generation, multi-tenant auth.
Officially supported clients:
- Proscenium for Blender — directable motion generation in Blender 4.2+. Talks to any MMCP server.
Want to add another model or DCC? The protocol is yours to implement — this SDK just makes the server side easy. See Servers & clients for the full list and how to build your own.
from motionmcp import Backbone, ModelSpec, GenerateRequest, MotionResult, serve
class MyBackbone(Backbone):
def capabilities(self) -> ModelSpec:
return ModelSpec(
id="my-model",
fps=30.0,
canonical_skeleton=load_skeleton(),
supports_retargeting=False,
supported_constraints=["pose_keyframe"],
)
async def generate(self, req: GenerateRequest) -> MotionResult:
rotations = self.model.run(req) # (N, T, J, 4) (x,y,z,w)
translations = self.model.run_root(req) # (N, T, 3)
return MotionResult(
rotations=rotations,
root_translations=translations,
)
if __name__ == "__main__":
serve(MyBackbone())
That's the whole server. Hit GET /capabilities to discover the model;
POST /generate to run it. Returns standard glTF 2.0 — load it with
any glTF parser.
Install
pip install motionmcp-sdk
Requires Python 3.10+.
What the SDK gives you
- Schemas: Pydantic models for the full wire format
(
Skeleton,Segment,Constraint,Options,GenerateRequest). Free validation, IDE autocomplete, OpenAPI docs at/docs. - Endpoints:
GET /capabilities,POST /generate, plus a generic exception → MMCP error envelope handler. - Generic checks: unknown model, unknown joint in constraint,
frame-out-of-range, retargeting policy, constraint count, prompt length,
duration limit. All raise the right
error.code. - glTF encoder: numpy arrays in, glTF 2.0 JSON out, with the
MMCP_motionextension correctly populated. - Reference impl:
NullBackbonereturns a rest pose for any request. Useful for plugin development against a real server with zero ML deps.
What you implement
Backbone.capabilities() -> ModelSpec— what model you serve.Backbone.generate(request) -> MotionResult— the actual generation. May beasync defor sync.Backbone.setup()/teardown()— optional, for model loading and GPU allocation.
That's it.
Multi-model
Serve more than one model from one process:
serve({
"fast": FastBackbone(),
"quality": QualityBackbone(),
})
Or pass an iterable; ids come from each backbone's capabilities().id.
NullBackbone — try it now
pip install motionmcp-sdk
python -m motionmcp.null_backbone
# → MMCP server on :8000, returning rest pose for any request
What's NOT in v0
- Async jobs (
POST /generatereturning202 Accepted,GET /generate/jobs/{id}). Sync only for now; planned for v0.2. - Idempotency cache. Spec-recommended but not required.
- Binary glTF (
model/gltf-binary). JSON only for now. - fps resampling between request fps and the model's native fps.
Backbones currently see
request.fps(spec.fps)and are responsible for honoring it. - Built-in retargeting. Set
supports_retargeting=Falseand require the canonical skeleton, or implement retargeting in yourgenerate().
These are deliberate v0 omissions to keep the surface tight. Feedback welcome on which to prioritise next.
Status
Alpha. The protocol is v1.0-rc1; the SDK API is v0.1. Expect minor
shape changes before v1.0.
License
Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file motionmcp_sdk-0.1.0.tar.gz.
File metadata
- Download URL: motionmcp_sdk-0.1.0.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ab14c0bfc826c27d80745dbe7f55add963ea0569e54a69a8584692e693db139
|
|
| MD5 |
a935447a609081d6fd86377e1fba05b2
|
|
| BLAKE2b-256 |
23d235773b77325ee01f2e8dfd751b9e5c893356fa7e380debb6823b0dd18448
|
Provenance
The following attestation bundles were made for motionmcp_sdk-0.1.0.tar.gz:
Publisher:
release.yml on animatica-ai/motionmcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
motionmcp_sdk-0.1.0.tar.gz -
Subject digest:
9ab14c0bfc826c27d80745dbe7f55add963ea0569e54a69a8584692e693db139 - Sigstore transparency entry: 1381951102
- Sigstore integration time:
-
Permalink:
animatica-ai/motionmcp@1541917e52462ff8f19931f6d893134d0db7f2b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/animatica-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1541917e52462ff8f19931f6d893134d0db7f2b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file motionmcp_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: motionmcp_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b39cadd27af1c9ddead6c2dfd1e3affc5110c73cbd9b25bbadbb55d672239ad1
|
|
| MD5 |
ef66c7e36778b9478f55c071bd869c99
|
|
| BLAKE2b-256 |
4ea78e3fb44a8b36995abc0c30e79b4f6cfb079fabfac9ca901ce3e5854fe3e9
|
Provenance
The following attestation bundles were made for motionmcp_sdk-0.1.0-py3-none-any.whl:
Publisher:
release.yml on animatica-ai/motionmcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
motionmcp_sdk-0.1.0-py3-none-any.whl -
Subject digest:
b39cadd27af1c9ddead6c2dfd1e3affc5110c73cbd9b25bbadbb55d672239ad1 - Sigstore transparency entry: 1381951210
- Sigstore integration time:
-
Permalink:
animatica-ai/motionmcp@1541917e52462ff8f19931f6d893134d0db7f2b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/animatica-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1541917e52462ff8f19931f6d893134d0db7f2b4 -
Trigger Event:
push
-
Statement type: