Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpak-0.1.0.tar.gz (53.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpak-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

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

Hashes for mpak-0.1.0.tar.gz
Algorithm Hash digest
SHA256 03de32701b5ae9753481daa15d623b7bf6e2ac7da7d64eb90c5100e64c1f7cb5
MD5 1fcc492971d73d384a329c904239b409
BLAKE2b-256 7c1a7ec378a5c97c49ec1859acd805b6b8ad1c57d8dd210322c8159d7812165b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mpak-0.1.0.tar.gz:

Publisher: sdk-python-publish.yml on NimbleBrainInc/mpak

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for mpak-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92d0963721ae9b6e233973b90c4ab98e6d792976b9abb07f007825c2c8578914
MD5 5448c99c85e70143bc670c60be5fa048
BLAKE2b-256 64b139789cc978f23dfcbecad49adb86d766d6ce8ba1eba61ebf5e153f982c29

See more details on using hashes here.

Provenance

The following attestation bundles were made for mpak-0.1.0-py3-none-any.whl:

Publisher: sdk-python-publish.yml on NimbleBrainInc/mpak

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page