mars-protocol
Python client for the Mesh Agent Routing Standard. A thin wrapper around the mesh-gateway HTTP API that lets you publish and discover capabilities on the decentralized mesh network.
Install
pip install mesh-protocol
Live Network
The MARS mesh is live. Start a gateway connected to any hub, then use this SDK:
# Start the gateway (connects to mesh via QUIC, exposes HTTP)
./target/release/mesh-gateway --seed 5.161.53.251:4433 --listen 0.0.0.0:3000
Available hubs:
| Hub | Address | Location |
|---|---|---|
| us-east | 5.161.53.251:4433 |
Ashburn, VA |
| us-west | 5.78.197.92:4433 |
Hillsboro, OR |
| eu-central | 46.225.55.16:4433 |
Nuremberg, DE |
| ap-southeast | 5.223.69.128:4433 |
Singapore |
Quick start
from mesh_protocol import MeshClient
with MeshClient("http://localhost:3000") as client:
# Publish a capability
result = client.publish(
"compute/inference/text-generation",
endpoint="https://my-agent.example.com/v1/generate",
params={"model": "llama-3.3-70b"},
)
print(result.descriptor_id)
# Discover capabilities
providers = client.discover("compute/inference")
for p in providers:
print(f"{p.type} -> {p.endpoint}")
Async
import asyncio
from mesh_protocol import AsyncMeshClient
async def main():
async with AsyncMeshClient("http://localhost:3000") as client:
await client.publish(
"storage/blob",
endpoint="https://my-storage.example.com/v1/upload",
)
providers = await client.discover("storage")
print(providers)
asyncio.run(main())
API
| Method | Description |
|---|---|
publish(type, endpoint, params=None) |
Publish a capability descriptor |
discover(type) |
Discover descriptors matching a type prefix |
health() |
Check gateway health |
close() |
Close the HTTP connection |
Both MeshClient and AsyncMeshClient support the context manager protocol (with / async with).
Errors from the gateway are raised as MeshError, which includes the HTTP status_code and error message.
License
MIT OR Apache-2.0
Links
Metadata
Release files for mesh-protocol 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mesh_protocol-0.1.0.tar.gz | 4.7 kB | Without provenance | Details for mesh_protocol-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mesh_protocol-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mesh_protocol-0.1.0-py3-none-any.whl |
Total release size: 9.3 kB
Release files / mesh_protocol-0.1.0.tar.gz
| Download URL | mesh_protocol-0.1.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17d97d7b3a12a2219bb0eb889a919613972ef116e6fb2a84cc7e0f9f71ad6700
|
|
BLAKE2b-256 checksum How to use checksums |
d894b9cfe63ec1428db91622a6c73204878b7e669b42f3ab3917e53ab2314b62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / mesh_protocol-0.1.0-py3-none-any.whl
| Download URL | mesh_protocol-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7099dc80d81e1e369e194ece66dfa4d0bbacc2fe272cb138a17487109e6f3dd4
|
|
BLAKE2b-256 checksum How to use checksums |
45fbffcca4ec14f673beb4adcbc7e4cbfad0064aab61600d1d2a00d42f9bada8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for mesh-protocol 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.