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.5,<0.3"
# or
uv add "hedron-mcp>=0.2.5,<0.3"
# via flagship extra:
pip install "hedron[mcp]>=1.0.0"

Requires Python 3.10–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 after SessionMiddleware is installed.
# Do not read request.session without that middleware.
projection = McpProjection(
    enabled=True,
    principal_resolver=lambda request: getattr(request, "user", None),
)
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

Release files for hedron-mcp 0.2.5

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

Source distribution (sdist)

Source distribution for hedron-mcp 0.2.5
File Size Uploaded
hedron_mcp-0.2.5.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hedron-mcp 0.2.5
File Interpreter ABI Platform
hedron_mcp-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / hedron_mcp-0.2.5.tar.gz

Download URL hedron_mcp-0.2.5.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
54038f3c8f741cac0ba2c08cc570ed6710a2f80605b8f0bfae8972611c77ddbd
BLAKE2b-256 checksum
How to use checksums
e31923a82e9ac4cbb0b4d248f4845a2e50224b534ccd3be9b80434ddc3de76d1
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / hedron_mcp-0.2.5-py3-none-any.whl

Download URL hedron_mcp-0.2.5-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
996e39caa8809635724563ae08ca0be339458272f28cd5da61fb9c7afbaf32a8
BLAKE2b-256 checksum
How to use checksums
627119216262e18d2b2e141d87900fac554ba43139d2e4ad05131908d67f4064
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

0.2.6

2 release files

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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