Add independent MCP PDF report delivery

This commit is contained in:
2026-09-27 11:09:13 +02:00
parent 0c18c86a47
commit 6c36d78063
9 changed files with 555 additions and 20 deletions
+10
View File
@@ -31,6 +31,16 @@ roll_calculation.calculate_roll()
The PDF endpoint accepts the same calculation request, recalculates it through the core, then adapts the authoritative result to the established one-page PDF layout. It does not accept calculated values from the browser.
`generate_calculation_pdf` is the equivalent opt-in MCP adapter. It accepts only
original roll-calculation inputs and uses the shared report service after
deterministic recalculation. Under FastMCP Streamable HTTP, the MCP host owns a
short-lived local store and its `/reports/<256-bit-capability>.pdf` download
route. Flask has no role in this path, which avoids cross-host filesystem
coupling and binary PDF content in tool responses. The browser-reachable origin
is configured independently with `ROLLCALC_MCP_ARTIFACT_PUBLIC_BASE_URL`.
Installed MCPO 0.0.20 does not retain native MCP resources/resource links, so
the tool returns an ordinary browser URL rather than an MCP resource.
## Production-Machine Feasibility
`config/machines.yaml` is the runtime source for configured production-machine