Skip to main content

mcpzero (Python)

Python SDK for MCPZERO (open source, MIT). Expose your own MCP server through the MCPZERO tunnel — a public Streamable-HTTP endpoint plus full dashboard visibility — directly from code, without the CLI.

pip install mcpzero-sdk          # embedded proxy only
pip install "mcpzero[mcp]"   # + in-process adapter for the official MCP SDK

Create an endpoint and a management key in the dashboard. A management key is a user-level credential that lets the SDK publish (register a tunnel for) any endpoint you own — the headless alternative to mcpzero login. By convention they are read from MCPZERO_ENDPOINT_ID / MCPZERO_MGMT_KEY (gateway base from MCPZERO_GW_BASE, default https://gw.mcpzero.io).

Not to be confused with an API key, which is the consumer-side credential AI clients use to call your published endpoint.

Tunnel an in-process MCP server (primary API)

Run your official mcp SDK server with its streams backed by the tunnel:

import asyncio
import mcpzero
from mcp.server.lowlevel import Server

server = Server("my-mcp")
# ... @server.list_tools() / @server.call_tool() ...

asyncio.run(mcpzero.serve(server, endpoint_id="ep_...", management_key="mzm_..."))

Or drive the streams yourself:

async with mcpzero.tunnel(endpoint_id="ep_...", management_key="mzm_...") as (read, write):
    await server.run(read, write, server.create_initialization_options())

Tunnel a local MCP server (lower-level primitive)

A library version of mcpzero tunnel, for a server running as a separate process or HTTP service:

# stdio:
handle = await mcpzero.tunnel_proxy(command=["python", "server.py"])
# or HTTP:
handle = await mcpzero.tunnel_proxy(url="http://localhost:3000/mcp")

print("Live at", handle.endpoint_url)
# ... later:
await handle.aclose()

Visibility

In tunnel mode, visibility is produced by the gateway automatically — the dashboard reflects calls exactly as it does for the CLI tunnel. No extra code is needed.

See ../PROTOCOL.md for the tunnel wire protocol.

Docs: https://mcpzero.io/docs/sdk/tunnel/python

Metadata

Release files for mcpzero-sdk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcpzero-sdk 0.1.1
File Size Uploaded Provenance
mcpzero_sdk-0.1.1.tar.gz 20.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcpzero-sdk 0.1.1
File Interpreter ABI Platform
mcpzero_sdk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 34.8 kB

Release files / mcpzero_sdk-0.1.1.tar.gz

Download URL mcpzero_sdk-0.1.1.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
82578ca617f42e7d092f84e208adeeab700614688c0936fb533498923feaea77
BLAKE2b-256 checksum
How to use checksums
f83745c4f9c687be75c0c9d747a3b3c9fe42837feb2015d887d833f7491dc380
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / mcpzero_sdk-0.1.1-py3-none-any.whl

Download URL mcpzero_sdk-0.1.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b95891eb4cd230dbee51fa0e717e2db9d1b459a5eb8a0f9722ad62971c7d0b3f
BLAKE2b-256 checksum
How to use checksums
efe8f5908ffeb05c1d9a0b71fbdaa68b92719ed44e6431986dbbb01b17b41ed4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for mcpzero-sdk 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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