You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-3Lines changed: 35 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,8 @@ The current implementation follows a layered model:
63
63
- Final suite-level evidence synthesis, BER/WoE logic, and cross-module decisions belong above O-QT in a downstream orchestrator.
64
64
65
65
See [docs/architecture.md](docs/architecture.md) for the fuller boundary and contract notes.
66
+
See [docs/oecd_alignment_review_2025.md](docs/oecd_alignment_review_2025.md) for the OECD 2025 grouping/IUCLID gap analysis and the next contract-focused improvements.
67
+
See [docs/cross_suite_alignment_2026.md](docs/cross_suite_alignment_2026.md) for the local AOP/CompTox contract patterns adopted into O-QT.
66
68
67
69
## What's New In v0.2.0
68
70
@@ -71,6 +73,7 @@ This is a maturity and contract release, not a redesign.
71
73
- Re-aligned repository identity, package metadata, and release notes around `ToxMCP/oqt-mcp`.
72
74
- Clarified the public surface as a primary workflow engine plus secondary expert tools.
73
75
- Published portable O-QT handoff schemas for hazard evidence, read-across support, and workflow provenance.
76
+
- Hardened the hazard handoff with explicit evidence blocks, applicability-domain review, and richer provenance records for audit-grade downstream review.
74
77
- Added explicit downstream-orchestration documentation and examples for contract consumers.
75
78
- Documented the current synchronous deployment model instead of implying an async platform that does not exist yet.
76
79
@@ -116,7 +119,7 @@ The O-QT MCP server turns that workflow into an **open, programmable interface**
116
119
| --- | --- |
117
120
|**Primary workflow engine**| Calls the OECD QSAR Toolbox WebAPI to run searches, profilers, metabolism simulators, curated QSAR models, and the flagship `run_oqt_multiagent_workflow` entrypoint. |
118
121
|**Grouping/read-across support**| Builds OECD-style grouping dossiers through `build_grouping_justification` with structured similarity and uncertainty reporting. |
119
-
|**Portable handoff contracts**| Publishes stable cross-suite handoff schemas for downstream orchestrators and other contract consumers. |
122
+
|**Portable handoff contracts**| Publishes stable cross-suite handoff schemas for downstream orchestrators and other contract consumers, including evidence blocks, applicability-domain review, and attachment manifests. |
120
123
|**Regulatory-ready reporting**| Generates a comprehensive PDF (ReportLab), Markdown narrative, and JSON provenance bundle. |
121
124
|**Enterprise security**| OAuth2/OIDC token validation, RBAC per tool, audit logging, and Docker hardening. |
122
125
|**Agent friendly**| Tested with Claude Code, Codex CLI, and Gemini CLI (see [integration guide](docs/integration_guides/mcp_integration.md)). |
@@ -186,6 +189,15 @@ Once running, your MCP host connects to `http://localhost:8000/mcp`.
186
189
| Variable | Required | Default | Description |
187
190
| --- | --- | --- | --- |
188
191
|`QSAR_TOOLBOX_API_URL`| ✅ |`http://localhost:5000`| Base URL to the OECD QSAR Toolbox WebAPI. |
192
+
|`QSAR_LIGHT_TIMEOUT_SECONDS`| Optional |`30`| Per-request timeout for lightweight Toolbox calls. |
193
+
|`QSAR_HEAVY_TIMEOUT_SECONDS`| Optional |`300`| Per-request timeout for expensive Toolbox calls such as reports, workflows, and some simulations. |
194
+
|`QSAR_LIGHT_MAX_ATTEMPTS`| Optional |`2`| Retry count for lightweight Toolbox calls. |
195
+
|`QSAR_HEAVY_MAX_ATTEMPTS`| Optional |`3`| Retry count for expensive Toolbox calls. |
196
+
|`QSAR_HEAVY_CONCURRENCY`| Optional |`3`| Concurrency cap for heavy Toolbox calls issued by the MCP. |
197
+
|`QSAR_HAZARD_PROFILING_WALLCLOCK_TIMEOUT_SECONDS`| Optional |`25`| Wall-clock cap for the profiling sweep inside `analyze_chemical_hazard`; returns explicit partial evidence if exceeded. |
198
+
|`QSAR_DISCOVERY_LIST_ALL_TOTAL_WALLCLOCK_TIMEOUT_SECONDS`| Optional |`45`| Total wall-clock budget for `list_all_qsar_models`. |
199
+
|`QSAR_DISCOVERY_LIST_ALL_PER_POSITION_TIMEOUT_SECONDS`| Optional |`6`| Per-endpoint-tree-position timeout while enumerating the QSAR model catalog. |
200
+
|`QSAR_DISCOVERY_SEARCH_DATABASES_WALLCLOCK_TIMEOUT_SECONDS`| Optional |`20`| Wall-clock cap for `list_search_databases`; fails fast on timeout. |
@@ -200,6 +212,8 @@ Once running, your MCP host connects to `http://localhost:8000/mcp`.
200
212
201
213
Compatibility note: the current client targets Toolbox WebAPI `/api/v6` routes. Newer Toolbox builds are supported as long as they keep the v6 compatibility layer enabled.
202
214
215
+
Operational note: on slower Toolbox hosts, prefer tuning the wall-clock safeguards above rather than only increasing retry counts. The MCP is designed to return explicit partial evidence or timeout errors, not to block indefinitely on discovery-heavy endpoints.
216
+
203
217
See [docs/auth_testing.md](docs/auth_testing.md) for token generation tips and bypass mode safety.
204
218
205
219
---
@@ -228,8 +242,8 @@ See [docs/auth_testing.md](docs/auth_testing.md) for token generation tips and b
228
242
|`get_endpoint_tree`| Returns the endpoint taxonomy used to organise profilers and models. |
229
243
|`get_metadata_hierarchy`| Returns the metadata hierarchy useful for filtering experimental data. |
230
244
|`list_qsar_models`| Lists QSAR models for a specific endpoint tree position. |
231
-
|`list_all_qsar_models`| Enumerates the full QSAR catalog across the endpoint tree (deduplicated). |
232
-
|`list_search_databases`| Enumerates searchable inventories in the QSAR Toolbox. |
245
+
|`list_all_qsar_models`| Enumerates the full QSAR catalog across the endpoint tree (deduplicated). Returns partial catalog metadata and warnings if enumeration exceeds the configured wall-clock budget. |
246
+
|`list_search_databases`| Enumerates searchable inventories in the QSAR Toolbox. Fails fast on timeout rather than waiting through the full heavy retry budget. |
233
247
|`run_qsar_model`| Runs a specific QSAR model for a chemId and reports applicability domain status. |
234
248
|`run_profiler`| Executes a profiler for a chemId (optionally providing a simulator). |
235
249
|`run_metabolism_simulator`| Runs a metabolism simulator using either a chemId or SMILES. |
@@ -301,8 +315,26 @@ See [docs/auth_testing.md](docs/auth_testing.md) for token generation tips and b
301
315
-`build_grouping_justification` adds a `grouping_justification` object with target/analogue resolution, similarity assessment, endpoint conclusions, and uncertainty reporting.
-`portable_handoffs` – schema-aligned handoff objects for downstream orchestration. `build_grouping_justification` returns `oqtWorkflowRecord.v1` plus `oqtReadAcrossSummary.v1`; `run_oqt_multiagent_workflow` returns `oqtWorkflowRecord.v1` plus `oqtHazardEvidenceSummary.v1`.
318
+
-`oqtWorkflowRecord.v1` now declares `rootEntity`, `packageSemantics`, and an auditable `attachments` manifest with checksums when the inline payload is available.
319
+
-`oqtHazardEvidenceSummary.v1` now carries request metadata, explicit assessment and decision boundaries, support claims, required external inputs, endpoint summaries, source attribution for model/profiler/simulator evidence, and a qualitative uncertainty block with `semanticCoverage` that explicitly states it is an evidence-completeness assessment rather than a probabilistic estimate.
320
+
-`oqtReadAcrossSummary.v1` now promotes explicit assessment and decision boundaries, required external inputs, applicability-domain notes, the portable evidence matrix, and the aspect-level uncertainty table into the published handoff contract.
304
321
- Portable downstream contracts are published separately under `schemas/`; see [schemas/README.md](schemas/README.md).
305
322
323
+
### Metadata & provenance fields
324
+
325
+
The MCP exposes normalized provenance wherever the Toolbox already returns ownership or study metadata:
326
+
327
+
-`get_public_qsar_model_info`, `get_profiler_info`, `get_simulator_info`, and `get_calculator_info` include a top-level `provenance` block.
328
+
-`list_qsar_models` and `list_all_qsar_models` attach a compact `provenance_summary` to each catalog record.
329
+
-`run_qsar_prediction`, `run_qsar_model`, `download_qmrf`, and `download_qsar_report` include `model_provenance`.
330
+
-`run_profiler` and `group_chemicals_by_profiler` include `profiler_provenance`.
331
+
-`generate_metabolites` and `run_metabolism_simulator` include `simulator_provenance`.
332
+
-`analyze_chemical_hazard` now normalizes endpoint study records, endpoint summaries, evidence blocks, applicability-domain review, provenance collections, and a portable `oqtHazardEvidenceSummary.v1` handoff alongside the raw Toolbox payloads. The helper is intentionally bounded: if `profiling/all` is too slow, it returns partial endpoint evidence with explicit uncertainty and warning fields instead of waiting indefinitely.
333
+
- Hazard and read-across handoffs now publish machine-readable boundary fields (`assessmentBoundary`, `decisionBoundary`, `decisionOwner`) plus `supports` and `requiredExternalInputs`, so downstream systems can distinguish what O-QT packaged from what still requires expert review, regulatory policy, exposure context, or cross-module synthesis.
334
+
- High-level workflow outputs preserve the same normalized metadata inside `log_json.profiler_results[*].profiler_provenance`, `log_json.simulator_results[*].simulator_provenance`, and `log_json.qsar_results[*].model_provenance`.
335
+
- Report-style tools (`download_qmrf`, `download_qsar_report`, `download_workflow_report`) now also declare `content_type`; when the Toolbox returns a ZIP bundle rather than a bare PDF, the MCP response includes `archive_entries` and `pdf_report_base64` when a PDF member can be extracted.
336
+
- High-level workflows and grouping dossiers accept direct Toolbox `chemId` values as `identifier` inputs, which lets orchestrators bypass flaky search endpoints once a substance has already been resolved.
This note records the local cross-suite contract review used to harden O-QT MCP for auditability, verifiability, and regulated downstream use.
4
+
5
+
## Repos inspected locally
6
+
7
+
-`AOP_MCP`
8
+
-`comptox_mcp_clean_3568d68`
9
+
-`PBPK_MCP`
10
+
-`Bioactivity-PoD-MCP`
11
+
12
+
## Patterns adopted into O-QT MCP
13
+
14
+
### From AOP MCP
15
+
16
+
- Explicit evidence blocks instead of only free-form summaries.
17
+
- Provenance records that say which source populated which contract field and with what transformation confidence.
18
+
- Clear separation between evidence packaging and final decision logic.
19
+
20
+
### From CompTox MCP
21
+
22
+
- Explicit applicability-domain framing as a first-class review object.
23
+
- Stronger metadata and provenance packaging for downstream audit workflows.
24
+
- Preference for machine-readable review fields over narrative-only payloads.
25
+
26
+
### From PBPK MCP
27
+
28
+
- Machine-readable assessment and decision boundaries rather than only prose caveats.
29
+
- Explicit `supports` and `requiredExternalInputs` fields so downstream consumers can tell what the module does and does not claim to decide.
30
+
- Stronger uncertainty framing that distinguishes semantic coverage from quantitative confidence.
31
+
32
+
### From Bioactivity-PoD MCP
33
+
34
+
- Explicit `decisionOwner` language so handoff objects make ownership boundaries visible.
35
+
- Contract emphasis on fit-for-purpose review rather than implied finality.
36
+
- Preference for provenance-ready, typed records over narrative-only summaries.
37
+
38
+
## O-QT changes made from this review
39
+
40
+
-`oqtHazardEvidenceSummary.v1` now includes:
41
+
-`assessmentBoundary`
42
+
-`decisionBoundary`
43
+
-`decisionOwner`
44
+
-`supports`
45
+
-`requiredExternalInputs`
46
+
-`uncertaintyAssessment.semanticCoverage`
47
+
-`oqtReadAcrossSummary.v1` now includes:
48
+
-`assessmentBoundary`
49
+
-`decisionBoundary`
50
+
-`decisionOwner`
51
+
-`supports`
52
+
-`requiredExternalInputs`
53
+
- Read-across provenance schemas now allow retry `attempts` in source records when Toolbox call metadata is available.
54
+
55
+
## What was intentionally not copied
56
+
57
+
- AOP draft-authoring semantics, because O-QT is not an authoring server.
58
+
- CompTox-style numeric applicability-domain confidence, because O-QT does not currently produce a scientifically defensible quantitative AD confidence estimate.
59
+
- PBPK qualification or model-trust governance objects, because O-QT should stay focused on OECD QSAR Toolbox evidence packaging rather than model-qualification workflow management.
60
+
- Bioactivity point-of-departure decision objects, because O-QT should not claim ownership of final biological interpretation outside its module scope.
61
+
- Suite-level evidence synthesis, because O-QT should remain a module-scoped OECD QSAR Toolbox engine.
0 commit comments