Reference Python SDK for the MCP Spatial Asset Profile v2 — JSON envelope for 3D / spatial assets in Model Context Protocol tool ecosystems.
Project description
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.
- Distribution name (PyPI):
mcp-spatial-asset-profile - Import package:
spatial_asset_v2 - TypeScript counterpart:
@furuse-kazufumi/mcp-spatial-asset-profile - Spec & repository: https://github.com/furuse-kazufumi/mcp-spatial-asset-profile
- Release tag:
v0.1.0-poc
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.
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 mcp_spatial_asset_profile-0.1.0.tar.gz.
File metadata
- Download URL: mcp_spatial_asset_profile-0.1.0.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e67ba76802bd93576f45414d850ed449e4213a9cee4ff977f56d24da04fc9657
|
|
| MD5 |
6beb3d55efd7201007be1ff969227a22
|
|
| BLAKE2b-256 |
0f12117d7c913d45558374254a2a33c3760519d6719f716904da2e50bca8e609
|
Provenance
The following attestation bundles were made for mcp_spatial_asset_profile-0.1.0.tar.gz:
Publisher:
publish-packages.yml on furuse-kazufumi/mcp-spatial-asset-profile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_spatial_asset_profile-0.1.0.tar.gz -
Subject digest:
e67ba76802bd93576f45414d850ed449e4213a9cee4ff977f56d24da04fc9657 - Sigstore transparency entry: 1437035872
- Sigstore integration time:
-
Permalink:
furuse-kazufumi/mcp-spatial-asset-profile@a077bfff058db1ddc5b9353f31a9e51d47687fa3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/furuse-kazufumi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-packages.yml@a077bfff058db1ddc5b9353f31a9e51d47687fa3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mcp_spatial_asset_profile-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_spatial_asset_profile-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.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 |
fbeb886705f117a9f490296e055956553ac411ba7c2ae20a9c42c0894dac5974
|
|
| MD5 |
9ce71e2e21371f2a910d3e817a86766f
|
|
| BLAKE2b-256 |
a60f492ddabb385e2df4c95458c5bfcf888d75540f0227c25357008cb75cdfca
|
Provenance
The following attestation bundles were made for mcp_spatial_asset_profile-0.1.0-py3-none-any.whl:
Publisher:
publish-packages.yml on furuse-kazufumi/mcp-spatial-asset-profile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_spatial_asset_profile-0.1.0-py3-none-any.whl -
Subject digest:
fbeb886705f117a9f490296e055956553ac411ba7c2ae20a9c42c0894dac5974 - Sigstore transparency entry: 1437035881
- Sigstore integration time:
-
Permalink:
furuse-kazufumi/mcp-spatial-asset-profile@a077bfff058db1ddc5b9353f31a9e51d47687fa3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/furuse-kazufumi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-packages.yml@a077bfff058db1ddc5b9353f31a9e51d47687fa3 -
Trigger Event:
workflow_dispatch
-
Statement type: