Skip to content

Commit cf78024

Browse files
linus131313claude
andcommitted
Add mkdocs-material documentation site
- mkdocs.yml with material theme and mkdocstrings - Home, Quickstart - Concepts: TCS, Capability-State Attestation, Breakpoints - Guides: CI integration, Policy authoring, Auditor handbook - Paper and SPEC pointer pages - docs.yml workflow already deploys to GitHub Pages on push to main Built with --strict, 3.4s, no warnings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7d2ff5b commit cf78024

12 files changed

Lines changed: 472 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ site/
5656
*.key
5757
.env
5858
.env.local
59+
site/

docs/concepts/attestation.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Capability-State Attestation
2+
3+
An **attestation** is a reproducible, signable snapshot of a host's
4+
runtime capability graph: what tools are bound, with what reach and
5+
action-level privilege, through what trust path, together with a TCS
6+
score, at a single point in time.
7+
8+
The full specification lives in [`SPEC.md`](../spec.md). The pydantic
9+
model and the JSON Schema shipped in the wheel are the authoritative
10+
artefacts; the spec document tracks them.
11+
12+
## Lifecycle
13+
14+
1. **Collect** — parse the MCP config file (Claude Desktop, Claude
15+
Code, Cursor). The source path and SHA-256 are recorded.
16+
2. **Classify** — each server's identity, reach, action, and
17+
third-party flag are derived from a deterministic classifier with a
18+
published catalogue and optional overrides.
19+
3. **Score** — TCS is computed with the paper's default weights; the
20+
exact weights used are recorded in the attestation.
21+
4. **Sign** — sigstore keyless produces a Rekor-logged signature bound
22+
to a GitHub OIDC identity or an email OAuth identity.
23+
5. **Verify** — any party can re-parse the JSON, recompute TCS, and
24+
check the signature against the transparency log.
25+
26+
## Fields
27+
28+
See the [SPEC](../spec.md) for the full field list. The high-level
29+
shape is:
30+
31+
- `host`, `config_source`
32+
- `tools[]` with per-tool `server`, `reach`, `action`, `resolved`
33+
- `tcs.value`, `tcs.weights`, `tcs.third_party_count`
34+
- `policy_refs[]`, `signature`

docs/concepts/breakpoints.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Control Breakpoints B1–B6
2+
3+
The six control families from Table 6 of the paper, each operationalised
4+
as a Python function that returns a structured `CheckResult`.
5+
6+
| Check | Control family | Behaviour |
7+
|-------|----------------|-----------|
8+
| B1 | Change management | Diffs two attestations, flags added/removed/reclassified tools. |
9+
| B2 | Third-party risk | Enumerates third-party servers against an allow-list. |
10+
| B3 | Data loss prevention | Flags local-to-network tool compositions. |
11+
| B4 | Privileged access | TCS threshold + execute-capable tool enumeration. |
12+
| B5 | Audit and monitoring | Emits OCSF / CEF for SIEM ingestion; requires signed attestation. |
13+
| B6 | AI-specific capability state | Detects graph changes under a stable host version. |
14+
15+
## Framework mapping
16+
17+
Every check is mapped to specific clauses in the three major AI
18+
governance frameworks:
19+
20+
```bash
21+
mcp-gov mappings list
22+
mcp-gov mappings show iso42001
23+
mcp-gov mappings show nist-ai-600-1
24+
mcp-gov mappings show eu-ai-act
25+
```
26+
27+
## Severity
28+
29+
Each check returns one of:
30+
31+
- `pass` — control satisfied.
32+
- `info` — observation; not a policy violation.
33+
- `warn` — attention required; not a blocker.
34+
- `block` — policy violation; CI/pre-commit will fail.

