agent-mcp-governance
Public Preview — Standalone Python package that exposes the Agent Governance Toolkit's MCP (Model Context Protocol) governance primitives for use outside the full AGT monorepo.
Overview
agent_mcp_governance provides a thin, typed re-export surface over the
governance, audit, and trust modules in
agent-os-kernel. It is
not zero-dependency — it requires agent-os-kernel >=3.0.0,<4.0.0.
Installation
pip install agent-mcp-governance
This will pull in agent-os-kernel automatically.
Quick Start
from agent_mcp_governance import (
GovernanceMiddleware,
AuditMiddleware,
TrustGate,
BehaviorMonitor,
)
# 1. Governance — block prompt-injection patterns
gov = GovernanceMiddleware(
blocked_patterns=[r"(?i)ignore previous instructions"],
allowed_tools=["web-search", "read-file"],
rate_limit_per_minute=60,
)
# 2. Audit — tamper-evident hash-chain logging
audit = AuditMiddleware(capture_data=True)
# 3. Trust — DID-based agent identity verification
gate = TrustGate(min_trust_score=500)
# 4. Monitoring — detect rogue agents
monitor = BehaviorMonitor(
burst_threshold=100,
consecutive_failure_threshold=20,
)
API Reference
| Export | Source module | Description |
|---|---|---|
GovernanceMiddleware |
agent_os.governance.middleware |
Policy enforcement (rate limits, allow-lists, content filters) |
AuditMiddleware |
agent_os.audit.middleware |
Tamper-evident audit logging with hash chain |
TrustGate |
agent_os.trust.gate |
DID-based trust verification for agent handoffs |
BehaviorMonitor |
agent_os.services.behavior_monitor |
Per-agent anomaly detection and quarantine |
Compatibility
| Python | agent-os-kernel |
|---|---|
| ≥ 3.10 | ≥ 3.0.0, < 4.0.0 |
License
MIT — Copyright (c) Microsoft Corporation.
Metadata
Release files for agent_mcp_governance 3.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_mcp_governance-3.7.0.tar.gz | 3.0 kB | Without provenance | Details for agent_mcp_governance-3.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_mcp_governance-3.7.0-py3-none-any.whl | Python 3 | none | any | Details for agent_mcp_governance-3.7.0-py3-none-any.whl |
Total release size: 5.9 kB
Release files / agent_mcp_governance-3.7.0.tar.gz
| Download URL | agent_mcp_governance-3.7.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c791e448af1bfd383e496d3325cb08c6728d361bb520b583aacd48f72797c498
|
|
BLAKE2b-256 checksum How to use checksums |
5d12fe605e5b90a673e8254f49d0572fb872a7aca87a9a5bc22100873eb4250e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / agent_mcp_governance-3.7.0-py3-none-any.whl
| Download URL | agent_mcp_governance-3.7.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec92bbc96de0659262a7f7130831d03ac4aa363e92d30977c60942c25b8ea1fd
|
|
BLAKE2b-256 checksum How to use checksums |
0a4c3c6ceb185d10576811d8c8b5d25b812e4b7d3c02567457826fe9347823c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Security for agent_mcp_governance 3.7.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.