Python SDK for the mpak registry - MCPB bundles and Agent Skills
Project description
mpak Python SDK
Python SDK for the mpak registry - search, download, and resolve MCPB bundles and Agent Skills.
Installation
pip install mpak
Quick Start
from mpak import MpakClient
# Create client
client = MpakClient()
# Resolve a bundle to download URL
download = client.get_bundle_download("@nimblebraininc/echo", version="latest")
print(f"Download URL: {download.url}")
print(f"SHA256: {download.sha256}")
# Download and extract a bundle
manifest = client.load_bundle("@nimblebraininc/echo", dest="/app/bundle")
print(f"Loaded: {manifest['name']} v{manifest['version']}")
CLI Usage
The package provides a mpak-loader CLI that replaces the standalone mcpb-loader.py script:
# Load from mpak registry
mpak-loader @nimblebraininc/echo /dest/dir
# Load specific version
mpak-loader @nimblebraininc/echo@1.0.0 /dest/dir
# Load from direct URL with SHA256 verification
mpak-loader https://example.com/bundle.mcpb /dest/dir abc123...
Development
Setup
# Install with dev dependencies
uv pip install -e ".[dev]"
# Generate types from OpenAPI spec
python scripts/generate-types.py
Testing
# Run tests
pytest
# Run with coverage
pytest --cov=mpak --cov-report=html
# Lint and format
ruff check .
ruff format .
Type Generation
The SDK types are generated from the mpak registry OpenAPI spec. To regenerate:
python scripts/generate-types.py
This fetches the latest spec from https://registry.mpak.dev/docs/json and generates Pydantic models in src/mpak/generated/types.py.
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 mpak-0.1.0.tar.gz.
File metadata
- Download URL: mpak-0.1.0.tar.gz
- Upload date:
- Size: 53.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03de32701b5ae9753481daa15d623b7bf6e2ac7da7d64eb90c5100e64c1f7cb5
|
|
| MD5 |
1fcc492971d73d384a329c904239b409
|
|
| BLAKE2b-256 |
7c1a7ec378a5c97c49ec1859acd805b6b8ad1c57d8dd210322c8159d7812165b
|
Provenance
The following attestation bundles were made for mpak-0.1.0.tar.gz:
Publisher:
sdk-python-publish.yml on NimbleBrainInc/mpak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mpak-0.1.0.tar.gz -
Subject digest:
03de32701b5ae9753481daa15d623b7bf6e2ac7da7d64eb90c5100e64c1f7cb5 - Sigstore transparency entry: 968324176
- Sigstore integration time:
-
Permalink:
NimbleBrainInc/mpak@c08984a4cf47614a6eebbe04ff827f0d56d3de75 -
Branch / Tag:
refs/tags/sdk-python-v0.1.0 - Owner: https://github.com/NimbleBrainInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-publish.yml@c08984a4cf47614a6eebbe04ff827f0d56d3de75 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mpak-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mpak-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92d0963721ae9b6e233973b90c4ab98e6d792976b9abb07f007825c2c8578914
|
|
| MD5 |
5448c99c85e70143bc670c60be5fa048
|
|
| BLAKE2b-256 |
64b139789cc978f23dfcbecad49adb86d766d6ce8ba1eba61ebf5e153f982c29
|
Provenance
The following attestation bundles were made for mpak-0.1.0-py3-none-any.whl:
Publisher:
sdk-python-publish.yml on NimbleBrainInc/mpak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mpak-0.1.0-py3-none-any.whl -
Subject digest:
92d0963721ae9b6e233973b90c4ab98e6d792976b9abb07f007825c2c8578914 - Sigstore transparency entry: 968324236
- Sigstore integration time:
-
Permalink:
NimbleBrainInc/mpak@c08984a4cf47614a6eebbe04ff827f0d56d3de75 -
Branch / Tag:
refs/tags/sdk-python-v0.1.0 - Owner: https://github.com/NimbleBrainInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-publish.yml@c08984a4cf47614a6eebbe04ff827f0d56d3de75 -
Trigger Event:
push
-
Statement type: