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.6

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.6
File Size Uploaded
hedron_mcp-0.2.6.tar.gz 18.3 kB Details

Built distribution (wheel)

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

Total release size: 39.1 kB

Release files / hedron_mcp-0.2.6.tar.gz

Download URL hedron_mcp-0.2.6.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ec9b334b3fe7e19b2866bf7fcad7d2a17f83f2f10f12fa08293b2f547fc71d6a
BLAKE2b-256 checksum
How to use checksums
d72afc3e6c98703e0cd47ba04df9fc139efbb6656349c82a6f2c0fdf6a1e5348
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.6-py3-none-any.whl

Download URL hedron_mcp-0.2.6-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02acd4852d43e5f0aa12550cefc07a061ddb5726e33cbc0cc0baefa8e0c2a7fb
BLAKE2b-256 checksum
How to use checksums
c092aa101a1a1ee2290709582447508bedbaafa70a28f8e2dab0c6d4795ede7f
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

This release

0.2.6 This release

2 release files

0.2.5

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