custos-mcp
Runtime governance, policy enforcement, and cryptographic audit for MCP tool calls.
Every tools/call from an AI agent is evaluated against a policy, allowed or denied, timed, and appended to an Ed25519-signed hash-chained ledger. The ledger format is wire-compatible with the Node package — audit anywhere.
pip install custos-mcp[web]
Quickstart
from custos import Gate, Ledger, Actor, Server, generate_keypair, load_policy
kp = generate_keypair()
kp.save(".custos")
ledger = Ledger(".custos/ledger.jsonl", kp)
policy = load_policy("policy.yaml")
gate = Gate(policy, ledger, Actor("agent-1"), Server("fs"))
result = gate.call("read_file", {"path": "/workspace/x"}, fn=open_file)
if result.allowed:
print(result.result)
CLI
custos keygen # write .custos/ledger.key + ledger.pub
custos proxy --policy policy.yaml -- python -m my_mcp_server
custos verify --ledger .custos/ledger.jsonl
custos bundle out.tar.gz # export portable evidence
custos verify-bundle out.tar.gz
custos serve # dashboard on :8787
Policy DSL
version: 1
id: default
default: deny
rules:
- id: allow-read
when:
tool: read_file
args.path: {prefix: "/workspace/"}
decision: allow
reason: workspace-only reads
See spec/POLICY.md for the full grammar.
Release files for custos-mcp 0.2.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 | |
|---|---|---|---|
| custos_mcp-0.2.0.tar.gz | 24.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| custos_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.6 kB
Release files / custos_mcp-0.2.0.tar.gz
| Download URL | custos_mcp-0.2.0.tar.gz |
|---|---|
| Size | 24.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c6f0ccf91e879d88cc355104ef0fccaa4bd84393511aeca4728751d3c263258
|
|
BLAKE2b-256 checksum How to use checksums |
254719faa42c53c3d68a96be38637d3ad324defeb4b8dfa99dbe126c50791643
|
| 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 / custos_mcp-0.2.0-py3-none-any.whl
| Download URL | custos_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39b568ec42034469654eb44490fa681dccf259a07f58f4f2335db3d884d17849
|
|
BLAKE2b-256 checksum How to use checksums |
fb3acdc654f8aea174e5903c01031e04c6804fe03b38becae64c808480c52694
|
| 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