Skip to main content

hedron-mcp

PyPI Python CI License: MIT

Deny-by-default MCP Streamable HTTP projection for Hedron.

Disabled and empty until resources and tools are explicitly registered. MCP never grants authority beyond the authenticated principal. Installing the package without registrations remains a no-op empty server.

Also available as the flagship extra hedron[mcp].

Package maturity: Beta (0.2.x) · pin >=0.2.0,<0.3

Production-grade for the declared Supported inventory (phase 0.32 / RFC-0065). Mutating tools remain Experimental (allow_mutations=True).

Install

pip install "hedron-mcp>=0.2.0,<0.3"
# or
uv add "hedron-mcp>=0.2.0,<0.3"
# via flagship:
pip install "hedron[mcp]>=0.47.0,<0.48"

Requires Python 3.11–3.14.

Quick start

from hedron import Hedron
from hedron_mcp import McpProjection, McpResource, McpTool, mount_mcp

app = Hedron(
    title="MCP demo",
    security="standard",
    session_secret="dev-only",
)

# Prefer session / host auth. Header identity is host-owned opt-in only —
# the default resolver never trusts x-hedron-principal / x-user.
projection = McpProjection(
    enabled=True,
    principal_resolver=lambda request: request.session.get("user"),
)
projection.register_resource(McpResource(uri="hedron://page/home", name="home"))
projection.register_tool(
    McpTool(
        name="status",
        schema={"type": "object", "properties": {}},
        mutate=False,
        handler=lambda: {"ok": True},
    )
)
mount_mcp(app, projection)

License

MIT

Download files

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

Source Distribution

hedron_mcp-0.2.1.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

hedron_mcp-0.2.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file hedron_mcp-0.2.1.tar.gz.

File metadata

  • Download URL: hedron_mcp-0.2.1.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hedron_mcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2bb16fe730d36903d0ecc7d09b704121f73fc405c4344195adc5308d3097c113
MD5 71d14c69589321536a1bfe6686e69089
BLAKE2b-256 9ca767b0a2635897f9c1de645928042b0194e7f1c91cdeef82ebd134a7aa3709

See more details on using hashes here.

File details

Details for the file hedron_mcp-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: hedron_mcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hedron_mcp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c95ffc1d3f21a11195667b012a08d1c400d969e13f9f254bf22ff99420142565
MD5 e84744a927e1550afc80980ff80c8676
BLAKE2b-256 5d35ba408869a78c446e28c7edbe8a2e2aaaa84746b29dc896d10adb6307a0fd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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