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

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

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.4
File Size Uploaded
hedron_mcp-0.2.4.tar.gz 17.4 kB Details

Built distribution (wheel)

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

Total release size: 37.3 kB

Release files / hedron_mcp-0.2.4.tar.gz

Download URL hedron_mcp-0.2.4.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
746ec43dd3480f8e0787c875c32a3a85799e322055a8fe5b2d56464a78fae60d
BLAKE2b-256 checksum
How to use checksums
23ae5aee35ae77e104299c9e9920e6b1db35d7a822733233247f7ebfb250cc7e
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.4-py3-none-any.whl

Download URL hedron_mcp-0.2.4-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ed14ac1fccccea177dbba5b9fd71ef5d04b5415a0f7506bf57653465fbb4adc
BLAKE2b-256 checksum
How to use checksums
80e957a6747f47e0dc4c174179921d30a2e3bfaed60b3bdb3b664db30811449d
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

This release

0.2.4 This release

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