docs/concepts/tcs.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Tool Graph Capability Score (TCS)
2+
3+
## Formula
4+
5+
Given a tool graph `G` (the set of tools bound to a host), TCS is:
6+
7+
$$
8+
\mathrm{TCS}(G) = \left[ \sum_{t \in G} \mathrm{reach}(t) \cdot \mathrm{action}(t) \right] \cdot \left( 1 + t_{\mathrm{coef}} \cdot T(G) \right)
9+
$$
10+
11+
where
12+
13+
- `reach(t)` is `local=1` or `network=2`,
14+
- `action(t)` is `read=1`, `write=2`, or `execute=3`,
15+
- `T(G)` is the count of third-party (non-first-party-to-the-host) servers,
16+
- `t_coef` defaults to `0.25`.
17+
18+
## What TCS is, and is not
19+
20+
TCS is a **comparability** metric, not a safety metric. Its value is
21+
that it is reproducible and ordinally stable: under all 48 reasonable
22+
reweightings tested in the paper (`w_write ∈ {1.5, 2, 2.5, 3}`,
23+
`w_execute ∈ {2, 3, 4, 5}`, `t_coef ∈ {0.1, 0.25, 0.5}`), the
24+
comparisons that matter hold — `C4 > R4` in 48/48, `C3 > R3` in 48/48,
25+
`C2 > R3` in 39/48. The exact ranking is preserved in 20 of the 48.
26+
27+
You can reproduce this analysis locally:
28+
29+
```bash
30+
mcp-gov tcs sensitivity
31+
```
32+
33+
## Table 3 reproduction
34+
35+
```bash
36+
mcp-gov tcs reference
37+
```
38+
39+
The values printed match the paper to the decimal: C1=1.0, C2=9.0,
40+
C3=13.5, C4=49.5, C5=29.75, R1=2.0, R2=5.0, R3=7.0, R4=15.0.

docs/guides/auditor-handbook.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Auditor handbook
2+
3+
This page is written for the auditor who has never seen an MCP
4+
attestation before. It tells you: what a conformant attestation looks
5+
like, how to read it, and which clauses of ISO 42001 / NIST AI 600-1 /
6+
EU AI Act each field addresses.
7+
8+
## What you should receive
9+
10+
The deployer should hand you, for each covered host:
11+
12+
1. A **Capability-State Attestation** JSON file, signed via sigstore
13+
keyless. Schema: `attestation-v0.schema.json`. Spec: `SPEC.md`.
14+
2. The **policy** YAML that was active when the attestation was
15+
produced. It specifies thresholds and allow-lists.
16+
3. The **policy report** (JSON) produced by `mcp-gov check`. Lists one
17+
result per breakpoint with severity `pass | info | warn | block`.
18+
4. The **framework mapping** for your target framework (ISO 42001,
19+
NIST AI 600-1, or EU AI Act). The deployer can emit it with
20+
`mcp-gov mappings show iso42001`.
21+
22+
## How to verify the attestation
23+
24+
```bash
25+
mcp-gov verify attestation.json \
26+
--expected-identity user@example.com \
27+
--expected-issuer https://accounts.google.com
28+
```
29+
30+
The tool:
31+
32+
- validates the JSON against the schema,
33+
- recomputes the TCS from the `tools` array,
34+
- verifies the sigstore bundle against the transparency log and the
35+
expected identity/issuer.
36+
37+
Any mismatch causes a non-zero exit code.
38+
39+
## Clause mapping
40+
41+
Each breakpoint is mapped to specific clauses. See the
42+
`mcp_governance_kit.mappings` bundle for the authoritative source.
43+
44+
- **ISO/IEC 42001:2023 Annex A** — B1 → A.6.2.5 and A.6.2.6; B2 → A.10.2
45+
and A.10.3; B4 → A.4.5 and A.9.3; B5 → A.6.2.6 and A.9.4; B6 → A.6.2.4
46+
and A.6.2.8.
47+
- **NIST AI 600-1** — B1 → GOVERN-1.4-004 and MANAGE-2.4-002; B2 →
48+
GOVERN-6.1-001 and MAP-4.1-003; B4 → MANAGE-1.2-004 and MANAGE-2.2-001;
49+
B5 → MEASURE-2.8-001 and MANAGE-2.3-002; B6 → MAP-3.1-002 and
50+
MANAGE-4.2-001.
51+
- **EU AI Act** — B1 → Art. 55(1)(b); B2 → Art. 25 and 53(1)(b); B4 →
52+
Art. 14 and 15(4); B5 → Art. 12 and 55(1)(c); B6 → Art. 51 and 55(1)(a).
53+
54+
## What the paper says you will not find
55+
56+
The paper argues that **no published framework text** currently
57+
operationalises a runtime capability-state primitive. The attestation
58+
is that primitive. Treat clause mappings above as the adjacent text you
59+
can cite; treat the attestation itself as the evidence artefact.

