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 extra:
pip install "hedron[mcp]>=0.61.0,<0.62"

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

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.2
File Size Uploaded
hedron_mcp-0.2.2.tar.gz 17.2 kB Details

Built distribution (wheel)

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

Total release size: 37.0 kB

Release files / hedron_mcp-0.2.2.tar.gz

Download URL hedron_mcp-0.2.2.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c6bff36baad83cd72d2ad8bc54683857282e1bb62ce01785cb1ca045714a887d
BLAKE2b-256 checksum
How to use checksums
d334ef58b92ba90acdbbf082109bd0552b779ced08bd03f60311513fbe40c0a7
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.2-py3-none-any.whl

Download URL hedron_mcp-0.2.2-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5486e8c18c2f783e495fc70f036a0c4e55c2cc426e2dbb7e2a00833996ce6d5c
BLAKE2b-256 checksum
How to use checksums
4819133a5d2437cb5755885f688fec98f70fe7aa667b06a842a81554b79c85d9
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

0.2.5

2 release files

0.2.4

2 release files

This release

0.2.2 This release

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