mcp-governance
MCP Tool Governance — Specification Standard, Service Discovery & Error Contract.
Overview
Provides the platform-wide standard for MCP tool governance per ADR-010:
mcp_governance.spec— Pydantic v2 models (ToolSpec,ParamSpec,ReturnSpec) + enumsmcp_governance.response— Structured error contract (ok(),fail(),from_ssh())mcp_governance.spec.validator— Schema validation and compliance checking
Installation
pip install -e ".[dev]"
Usage
Define a ToolSpec
from mcp_governance.spec import ToolSpec, ToolCategory, ParamSpec
spec = ToolSpec(
name="docker_manage",
server="deployment_mcp",
description="Manage Docker containers and compose stacks on remote servers via SSH",
category=ToolCategory.DEVOPS_DEPLOY,
tags=["docker", "compose"],
)
Structured Responses
from mcp_governance.response import ok, fail
# Success
return ok({"containers": [...]}, suggestion="Use compose_ps for overview")
# Failure
return fail("Container not found", code="NOT_FOUND", retryable=False)
Validate Specs
from mcp_governance.spec.validator import validate_spec
result = validate_spec(spec)
if not result.is_valid:
print(result.errors)
Testing
PYTHONPATH=. python3.11 -m pytest tests/ -v
Package Structure
mcp_governance/
├── __init__.py
├── response.py # Shared error contract
└── spec/
├── __init__.py
├── enums.py # ToolCategory, TenantMode, SideEffect, ErrorPolicy
├── models.py # ParamSpec, ReturnSpec, ToolSpec
└── validator.py # validate_spec(), validate_registry()
Metadata
Release files for iil-mcp-governance 0.1.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 | |
|---|---|---|---|---|
| iil_mcp_governance-0.1.0.tar.gz | 9.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iil_mcp_governance-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / iil_mcp_governance-0.1.0.tar.gz
| Download URL | iil_mcp_governance-0.1.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de5a5afb87e25d47d854effdb0e025de2b928505671194c9d9ee45d3f9bd89c9
|
|
BLAKE2b-256 checksum How to use checksums |
bc0f0d45db9cdc2167dc4f36c53ff63de1c4438eb0d4bc7cb23caf5f0aabe031
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / iil_mcp_governance-0.1.0-py3-none-any.whl
| Download URL | iil_mcp_governance-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f7fbf7d9132c642d349f9515a359cb1b8f3a0e5f4a10064a00b28a697818201
|
|
BLAKE2b-256 checksum How to use checksums |
01991708c144300622bc5c59e0ed3f396f187293c5010abe61998fc1f0c35ca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for iil-mcp-governance 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.