Skip to main content

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.
  • Animatica Cloud — hosted product. Adds skeleton retargeting, managed GPUs, batch generation, multi-tenant auth.

Officially supported clients:

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

# server: implement a Backbone and serve it
pip install "motionmcp-sdk[server]"

# client / library only: talk to an MMCP server
pip install motionmcp-sdk

Since 0.6.0 the server stack (FastAPI, pydantic, uvicorn) is the [server] extra; up to 0.5.0 it was part of the base install.

Requires Python 3.9+.

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_motion extension correctly populated.
  • Reference impl: NullBackbone returns 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 be async def or 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

Client side

motionmcp.client is the other half of the SDK: a Python client for talking to any MMCP server, not just ones built with this package. It speaks HTTP with the standard library only (urllib), since the interpreters embedded in DCCs like Blender rarely have requests or httpx on hand. It also decodes the glTF 2.0 responses back into plain numpy arrays, so callers don't need a glTF library of their own. Install it with the base pip install motionmcp-sdk — no FastAPI/pydantic/uvicorn required.

from motionmcp import client

caps = client.get_capabilities(url)                      # GET /capabilities
model = client.pick_model(caps, wanted="kimodo-soma-rp")  # a model id from the capabilities
doc = client.generate(url, request_body, on_progress=print)  # POST /generate
samples = client.parse_gltf_samples(doc)                  # glTF JSON -> numpy arrays

See Client in the SDK docs for the full API.

What's NOT in v0

  • Async jobs (POST /generate returning 202 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=False and require the canonical skeleton, or implement retargeting in your generate().

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.

Metadata

Release files for motionmcp-sdk 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for motionmcp-sdk 0.13.0
File Size Uploaded Provenance Actions
motionmcp_sdk-0.13.0.tar.gz 103.3 kB With provenance Details for motionmcp_sdk-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for motionmcp-sdk 0.13.0
File Interpreter ABI Platform Actions
motionmcp_sdk-0.13.0-py3-none-any.whl Python 3 none any Details for motionmcp_sdk-0.13.0-py3-none-any.whl

Total release size: 179.7 kB

Release files / motionmcp_sdk-0.13.0.tar.gz

Download URL motionmcp_sdk-0.13.0.tar.gz
Size 103.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9494351d9cc9b9314ed225ac08ea036511a3a1f3676f1f3ae106575ebc1442c1
BLAKE2b-256 checksum
How to use checksums
646294512fec90a619a743f60eb86e16e353ad1ee4e3ed2942dd0ba0c930716a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / motionmcp_sdk-0.13.0-py3-none-any.whl

Download URL motionmcp_sdk-0.13.0-py3-none-any.whl
Size 76.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0082ce45d0c2911a5c7ca1fface1b233d54e9b1928f72a6cf7a8bf003fc82a3e
BLAKE2b-256 checksum
How to use checksums
f2d77a1a8769118b32a559c9f04a9802628f6200b0df3263400723d1e3684e20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Security for motionmcp-sdk 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for motionmcp_sdk-0.13.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page