Watchlight MCP Runtime PEP
A Policy Enforcement Point for the Model Context Protocol. It sits in front of an upstream MCP server and makes one guarantee:
No governed MCP action reaches the target system until Watchlight has made a deterministic runtime authorization decision — and only an explicit PERMIT forwards it.
Every tools/call is authorized in-process by the real Watchlight engine
before it can reach the upstream server. A denied call is blocked before it
executes — not detected after. Zero infrastructure: no database, no network
hop, no sidecar.
Install
pip install watchlight-mcp
Run
import watchlight_mcp
watchlight_mcp.serve(
listen_addr="127.0.0.1:9700",
upstream_url="http://localhost:3000/mcp", # the MCP server you are governing
upstream_server="github", # a stable name for it (used in policy + audit)
policy_files=["policies/allow-read.json"], # Cedar policies, wl-apdp shape
audit_path="audit/mcp-pep.jsonl", # value-free JSONL audit (omit → logs)
)
Point your MCP client at http://127.0.0.1:9700/mcp instead of the server
directly. Governed tools/calls are authorized; everything else is forwarded
transparently.
What it enforces
- MCP
2026-07-28Streamable HTTP: the JSON-RPC body is authoritative, and theMcp-Method/Mcp-Name/MCP-Protocol-Versionrouting headers are validated against it — a spoofed header cannot route a governed call around enforcement. - Fail-closed: a deny, a runtime error, a malformed body, a header/body mismatch, or an unsupported protocol version all block the action. The upstream is contacted only on an explicit permit.
- Value-free audit: the audit record has no field for tool arguments, tokens, or credentials — only the decision and safe correlation ids.
Identity
The PEP reads client-asserted Watchlight-* headers (Watchlight-Agent-Id,
Watchlight-Execution-Id, …) to build the authorization principal and execution
context — the Developer-Edition trust model. Without an attributed agent, the
action is denied by default.
© Watchlight AI. The embedded runtime is proprietary; see LICENSE.
Release files for watchlight-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| watchlight_mcp-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| watchlight_mcp-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| watchlight_mcp-0.2.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| watchlight_mcp-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 21.5 MB
Release files / watchlight_mcp-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | watchlight_mcp-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
29ec1d11271fd263633f05eb2bfeded35f9b4054854e96929d8bf5e56aeda050
|
|
BLAKE2b-256 checksum How to use checksums |
eeadb7349b0b56112e324aadcc0a6a2f9a4c42b6cb222be2f4b8adf1c00c7ce9
|
| 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 Aug 27, 2026.
Transparency logRelease files / watchlight_mcp-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | watchlight_mcp-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0fa10a625c62d3387588cb39cd9f11f07b40923dc67f9bf3bdeb960eb77b38e1
|
|
BLAKE2b-256 checksum How to use checksums |
0451a4887dd11fa5ad31b4baeaaeb5e6324a843a39e4eb4b184b41685095588c
|
| 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 Aug 27, 2026.
Transparency logRelease files / watchlight_mcp-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | watchlight_mcp-0.2.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d7844df0111de7f978ce2cab4b91a6df72b077145a2bda3980aef6a2edf59947
|
|
BLAKE2b-256 checksum How to use checksums |
a3ade030f6a863a6c2cd720f3e04cd2033422c57eed812a71cb71fd049ea98cc
|
| 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 Aug 27, 2026.
Transparency logRelease files / watchlight_mcp-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | watchlight_mcp-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
63986cc750001496f8286ff2ce45eef07722015d582e4c34abe4e8e861678ee5
|
|
BLAKE2b-256 checksum How to use checksums |
0ec2a806487d7aa7f631e3f2ea1b8f0fc11b5eccef8bfb226f6bf7c995f2bf9f
|
| 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 Aug 27, 2026.
Transparency log