docs/guides/ci-integration.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# CI integration
2+
3+
The kit ships a composite GitHub Action at the root of the repository.
4+
5+
## Minimal workflow
6+
7+
`.github/workflows/mcp-governance.yml`:
8+
9+
```yaml
10+
name: MCP Governance
11+
on:
12+
pull_request:
13+
paths: [".mcp.json", "policies/*.yaml"]
14+
15+
permissions:
16+
id-token: write # required for sigstore keyless
17+
contents: read
18+
19+
jobs:
20+
attest:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: linus131313/mcp-governance-kit@v0
25+
with:
26+
config-path: .mcp.json
27+
policy-path: policies/default.yaml
28+
fail-on-warn: "false"
29+
```
30+
31+
## What the action does
32+
33+
1. Installs `mcp-governance-kit[sign]`.
34+
2. Runs `mcp-gov attest` with `--sign` (sigstore keyless via GitHub OIDC).
35+
3. Uploads the TCS and attestation path as step outputs.
36+
4. Runs `mcp-gov check` against the supplied policy.
37+
5. Writes the JSON report to the GitHub Actions job summary.
38+
6. Fails the job on `BLOCK`; also fails on `WARN` when `fail-on-warn` is true.
39+
40+
## Attestation as a release artefact
41+
42+
To publish the signed attestation as part of a release, add a follow-up
43+
step:
44+
45+
```yaml
46+
- uses: softprops/action-gh-release@v2
47+
if: startsWith(github.ref, 'refs/tags/')
48+
with:
49+
files: ${{ steps.run.outputs.attestation-path }}
50+
```

docs/guides/policy-authoring.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Policy authoring
2+
3+
A policy is a YAML document that parameterises the six breakpoint checks.
4+
The schema is defined in `mcp_governance_kit.policy.Policy` and validates
5+
on load.
6+
7+
## Minimal example
8+
9+
```yaml
10+
version: 1
11+
name: my-team
12+
max_tcs: 20
13+
max_third_party: 5
14+
third_party_allowlist:
15+
- "@modelcontextprotocol/server-github"
16+
- "@modelcontextprotocol/server-filesystem"
17+
```
18+
19+
## Full reference
20+
21+
| Field | Type | Meaning |
22+
|-------|------|---------|
23+
| `version` | int | Schema version; default 1. |
24+
| `name` | string | Human name; shown in the policy report. |
25+
| `max_tcs` | float? | If TCS exceeds, B4 blocks. |
26+
| `warn_tcs` | float? | If TCS exceeds, B4 warns. |
27+
| `max_third_party` | int? | If exceeded, B2 blocks. |
28+
| `third_party_allowlist` | string[] | Identities not on the list trigger B2 warn. |
29+
| `require_approval_for_execute` | bool | B4 blocks when network+execute tools are bound without approval. |
30+
| `execute_approved` | bool | Set to lift the B4 block when approval has been obtained. |
31+
| `require_approval_for_changes` | bool | B1 blocks on any change without an approval flag. |
32+
| `changes_approved` | bool | Set to lift the B1 block. |
33+
| `allow_exfil_paths` | bool | If true, B3 downgrades warn to info. |
34+
35+
## Three built-in policies
36+
37+
| Policy | Intended role | Highlights |
38+
|--------|---------------|------------|
39+
| `default.yaml` | Starting point for most teams | TCS ≤ 30, warn at 15. |
40+
| `developer.yaml` | Full-stack engineering | TCS ≤ 20, allow-list covers git/shell/docker. |
41+
| `restricted.yaml` | Analyst / data-science | TCS ≤ 10, execute requires approval. |

