Skip to main content

ratchet-authz-mcp

MCP adapter for Ratchet — ASGI middleware that validates an Authorization: Bearer <token> header against the Ratchet broker before an MCP tool handler runs, aligned with RFC 8693 (Token Exchange) and RFC 8707 (Resource Indicators). Pure stdlib, no MCP SDK dependency required.

Install

pip install ratchet-authz-mcp

Minimal usage

from ratchet_core import Broker, Ed25519WorkloadIdentity, tool_name_caveat
from ratchet_mcp import RatchetASGIMiddleware

broker = Broker()
primary = Ed25519WorkloadIdentity("primary-agent")
token = broker.issue(
    human_identity="alice@example.com",
    primary_identity=primary,
    caveats=[tool_name_caveat("read_file")],
)

app = RatchetASGIMiddleware(mcp_app, broker=broker, identity_resolver=lambda scope: primary)

Full runnable example and architecture diagram: https://github.com/1manideep/ratchet/blob/main/examples/mcp_example.py

Metadata

Release files for ratchet-authz-mcp 0.1.0

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

Source distribution (sdist)

Source distribution for ratchet-authz-mcp 0.1.0
File Size Uploaded Provenance Actions
ratchet_authz_mcp-0.1.0.tar.gz 3.8 kB Without provenance Details for ratchet_authz_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ratchet-authz-mcp 0.1.0
File Interpreter ABI Platform Actions
ratchet_authz_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for ratchet_authz_mcp-0.1.0-py3-none-any.whl

Total release size: 8.4 kB

Release files / ratchet_authz_mcp-0.1.0.tar.gz

Download URL ratchet_authz_mcp-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
22d3ae8000605a2ec547964d0a9eb72d136c70eef3381afcc3afff53d38c3660
BLAKE2b-256 checksum
How to use checksums
32b71fdf2b4104fed1a4f46162b3e27d13989e07d3a8b3e74552ab83fa95adb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / ratchet_authz_mcp-0.1.0-py3-none-any.whl

Download URL ratchet_authz_mcp-0.1.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec5ad2d7173fd94f99ff339042cb966b3dff84ad8e27af76005356c607767316
BLAKE2b-256 checksum
How to use checksums
30ced87a0eca70d2d397d8940f2ced5d94e9331b06a7d6e0bb9b7b275648ada4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Security for ratchet-authz-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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