vocal_helper.mcp module
Vocal Helper — Model Context Protocol (MCP) surface.
Adapter that exposes the FastAPI app defined in vocal_helper.api
as MCP tools so any MCP-aware host (agent runtimes, IDE
integrations, custom shells) can call transcribe / pipeline as
first-class tools. Uses fastapi_mcp
(https://github.com/tadata-org/fastapi_mcp) — one line wraps the whole
existing HTTP surface, so we never duplicate the route definitions.
Install the extra to pull in fastapi-mcp:
pip install 'vocal-helper[api,mcp]'
Then run the MCP server:
vocal-helper-mcp # entry point (see pyproject)
# or, equivalently:
python -m vocal_helper.mcp
Usage Example
>>> # Register http://127.0.0.1:8000/mcp in your client. It publishes the
>>> # routes under fastapi-mcp's operation ids:
>>> # transcribe_transcribe_post / pipeline_pipeline_post
>>> # health_health_get / gui_gui_get
>>> # …with the same argument names as the FastAPI routes.
- vocal_helper.mcp.main()[source]
Entry point for the
vocal-helper-mcpconsole script.Boots the FastAPI app (which now serves both the
/…HTTP routes and the MCP endpoint) withuvicornin single-worker mode. Meant for local / container usage; behind a real load balancer useuvicorn/gunicorndirectly.- Return type:
None