Metadata-Version: 2.4
Name: fdu-team-mcp
Version: 0.1.0
Summary: MCP control plane for the FDU + Engineering delivery team: approval gate, packet and report validation, evidence ledger.
Author: Alberto Ancona
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/albanc80/agentic-delivery-team
Keywords: mcp,agents,governance,delivery,human-in-the-loop
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# team-mcp

The team's **control plane** as an MCP server, so the gates stop belonging to one harness.

Every host that speaks MCP — Claude Code, Codex CLI, Hermes, OpenClaw — can call the same implementations, which
means an approval means the same thing everywhere instead of meaning "OpenClaw checked it".

It reimplements no rule. Each tool shells out to the repository's own checkers, so the evaluation suite in
`pod/evaluation/` remains the definition of correct behaviour.

## Tools

| Tool | Purpose |
|---|---|
| `gate_check` | Gate A: verify a human ApprovalRecord against a DeliveryContract **by content hash**. Returns `APPROVED` or `BLOCKED` with reasons. |
| `packet_validate` | Validate a TaskPacket against the shipped schema. A packet that fails does not start a pod. |
| `report_validate` | Validate a CompletionReport. |
| `ledger_append` | Append one timestamped, tamper-evident line to an engagement ledger. |
| `roles_list` | The team as data: role, team, tier, exec posture, spawn list. |
| `constitution` | The rules (C1–C8) every role obeys. |

Tools only — no prompts, no resources — because a tool is the one primitive every host implements the same way.

## Run it

```bash
pip install fdu-team-mcp            # or: uvx fdu-team-mcp
FDU_TEAM_ROOT=/path/to/team-repo fdu-team-mcp
```

`FDU_TEAM_ROOT` must point at a checkout of this repository: that is where the checkers, schemas and manifest
live. Without it the server refuses to start rather than guessing.

## Wire it into a harness

**Claude Code** — in `.mcp.json` (or the plugin's MCP block):

```json
{ "mcpServers": { "team": {
    "command": "fdu-team-mcp",
    "env": { "FDU_TEAM_ROOT": "/path/to/team-repo" } } } }
```

**Codex CLI**:

```bash
codex mcp add team --env FDU_TEAM_ROOT=/path/to/team-repo -- fdu-team-mcp
```

**Hermes / OpenClaw** — both configure MCP servers in their own settings; point the command at `fdu-team-mcp` with
the same env var.

## Verify it works

```bash
python3 mcp/selftest_client.py
```

That spawns the server the way a harness does and speaks real stdio JSON-RPC at it: handshake, tool discovery,
an approval that passes, an **edited contract that is refused**, a ledger append, a packet that validates and a
template that does not. Eleven checks, all executed — see the run in the repository's CI.

## What it does not do

- **It cannot prove authorship.** `gate_check` proves a record matches the approved hash and that the approver
  identity differs from the requester. It cannot prove a human typed it. Sign the record if that matters.
- **It cannot enforce anything by itself.** A host that ignores a `BLOCKED` result is a host that ignores it. The
  gate is a control only where the role contract says the role must call it before spawning — the constitution's
  C6 and C7.
- **It does not ship on npm.** The control plane is Python because the validators are Python; an npm package
  would only hide that requirement, not remove it. `pip install fdu-team-mcp` and `uvx fdu-team-mcp` are the
  supported paths, and MCP hosts accept any command, so nothing downstream needs a Node package.
