speaker_helper.mcp module
The MCP surface: the same routes, republished as agent tools.
Module summary
There is no second implementation here, and that is the design. The HTTP API
in speaker_helper.api already describes every operation — its
parameters, its types, its operation_id — and fastapi-mcp turns that
description into a tool catalogue. An agent calling narrate and a shell
calling POST /narrate reach the same function, so the two surfaces cannot
drift into disagreeing about what this package does.
What this module adds is a way to start it: a console script that serves the app with the MCP endpoint mounted, and whose defaults name this package’s own environment variables rather than a neighbour’s.
Why it came back
This surface was removed in 0.7.5. fastapi-mcp 0.4.0 called the mcp
SDK with an argument count that release no longer accepted, and the mount was
guarded by except ImportError alone — so a TypeError escaped
create_app() and broke every API test, not only the MCP ones. Both halves
are fixed: the pairing is pinned in the mcp extra, and the mount in
speaker_helper.api._mount_mcp() now catches more than ImportError,
because an optional surface must never be able to take the HTTP API down.