Metadata-Version: 2.4
Name: knowyouragenticai-mcp-audit
Version: 0.1.1
Summary: Know Your AgenticAI: grades what an MCP server declares (tools/list) and produces (tools/call), checking schema honesty, overclaiming descriptions, hidden failures, undeclared scope, and secret leakage, then seals the reading into a tamper-evident receipt.
Author-email: Orume Dominic Uririe <dominicrume@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://rumedominic.com/kya
Keywords: mcp,ai,agentic,audit,receipts,kya,security,governance,tamper-evident,model-context-protocol
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: knowyouragenticai-receipts>=1.5.0
Dynamic: license-file

# Know Your AgenticAI: MCP output audit

The infrastructure layer, not the agent. This grades what an MCP server (and,
next, an API) **declares and produces**, and seals the reading into a
tamper-evident receipt.

## Why this lane

A code-quality auditor is something any lab can build and own. This is not that.
The platform that ships an MCP server cannot be its own neutral auditor, so a
neutral party that grades what a server produces and hands back a portable,
tamper-evident receipt is a layer the platform cannot credibly own. That
neutrality is the moat. We do not build agents. We check the infrastructure the
agents run on.

## What it does today (a first slice, honest about its limits)

- Reads a server's declared tools (`tools/list`): schema present, description
  honest (it flags the same absolute claims KYA refuses in its own copy), inputs
  declared.
- Reads produced outputs (`tools/call` results): result shape, honesty of
  success (a failure reported as a success), scope (a tool answering that was
  never declared), and obvious secret leakage.
- Seals the whole reading into a receipt with `code`-grade tamper evidence. The
  receipt's outcome is REFUSED when the worst finding is high severity: a
  ship-gate the producer chose, not a safety clearance.

It does not run a live adversarial probe, understand each tool's domain, or
prove a server is safe. A reading is a reading.

## Use it

```python
from mcp_audit import audit, seal, capture

# From a captured transcript (tools/list + some tools/call results):
import json
summary = audit.audit(json.load(open("transcript.json")))
print(summary["counts"], summary["worst_severity"])
receipt = seal.seal(summary, save_path="mcp_audit_receipts.json")

# Or straight from a live stdio MCP server:
transcript = capture.capture(["kya", "mcp"], server_name="kya",
                             calls=[{"name": "kya_standard", "arguments": {}}])
summary = audit.audit(transcript)
seal.seal(summary)
```

Sealing needs `knowyouragenticai-receipts>=1.5.0` (the release that added the
sealed `audit` field).

## Dogfood first

The honest first move is to point this at KYA's own MCP server and publish the
receipt. Audit yourself before you audit anyone else.

## Test

```
pip install -U "knowyouragenticai-receipts>=1.5.0"
python tests/test_audit.py
```