docs/index.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# mcp-governance-kit
2+
3+
Runtime capability-state attestation for Model Context Protocol agents.
4+
5+
Companion implementation to [*The MCP Governance Gap*](paper.md)
6+
(Teklenburg, 2026). The paper identifies a missing governance primitive:
7+
8+
> a reproducible, signable snapshot of what tools an agent can reach,
9+
> with what action-level privilege, through what trust path, that an
10+
> auditor can test against.
11+
12+
This kit implements that primitive. It ships:
13+
14+
- a Tool Graph Capability Score (TCS) scorer that reproduces Table 3 of
15+
the paper exactly;
16+
- a JSON-Schema'd, versioned attestation format signable with sigstore;
17+
- six control-breakpoint checks (B1–B6) mapped to ISO 42001, NIST AI
18+
600-1, and the EU AI Act;
19+
- three adoption paths — GitHub Action, pre-commit hook, Claude Code
20+
PreToolUse hook.
21+
22+
## Install
23+
24+
```bash
25+
pip install mcp-governance-kit # core
26+
pip install 'mcp-governance-kit[sign]' # + sigstore signing
27+
```
28+
29+
## One-minute demo
30+
31+
```bash
32+
mcp-gov attest .mcp.json --host-id $HOSTNAME --out att.json --sign
33+
mcp-gov check att.json --policy policies/default.yaml
34+
```
35+
36+
See [Quickstart](quickstart.md) for a full walk-through.

docs/paper.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# The paper
2+
3+
The full companion paper is archived in the repository at
4+
[`paper/governance-speed-gap.pdf`](https://github.com/linus131313/mcp-governance-kit/blob/main/paper/governance-speed-gap.pdf).
5+
6+
## Abstract
7+
8+
A typical developer agent configured with the Model Context Protocol
9+
(MCP) scores 13.5 on the Tool Graph Capability Score introduced in the
10+
paper, 1.9× the score of a traditional database-administration-plus-shell
11+
tool; a full-stack developer configuration scores 49.5, 3.3× that of a
12+
domain-administrator workstation and 7.1× the database-administration
13+
tool. These comparisons hold under all 48 reweightings tested in a
14+
sensitivity analysis. The capability expansion happens outside any
15+
change-management process: MCP allows language-model hosts to bind
16+
external tools at runtime, a property no AI-specific governance
17+
framework in applicable form yet addresses.
18+
19+
The paper quantifies the gap between the adoption curve of agentic tool
20+
binding and the response cadence of the three governance regimes CISOs
21+
rely on, identifies six control breakpoints where application-centric
22+
controls fail under an MCP-native architecture, and concludes that
23+
closing the gap requires a new primitive — runtime capability-state
24+
attestation — that no published revision yet defines.
25+
26+
**This repository implements that primitive.**
27+
28+
## Citation
29+
30+
See [`paper/CITATION.cff`](https://github.com/linus131313/mcp-governance-kit/blob/main/paper/CITATION.cff)
31+
for a machine-readable citation. BibTeX equivalent:
32+
33+
```bibtex
34+
@article{teklenburg2026mcp,
35+
title = {The {MCP} Governance Gap: Empirical Evidence on Dynamic
36+
Tool Binding in Enterprise {AI}},
37+
author = {Teklenburg, Linus},
38+
year = {2026},
39+
month = {4},
40+
note = {Independent Researcher},
41+
url = {https://github.com/linus131313/mcp-governance-kit/blob/main/paper/governance-speed-gap.pdf}
42+
}
43+
```

0 commit comments

Comments
 (0)