Skip to main content
Pre-release

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

MCP Trust Monitor

A Python library that keeps MCP tool approval tied to the metadata an operator reviewed. When the monitor observes changed tool definitions, calls through the managed client stop until the new revision is reviewed and approved.

Version 0.2.0a1 is an alpha for local stdio servers. It provides an owning async SDK, a CLI, background monitoring, a local operator console, and decision-record export. Optional Semgrep, OpenAI, Senso and ClickHouse adapters add policy checks, review recommendations, reviewed precedents and audit delivery. Memory is off by default.

Install

Use Python 3.10 or 3.12 on macOS or Linux. Download the wheel and SHA256SUMS from the versioned GitHub release, verify its checksum, and install into your application's environment:

python3 -m venv .venv
.venv/bin/python -m pip install ./mcp_trust_monitor-0.2.0a1-py3-none-any.whl
.venv/bin/mcp-trust-monitor --help

The core library requires no cloud credentials. See the library guide for configuration, CLI commands, optional adapters, ownership and recovery. Windows and remote MCP transports are outside this release.

Try the enforcement boundary

The installed consumer example runs an independently configured synthetic server outside the checkout. It:

  1. observes a tool and explicitly approves that revision;
  2. completes one protected call;
  3. changes the server's metadata;
  4. shows the next call blocked, with the server's instrumented call count unchanged.

The example creates its own temporary policy and state. It needs no API key. Its scripted approval is for a controlled demonstration; a real application must present the exact revision and generation to its operator before approval.

Use the SDK

from pathlib import Path
from mcp_trust_monitor import MonitorConfig, ServerConfig, TrustMonitor

config = MonitorConfig(
    state_dir=Path("state"),
    policy_path=Path("operator-policy.json"),
    servers={"notes": ServerConfig(
        "notes", "/absolute/path/to/python",
        ("/absolute/path/to/notes_server.py",),
        cwd="/absolute/path/to/server-directory",
    )},
)

async def inspect():
    async with TrustMonitor(config) as monitor:
        observed = await monitor.observe("notes")
        # Display the observed metadata, revision and generation to your operator.
        # Call monitor.approve(...) only after that explicit decision.
        return observed

The owning monitor coordinates sessions for one state directory. Protected calls check approval, current metadata, launch identity, policy and session freshness before dispatch. A changed definition, failed observation, quarantine or stale selection blocks dispatch. Calls are never replayed automatically after an uncertain outcome. See the API and lifecycle contract.

What protection means

Only calls made through this library are covered. Observation starts the configured executable, so configure only processes you are prepared to run. The library does not sandbox code, verify package integrity, inspect returned document content, or guarantee that an approved tool behaves safely. An OpenAI review can recommend review or quarantine; it cannot approve a tool or override a deterministic hard denial.

Decision-record exports are pseudonymous, not anonymous. Memory requires human verdicts, exact-content approval, verified private publication and current local eligibility. It is optional and has no authority to approve calls.

Verification and evidence

The repaired runtime passed 570 tests on each of Python 3.10/3.12 across local macOS ARM64 and Linux ARM64, plus installed-wheel, typing and real filesystem-server checks. The CI workflow checks the release source on hosted Linux AMD64 and macOS ARM64. Exact hosted results and artifact hashes belong to the release's verification record.

The release evidence distinguishes current runtime checks from older live service experiments. The historical eight-case memory comparison tied at 24/24 per mode; it did not demonstrate an improvement. Private lesson records, service identifiers and raw provider data are not included in the public release.

Develop

uv sync --locked --python 3.12
uv run pytest -q
uv build
uv run python scripts/check_distribution.py
uv run python tests/typing/check.py

Tests use synthetic state and no cloud keys. Detector tests run pinned Semgrep 1.180.0 in an isolated uvx environment. Node.js is required for the console's JavaScript tests; set MTM_REQUIRE_NODE=1 to make its absence fail the suite.

Read the specification, console guide, and handoff before changing the trust boundary. Historical scripted demos remain available as python -m mcp_trust_monitor.historical_demo; they use separate demo state and are not the generic library CLI.

MIT licensed. Report bugs through GitHub issues.

Metadata

Release files for mcp-trust-monitor 0.2.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-trust-monitor 0.2.0a1
File Size Uploaded Provenance Actions
mcp_trust_monitor-0.2.0a1.tar.gz 451.7 kB With provenance Details for mcp_trust_monitor-0.2.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-trust-monitor 0.2.0a1
File Interpreter ABI Platform Actions
mcp_trust_monitor-0.2.0a1-py3-none-any.whl Python 3 none any Details for mcp_trust_monitor-0.2.0a1-py3-none-any.whl

Total release size: 594.9 kB

Release files / mcp_trust_monitor-0.2.0a1.tar.gz

Download URL mcp_trust_monitor-0.2.0a1.tar.gz
Size 451.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4cfd3dad0f4dbc50bd32e3ab06d5e1c45c5d17b0911ff4d649d7acbbbc04765e
BLAKE2b-256 checksum
How to use checksums
f0f55e4c6888ad0efd456c1d924b397e1e35d7098e8327069f3be664a2e3e13d
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 14, 2026.

Transparency log

Release files / mcp_trust_monitor-0.2.0a1-py3-none-any.whl

Download URL mcp_trust_monitor-0.2.0a1-py3-none-any.whl
Size 143.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef0ddfd41b4812fbe1fdc653147ce740d2c7fb3d6ccb0c2556b255eadd5da80d
BLAKE2b-256 checksum
How to use checksums
9faacd28944152d35f7ce70022872e4f5069d716b56cf78d91e7663f51d576fd
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 14, 2026.

Transparency log

Security for mcp-trust-monitor 0.2.0a1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_trust_monitor-0.2.0a1.tar.gz

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 14, 2026.

Transparency log

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.

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