Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

MCP Event Subscriptions

An experimental, portable subscription record for MCP Events, with an optional JWE encrypted envelope.

Store the same record in a database, a key-value store, or an upstream webhook configuration. This repository defines its fields, encrypted encoding, and validation rules, with a Python reference implementation and conformance vectors.

Independent proposal. This is not an adopted MCP specification or an IETF RFC. The format may change before a stable release. It does not change MCP event requests or notification payloads.

What is here

Install the alpha release

Once the first release is published to PyPI:

pip install mcp-event-subscriptions==0.1.0a1

See RELEASING.md for the Trusted Publishing setup and release process.

Quick start

Python 3.12 or newer and uv:

uv sync --group dev
uv run python examples/roundtrip.py
uv run python -m unittest discover -s tests -v
import json
import secrets
from mcp_event_subscriptions import seal, open_envelope

record = json.load(open("examples/subscription.json"))
context = {
    "server": "https://mcp.example.com",
    "tenant": "project_demo",
    "resource": record["id"],
}
keys = {"k1": secrets.token_bytes(32)}
token = seal(record, keys, active_key="k1", context=context)
restored = open_envelope(token, keys, expected_context=context)
assert restored == record

The sample subscription expires in 2030. Examples and vectors use synthetic principals and secrets. Fixed test-vector keys are public fixtures, never production keys.

Scope

Version 1 describes webhook subscription state and optional encrypted storage. It does not specify a SQL layout, implement a delivery queue, establish current caller authorization, or make refresh/delete operations atomic. Adapters must provide their own coordination and revocation checks. Encryption cannot detect replay of an older, still-valid envelope without current state.

The Appwrite profile is documentation, not a working Appwrite adapter. It is not wire-compatible with the existing v1.<kid>.<ciphertext> envelope in appwrite/mcp PR #132.

Discussing the proposal

Start with the open questions: which fields should be common, whether an encrypted profile belongs alongside the schema, and what lifecycle guarantees adapters must expose. No proposal has been submitted upstream by this repository.

Development

uv run --group dev ruff check .
uv run --group dev black --check .
uv run python -m unittest discover -s tests -v
uv build

Licensed under the MIT License. See SECURITY.md before using the reference implementation with real secrets.

Metadata

Release files for mcp-event-subscriptions 0.1.0a1

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

Source distribution (sdist)

Source distribution for mcp-event-subscriptions 0.1.0a1
File Size Uploaded
mcp_event_subscriptions-0.1.0a1.tar.gz 75.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-event-subscriptions 0.1.0a1
File Interpreter ABI Platform
mcp_event_subscriptions-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 82.7 kB

Release files / mcp_event_subscriptions-0.1.0a1.tar.gz

Download URL mcp_event_subscriptions-0.1.0a1.tar.gz
Size 75.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2c34ea0af0605d27ca23a842092275b57b482ab2d47288e10d3bfcd88fbef19d
BLAKE2b-256 checksum
How to use checksums
db2ef6af884063973af62b006525f9accfd889b423af7548c4fc169ed27505a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / mcp_event_subscriptions-0.1.0a1-py3-none-any.whl

Download URL mcp_event_subscriptions-0.1.0a1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0bf02ca46e462b4b9d2deaf790ba5828254edbc36033cf509a64e47da31330b
BLAKE2b-256 checksum
How to use checksums
b513b3c37eb259cca28a19bcd374a54f3ce8ce903a6f8a61df23c324318e36f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

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