fdu-team-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fdu_team_mcp-0.1.0/LICENSE +201 -0
- fdu_team_mcp-0.1.0/PKG-INFO +91 -0
- fdu_team_mcp-0.1.0/README.md +72 -0
- fdu_team_mcp-0.1.0/fdu_team_mcp.egg-info/PKG-INFO +91 -0
- fdu_team_mcp-0.1.0/fdu_team_mcp.egg-info/SOURCES.txt +11 -0
- fdu_team_mcp-0.1.0/fdu_team_mcp.egg-info/dependency_links.txt +1 -0
- fdu_team_mcp-0.1.0/fdu_team_mcp.egg-info/entry_points.txt +2 -0
- fdu_team_mcp-0.1.0/fdu_team_mcp.egg-info/top_level.txt +1 -0
- fdu_team_mcp-0.1.0/pyproject.toml +32 -0
- fdu_team_mcp-0.1.0/setup.cfg +4 -0
- fdu_team_mcp-0.1.0/team_mcp/__init__.py +3 -0
- fdu_team_mcp-0.1.0/team_mcp/__main__.py +4 -0
- fdu_team_mcp-0.1.0/team_mcp/server.py +239 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Alberto Ancona
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fdu-team-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP control plane for the FDU + Engineering delivery team: approval gate, packet and report validation, evidence ledger.
|
|
5
|
+
Author: Alberto Ancona
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/albanc80/agentic-delivery-team
|
|
8
|
+
Keywords: mcp,agents,governance,delivery,human-in-the-loop
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
14
|
+
Classifier: Typing :: Typed
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# team-mcp
|
|
21
|
+
|
|
22
|
+
The team's **control plane** as an MCP server, so the gates stop belonging to one harness.
|
|
23
|
+
|
|
24
|
+
Every host that speaks MCP — Claude Code, Codex CLI, Hermes, OpenClaw — can call the same implementations, which
|
|
25
|
+
means an approval means the same thing everywhere instead of meaning "OpenClaw checked it".
|
|
26
|
+
|
|
27
|
+
It reimplements no rule. Each tool shells out to the repository's own checkers, so the evaluation suite in
|
|
28
|
+
`pod/evaluation/` remains the definition of correct behaviour.
|
|
29
|
+
|
|
30
|
+
## Tools
|
|
31
|
+
|
|
32
|
+
| Tool | Purpose |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `gate_check` | Gate A: verify a human ApprovalRecord against a DeliveryContract **by content hash**. Returns `APPROVED` or `BLOCKED` with reasons. |
|
|
35
|
+
| `packet_validate` | Validate a TaskPacket against the shipped schema. A packet that fails does not start a pod. |
|
|
36
|
+
| `report_validate` | Validate a CompletionReport. |
|
|
37
|
+
| `ledger_append` | Append one timestamped, tamper-evident line to an engagement ledger. |
|
|
38
|
+
| `roles_list` | The team as data: role, team, tier, exec posture, spawn list. |
|
|
39
|
+
| `constitution` | The rules (C1–C8) every role obeys. |
|
|
40
|
+
|
|
41
|
+
Tools only — no prompts, no resources — because a tool is the one primitive every host implements the same way.
|
|
42
|
+
|
|
43
|
+
## Run it
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install fdu-team-mcp # or: uvx fdu-team-mcp
|
|
47
|
+
FDU_TEAM_ROOT=/path/to/team-repo fdu-team-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`FDU_TEAM_ROOT` must point at a checkout of this repository: that is where the checkers, schemas and manifest
|
|
51
|
+
live. Without it the server refuses to start rather than guessing.
|
|
52
|
+
|
|
53
|
+
## Wire it into a harness
|
|
54
|
+
|
|
55
|
+
**Claude Code** — in `.mcp.json` (or the plugin's MCP block):
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{ "mcpServers": { "team": {
|
|
59
|
+
"command": "fdu-team-mcp",
|
|
60
|
+
"env": { "FDU_TEAM_ROOT": "/path/to/team-repo" } } } }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Codex CLI**:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
codex mcp add team --env FDU_TEAM_ROOT=/path/to/team-repo -- fdu-team-mcp
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Hermes / OpenClaw** — both configure MCP servers in their own settings; point the command at `fdu-team-mcp` with
|
|
70
|
+
the same env var.
|
|
71
|
+
|
|
72
|
+
## Verify it works
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python3 mcp/selftest_client.py
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
That spawns the server the way a harness does and speaks real stdio JSON-RPC at it: handshake, tool discovery,
|
|
79
|
+
an approval that passes, an **edited contract that is refused**, a ledger append, a packet that validates and a
|
|
80
|
+
template that does not. Eleven checks, all executed — see the run in the repository's CI.
|
|
81
|
+
|
|
82
|
+
## What it does not do
|
|
83
|
+
|
|
84
|
+
- **It cannot prove authorship.** `gate_check` proves a record matches the approved hash and that the approver
|
|
85
|
+
identity differs from the requester. It cannot prove a human typed it. Sign the record if that matters.
|
|
86
|
+
- **It cannot enforce anything by itself.** A host that ignores a `BLOCKED` result is a host that ignores it. The
|
|
87
|
+
gate is a control only where the role contract says the role must call it before spawning — the constitution's
|
|
88
|
+
C6 and C7.
|
|
89
|
+
- **It does not ship on npm.** The control plane is Python because the validators are Python; an npm package
|
|
90
|
+
would only hide that requirement, not remove it. `pip install fdu-team-mcp` and `uvx fdu-team-mcp` are the
|
|
91
|
+
supported paths, and MCP hosts accept any command, so nothing downstream needs a Node package.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# team-mcp
|
|
2
|
+
|
|
3
|
+
The team's **control plane** as an MCP server, so the gates stop belonging to one harness.
|
|
4
|
+
|
|
5
|
+
Every host that speaks MCP — Claude Code, Codex CLI, Hermes, OpenClaw — can call the same implementations, which
|
|
6
|
+
means an approval means the same thing everywhere instead of meaning "OpenClaw checked it".
|
|
7
|
+
|
|
8
|
+
It reimplements no rule. Each tool shells out to the repository's own checkers, so the evaluation suite in
|
|
9
|
+
`pod/evaluation/` remains the definition of correct behaviour.
|
|
10
|
+
|
|
11
|
+
## Tools
|
|
12
|
+
|
|
13
|
+
| Tool | Purpose |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `gate_check` | Gate A: verify a human ApprovalRecord against a DeliveryContract **by content hash**. Returns `APPROVED` or `BLOCKED` with reasons. |
|
|
16
|
+
| `packet_validate` | Validate a TaskPacket against the shipped schema. A packet that fails does not start a pod. |
|
|
17
|
+
| `report_validate` | Validate a CompletionReport. |
|
|
18
|
+
| `ledger_append` | Append one timestamped, tamper-evident line to an engagement ledger. |
|
|
19
|
+
| `roles_list` | The team as data: role, team, tier, exec posture, spawn list. |
|
|
20
|
+
| `constitution` | The rules (C1–C8) every role obeys. |
|
|
21
|
+
|
|
22
|
+
Tools only — no prompts, no resources — because a tool is the one primitive every host implements the same way.
|
|
23
|
+
|
|
24
|
+
## Run it
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install fdu-team-mcp # or: uvx fdu-team-mcp
|
|
28
|
+
FDU_TEAM_ROOT=/path/to/team-repo fdu-team-mcp
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`FDU_TEAM_ROOT` must point at a checkout of this repository: that is where the checkers, schemas and manifest
|
|
32
|
+
live. Without it the server refuses to start rather than guessing.
|
|
33
|
+
|
|
34
|
+
## Wire it into a harness
|
|
35
|
+
|
|
36
|
+
**Claude Code** — in `.mcp.json` (or the plugin's MCP block):
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{ "mcpServers": { "team": {
|
|
40
|
+
"command": "fdu-team-mcp",
|
|
41
|
+
"env": { "FDU_TEAM_ROOT": "/path/to/team-repo" } } } }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Codex CLI**:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
codex mcp add team --env FDU_TEAM_ROOT=/path/to/team-repo -- fdu-team-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Hermes / OpenClaw** — both configure MCP servers in their own settings; point the command at `fdu-team-mcp` with
|
|
51
|
+
the same env var.
|
|
52
|
+
|
|
53
|
+
## Verify it works
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python3 mcp/selftest_client.py
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
That spawns the server the way a harness does and speaks real stdio JSON-RPC at it: handshake, tool discovery,
|
|
60
|
+
an approval that passes, an **edited contract that is refused**, a ledger append, a packet that validates and a
|
|
61
|
+
template that does not. Eleven checks, all executed — see the run in the repository's CI.
|
|
62
|
+
|
|
63
|
+
## What it does not do
|
|
64
|
+
|
|
65
|
+
- **It cannot prove authorship.** `gate_check` proves a record matches the approved hash and that the approver
|
|
66
|
+
identity differs from the requester. It cannot prove a human typed it. Sign the record if that matters.
|
|
67
|
+
- **It cannot enforce anything by itself.** A host that ignores a `BLOCKED` result is a host that ignores it. The
|
|
68
|
+
gate is a control only where the role contract says the role must call it before spawning — the constitution's
|
|
69
|
+
C6 and C7.
|
|
70
|
+
- **It does not ship on npm.** The control plane is Python because the validators are Python; an npm package
|
|
71
|
+
would only hide that requirement, not remove it. `pip install fdu-team-mcp` and `uvx fdu-team-mcp` are the
|
|
72
|
+
supported paths, and MCP hosts accept any command, so nothing downstream needs a Node package.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fdu-team-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP control plane for the FDU + Engineering delivery team: approval gate, packet and report validation, evidence ledger.
|
|
5
|
+
Author: Alberto Ancona
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/albanc80/agentic-delivery-team
|
|
8
|
+
Keywords: mcp,agents,governance,delivery,human-in-the-loop
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
14
|
+
Classifier: Typing :: Typed
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# team-mcp
|
|
21
|
+
|
|
22
|
+
The team's **control plane** as an MCP server, so the gates stop belonging to one harness.
|
|
23
|
+
|
|
24
|
+
Every host that speaks MCP — Claude Code, Codex CLI, Hermes, OpenClaw — can call the same implementations, which
|
|
25
|
+
means an approval means the same thing everywhere instead of meaning "OpenClaw checked it".
|
|
26
|
+
|
|
27
|
+
It reimplements no rule. Each tool shells out to the repository's own checkers, so the evaluation suite in
|
|
28
|
+
`pod/evaluation/` remains the definition of correct behaviour.
|
|
29
|
+
|
|
30
|
+
## Tools
|
|
31
|
+
|
|
32
|
+
| Tool | Purpose |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `gate_check` | Gate A: verify a human ApprovalRecord against a DeliveryContract **by content hash**. Returns `APPROVED` or `BLOCKED` with reasons. |
|
|
35
|
+
| `packet_validate` | Validate a TaskPacket against the shipped schema. A packet that fails does not start a pod. |
|
|
36
|
+
| `report_validate` | Validate a CompletionReport. |
|
|
37
|
+
| `ledger_append` | Append one timestamped, tamper-evident line to an engagement ledger. |
|
|
38
|
+
| `roles_list` | The team as data: role, team, tier, exec posture, spawn list. |
|
|
39
|
+
| `constitution` | The rules (C1–C8) every role obeys. |
|
|
40
|
+
|
|
41
|
+
Tools only — no prompts, no resources — because a tool is the one primitive every host implements the same way.
|
|
42
|
+
|
|
43
|
+
## Run it
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install fdu-team-mcp # or: uvx fdu-team-mcp
|
|
47
|
+
FDU_TEAM_ROOT=/path/to/team-repo fdu-team-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`FDU_TEAM_ROOT` must point at a checkout of this repository: that is where the checkers, schemas and manifest
|
|
51
|
+
live. Without it the server refuses to start rather than guessing.
|
|
52
|
+
|
|
53
|
+
## Wire it into a harness
|
|
54
|
+
|
|
55
|
+
**Claude Code** — in `.mcp.json` (or the plugin's MCP block):
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{ "mcpServers": { "team": {
|
|
59
|
+
"command": "fdu-team-mcp",
|
|
60
|
+
"env": { "FDU_TEAM_ROOT": "/path/to/team-repo" } } } }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Codex CLI**:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
codex mcp add team --env FDU_TEAM_ROOT=/path/to/team-repo -- fdu-team-mcp
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Hermes / OpenClaw** — both configure MCP servers in their own settings; point the command at `fdu-team-mcp` with
|
|
70
|
+
the same env var.
|
|
71
|
+
|
|
72
|
+
## Verify it works
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python3 mcp/selftest_client.py
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
That spawns the server the way a harness does and speaks real stdio JSON-RPC at it: handshake, tool discovery,
|
|
79
|
+
an approval that passes, an **edited contract that is refused**, a ledger append, a packet that validates and a
|
|
80
|
+
template that does not. Eleven checks, all executed — see the run in the repository's CI.
|
|
81
|
+
|
|
82
|
+
## What it does not do
|
|
83
|
+
|
|
84
|
+
- **It cannot prove authorship.** `gate_check` proves a record matches the approved hash and that the approver
|
|
85
|
+
identity differs from the requester. It cannot prove a human typed it. Sign the record if that matters.
|
|
86
|
+
- **It cannot enforce anything by itself.** A host that ignores a `BLOCKED` result is a host that ignores it. The
|
|
87
|
+
gate is a control only where the role contract says the role must call it before spawning — the constitution's
|
|
88
|
+
C6 and C7.
|
|
89
|
+
- **It does not ship on npm.** The control plane is Python because the validators are Python; an npm package
|
|
90
|
+
would only hide that requirement, not remove it. `pip install fdu-team-mcp` and `uvx fdu-team-mcp` are the
|
|
91
|
+
supported paths, and MCP hosts accept any command, so nothing downstream needs a Node package.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
fdu_team_mcp.egg-info/PKG-INFO
|
|
5
|
+
fdu_team_mcp.egg-info/SOURCES.txt
|
|
6
|
+
fdu_team_mcp.egg-info/dependency_links.txt
|
|
7
|
+
fdu_team_mcp.egg-info/entry_points.txt
|
|
8
|
+
fdu_team_mcp.egg-info/top_level.txt
|
|
9
|
+
team_mcp/__init__.py
|
|
10
|
+
team_mcp/__main__.py
|
|
11
|
+
team_mcp/server.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
team_mcp
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fdu-team-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MCP control plane for the FDU + Engineering delivery team: approval gate, packet and report validation, evidence ledger."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Alberto Ancona" }]
|
|
14
|
+
dependencies = []
|
|
15
|
+
keywords = ["mcp", "agents", "governance", "delivery", "human-in-the-loop"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
22
|
+
"Typing :: Typed",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
fdu-team-mcp = "team_mcp.server:main"
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/albanc80/agentic-delivery-team"
|
|
30
|
+
|
|
31
|
+
[tool.setuptools]
|
|
32
|
+
packages = ["team_mcp"]
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""team-mcp - the team's control plane as an MCP server.
|
|
3
|
+
|
|
4
|
+
The point of this server is that the gates stop belonging to a harness. Every host that speaks MCP
|
|
5
|
+
(Claude Code, Codex CLI, Hermes, OpenClaw) can call the same implementations, so an approval means the
|
|
6
|
+
same thing everywhere instead of meaning "OpenClaw checked it".
|
|
7
|
+
|
|
8
|
+
It does not reimplement any rule: every tool shells out to the repository's own checkers, so the 13
|
|
9
|
+
evaluation cases remain the definition of correct behaviour.
|
|
10
|
+
|
|
11
|
+
FDU_TEAM_ROOT=/path/to/repo python3 -m team_mcp.server
|
|
12
|
+
|
|
13
|
+
Protocol: JSON-RPC 2.0 over stdio, newline-delimited. Tools only - no prompts, no resources - because a
|
|
14
|
+
tool is the one thing every host implements the same way.
|
|
15
|
+
"""
|
|
16
|
+
import json
|
|
17
|
+
import os
|
|
18
|
+
import pathlib
|
|
19
|
+
import subprocess
|
|
20
|
+
import sys
|
|
21
|
+
from datetime import datetime, timezone
|
|
22
|
+
|
|
23
|
+
SERVER_NAME = "fdu-team-mcp"
|
|
24
|
+
VERSION = "0.1.0"
|
|
25
|
+
PROTOCOL = "2024-11-05"
|
|
26
|
+
|
|
27
|
+
TOOLS = [
|
|
28
|
+
{
|
|
29
|
+
"name": "roles_list",
|
|
30
|
+
"description": "List the team: role id, team, tier, exec posture and whether the role may spawn. "
|
|
31
|
+
"Read from the generated manifest.",
|
|
32
|
+
"inputSchema": {"type": "object", "properties": {}},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "gate_check",
|
|
36
|
+
"description": "Gate A. Verify a human ApprovalRecord against a DeliveryContract by content hash. "
|
|
37
|
+
"Returns APPROVED or BLOCKED with the reasons. Nothing may be spawned before this passes.",
|
|
38
|
+
"inputSchema": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"contract": {"type": "string", "description": "Path to the contract JSON"},
|
|
42
|
+
"approval": {"type": "string", "description": "Path to the approval record JSON"},
|
|
43
|
+
},
|
|
44
|
+
"required": ["contract", "approval"],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "packet_validate",
|
|
49
|
+
"description": "Validate a TaskPacket against the shipped schema. A packet that fails this does not "
|
|
50
|
+
"start a pod.",
|
|
51
|
+
"inputSchema": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {"path": {"type": "string"}},
|
|
54
|
+
"required": ["path"],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "report_validate",
|
|
59
|
+
"description": "Validate a CompletionReport against the shipped schema.",
|
|
60
|
+
"inputSchema": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {"path": {"type": "string"}},
|
|
63
|
+
"required": ["path"],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "ledger_append",
|
|
68
|
+
"description": "Append one tamper-evident line to an engagement ledger. Timestamp is added by the "
|
|
69
|
+
"server; the caller supplies the event and payload.",
|
|
70
|
+
"inputSchema": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"engagement_dir": {"type": "string", "description": "Directory holding ledger.jsonl"},
|
|
74
|
+
"contract_id": {"type": "string"},
|
|
75
|
+
"event": {"type": "string", "description": "e.g. spawn, lead_verify, complete, blocked"},
|
|
76
|
+
"payload": {"type": "object", "description": "Event-specific fields"},
|
|
77
|
+
},
|
|
78
|
+
"required": ["engagement_dir", "contract_id", "event"],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "constitution",
|
|
83
|
+
"description": "Return the team constitution (C1-C8) that every role obeys.",
|
|
84
|
+
"inputSchema": {"type": "object", "properties": {}},
|
|
85
|
+
},
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def find_root():
|
|
90
|
+
env = os.environ.get("FDU_TEAM_ROOT")
|
|
91
|
+
if env:
|
|
92
|
+
return pathlib.Path(env).resolve()
|
|
93
|
+
here = pathlib.Path(__file__).resolve()
|
|
94
|
+
for candidate in [pathlib.Path.cwd(), *pathlib.Path.cwd().parents, *here.parents]:
|
|
95
|
+
if (candidate / "config" / "policy-matrix.json").exists():
|
|
96
|
+
return candidate
|
|
97
|
+
raise SystemExit("FDU_TEAM_ROOT not set and no config/policy-matrix.json found above the working directory")
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def run_checker(script, args, root):
|
|
101
|
+
"""Run a repository checker and return (ok, text). No rule lives here."""
|
|
102
|
+
cmd = [sys.executable, str(root / "scripts" / script), *args]
|
|
103
|
+
try:
|
|
104
|
+
p = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
|
|
105
|
+
except FileNotFoundError:
|
|
106
|
+
return False, f"checker not found: {script}"
|
|
107
|
+
except subprocess.TimeoutExpired:
|
|
108
|
+
return False, f"checker timed out after 60s: {script}"
|
|
109
|
+
text = (p.stdout or "") + (p.stderr or "")
|
|
110
|
+
return p.returncode == 0, text.strip() or f"{script} exited {p.returncode} with no output"
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def tool_roles_list(root):
|
|
114
|
+
man = json.loads((root / "plugin" / "manifest.json").read_text(encoding="utf-8"))
|
|
115
|
+
lines = [f"{len(man['roles'])} roles"]
|
|
116
|
+
for r in man["roles"]:
|
|
117
|
+
spawn = ", ".join(r["spawn"]) or "-"
|
|
118
|
+
lines.append(f"{r['id']:24} {r['team']:4} {r['model']['tier']:15} exec={r['exec']['posture'] or 'none':9} "
|
|
119
|
+
f"spawn={spawn}")
|
|
120
|
+
return True, "\n".join(lines)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def tool_gate_check(args, root):
|
|
124
|
+
contract, approval = args.get("contract"), args.get("approval")
|
|
125
|
+
if not contract or not approval:
|
|
126
|
+
return False, "gate_check requires contract and approval paths"
|
|
127
|
+
return run_checker("check_gate.py", [contract, approval], root)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def tool_packet_validate(args, root):
|
|
131
|
+
path = args.get("path")
|
|
132
|
+
if not path:
|
|
133
|
+
return False, "packet_validate requires path"
|
|
134
|
+
return run_checker("check_contract.py", [path], root)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def tool_report_validate(args, root):
|
|
138
|
+
path = args.get("path")
|
|
139
|
+
if not path:
|
|
140
|
+
return False, "report_validate requires path"
|
|
141
|
+
return run_checker("check_contract.py", ["--type", "report", path], root)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def tool_ledger_append(args, root):
|
|
145
|
+
engagement = args.get("engagement_dir")
|
|
146
|
+
contract_id = args.get("contract_id")
|
|
147
|
+
event = args.get("event")
|
|
148
|
+
if not (engagement and contract_id and event):
|
|
149
|
+
return False, "ledger_append requires engagement_dir, contract_id and event"
|
|
150
|
+
d = pathlib.Path(engagement)
|
|
151
|
+
d.mkdir(parents=True, exist_ok=True)
|
|
152
|
+
line = {
|
|
153
|
+
"ts": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
|
154
|
+
"contract_id": contract_id,
|
|
155
|
+
"event": event,
|
|
156
|
+
**(args.get("payload") or {}),
|
|
157
|
+
}
|
|
158
|
+
with (d / "ledger.jsonl").open("a", encoding="utf-8") as fh:
|
|
159
|
+
fh.write(json.dumps(line, sort_keys=True) + "\n")
|
|
160
|
+
return True, f"appended to {d / 'ledger.jsonl'}: {json.dumps(line, sort_keys=True)[:160]}"
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def tool_constitution(root):
|
|
164
|
+
p = root / "pod" / "AGENTS.md"
|
|
165
|
+
if not p.exists():
|
|
166
|
+
return False, "pod/AGENTS.md not found"
|
|
167
|
+
return True, p.read_text(encoding="utf-8")
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class Server:
|
|
171
|
+
def __init__(self):
|
|
172
|
+
self.root = find_root()
|
|
173
|
+
self.handlers = {
|
|
174
|
+
"roles_list": lambda a: tool_roles_list(self.root),
|
|
175
|
+
"gate_check": lambda a: tool_gate_check(a, self.root),
|
|
176
|
+
"packet_validate": lambda a: tool_packet_validate(a, self.root),
|
|
177
|
+
"report_validate": lambda a: tool_report_validate(a, self.root),
|
|
178
|
+
"ledger_append": lambda a: tool_ledger_append(a, self.root),
|
|
179
|
+
"constitution": lambda a: tool_constitution(self.root),
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
def handle(self, msg):
|
|
183
|
+
method = msg.get("method")
|
|
184
|
+
msg_id = msg.get("id")
|
|
185
|
+
if method == "initialize":
|
|
186
|
+
requested = ((msg.get("params") or {}).get("protocolVersion")) or PROTOCOL
|
|
187
|
+
return {"jsonrpc": "2.0", "id": msg_id, "result": {
|
|
188
|
+
"protocolVersion": requested,
|
|
189
|
+
"capabilities": {"tools": {"listChanged": False}},
|
|
190
|
+
"serverInfo": {"name": SERVER_NAME, "version": VERSION},
|
|
191
|
+
}}
|
|
192
|
+
if method in ("notifications/initialized", "initialized"):
|
|
193
|
+
return None
|
|
194
|
+
if method == "ping":
|
|
195
|
+
return {"jsonrpc": "2.0", "id": msg_id, "result": {}}
|
|
196
|
+
if method == "tools/list":
|
|
197
|
+
return {"jsonrpc": "2.0", "id": msg_id, "result": {"tools": TOOLS}}
|
|
198
|
+
if method == "tools/call":
|
|
199
|
+
params = msg.get("params") or {}
|
|
200
|
+
name = str(params.get("name") or "")
|
|
201
|
+
handler = self.handlers.get(name)
|
|
202
|
+
if not handler:
|
|
203
|
+
return {"jsonrpc": "2.0", "id": msg_id,
|
|
204
|
+
"error": {"code": -32602, "message": f"unknown tool: {name}"}}
|
|
205
|
+
try:
|
|
206
|
+
ok, text = handler(params.get("arguments") or {})
|
|
207
|
+
except Exception as e: # a tool must not kill the server
|
|
208
|
+
ok, text = False, f"{name} raised {type(e).__name__}: {e}"
|
|
209
|
+
return {"jsonrpc": "2.0", "id": msg_id, "result": {
|
|
210
|
+
"content": [{"type": "text", "text": text}],
|
|
211
|
+
"isError": not ok,
|
|
212
|
+
}}
|
|
213
|
+
if msg_id is None:
|
|
214
|
+
return None
|
|
215
|
+
return {"jsonrpc": "2.0", "id": msg_id,
|
|
216
|
+
"error": {"code": -32601, "message": f"method not found: {method}"}}
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def main():
|
|
220
|
+
server = Server()
|
|
221
|
+
for raw in sys.stdin:
|
|
222
|
+
raw = raw.strip()
|
|
223
|
+
if not raw:
|
|
224
|
+
continue
|
|
225
|
+
try:
|
|
226
|
+
msg = json.loads(raw)
|
|
227
|
+
except json.JSONDecodeError as e:
|
|
228
|
+
sys.stdout.write(json.dumps({"jsonrpc": "2.0", "id": None,
|
|
229
|
+
"error": {"code": -32700, "message": f"parse error: {e}"}}) + "\n")
|
|
230
|
+
sys.stdout.flush()
|
|
231
|
+
continue
|
|
232
|
+
response = server.handle(msg)
|
|
233
|
+
if response is not None:
|
|
234
|
+
sys.stdout.write(json.dumps(response) + "\n")
|
|
235
|
+
sys.stdout.flush()
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
if __name__ == "__main__":
|
|
239
|
+
main()
|