Skip to main content

mcp-spatial-asset-profile — Python SDK

Reference Python SDK for the MCP Spatial Asset Profile v2 — a JSON envelope format for 3D / spatial assets in Model Context Protocol (MCP) tool ecosystems.

Status — Proof of Concept. The format is usable for prototyping and interoperability experiments. The wire format is not yet frozen; feedback via GitHub Discussions is explicitly welcome before v2.1.

Installation

Once published to PyPI:

pip install mcp-spatial-asset-profile
# Optional: enable JSON Schema validation
pip install "mcp-spatial-asset-profile[validate]"

From source (this repository):

cd sdk/python
pip install -e ".[dev]"

Quick Start

from spatial_asset_v2.models import SpatialAsset, Representation, Spatial
from spatial_asset_v2.codec import encode_asset, decode_asset
from spatial_asset_v2.validators import validate_asset
from spatial_asset_v2.workflow import WorkflowMockRunner

# Create a v2 asset
asset = SpatialAsset(
    asset_id="urn:uuid:550e8400-e29b-41d4-a716-446655440001",
    kind="point-cloud",
    representations=[
        Representation(format="ply", uri="samples/bunny.ply", point_count=35947)
    ],
    spatial=Spatial(unit="m", up_axis="+Y"),
    name="Stanford Bunny",
)

# Encode to dict / JSON
d = encode_asset(asset)

# Decode from dict
asset2 = decode_asset(d)

# Validate against JSON schema (requires jsonschema)
errors = validate_asset(d)
print("Valid:", len(errors) == 0)

# Run mock segmentation workflow
runner = WorkflowMockRunner(base_dir="samples/inspection")
pipeline = runner.run_full_pipeline(
    source_asset_id="urn:uuid:...",
    source_ply_path="bunny_full.ply"
)

Modules

Module Description
spatial_asset_v2.models Pydantic-free dataclass models for all asset kinds
spatial_asset_v2.codec Encoder / decoder (dict ↔ model)
spatial_asset_v2.validators.schema_validator JSON Schema validation (optional dep)
spatial_asset_v2.validators.traceability Asset graph traceability validation
spatial_asset_v2.workflow Mock workflow runner for pipeline testing
spatial_asset_v2.samples Sample asset generator
spatial_asset_v2.cli Command-line interface

CLI

# Validate a JSON asset file
spatial-asset-v2 validate spec/examples/pointcloud-asset.json

# Generate sample assets
spatial-asset-v2 generate --output /tmp/samples

# Run mock segmentation pipeline
spatial-asset-v2 workflow --source spec/examples/pointcloud-asset.json

# Migrate v1 asset to v2
spatial-asset-v2 migrate old-asset-v1.json new-asset-v2.json

Running Tests

cd sdk/python
pip install -e ".[dev]"
pytest tests/ -v

License

MIT — see the LICENSE file at the repository root.

Release files for mcp-spatial-asset-profile 0.1.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 mcp-spatial-asset-profile 0.1.0
File Size Uploaded
mcp_spatial_asset_profile-0.1.0.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-spatial-asset-profile 0.1.0
File Interpreter ABI Platform
mcp_spatial_asset_profile-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 39.3 kB

Release files / mcp_spatial_asset_profile-0.1.0.tar.gz

Download URL mcp_spatial_asset_profile-0.1.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e67ba76802bd93576f45414d850ed449e4213a9cee4ff977f56d24da04fc9657
BLAKE2b-256 checksum
How to use checksums
0f12117d7c913d45558374254a2a33c3760519d6719f716904da2e50bca8e609
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 4, 2026.

Transparency log

Release files / mcp_spatial_asset_profile-0.1.0-py3-none-any.whl

Download URL mcp_spatial_asset_profile-0.1.0-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbeb886705f117a9f490296e055956553ac411ba7c2ae20a9c42c0894dac5974
BLAKE2b-256 checksum
How to use checksums
a60f492ddabb385e2df4c95458c5bfcf888d75540f0227c25357008cb75cdfca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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