audio_helper.mcp module

Audio Helper — Model Context Protocol (MCP) surface.

Adapter that exposes the FastAPI app defined in audio_helper.api as MCP tools so any MCP-aware host (agent runtimes, IDE integrations, custom shells) can call convert / split / concat / separate / … 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 'audio-helper[api,mcp]'

Then run the MCP server:

audio-helper-mcp                 # entry point (see pyproject)
# or, equivalently:
python -m audio_helper.mcp

Usage Example

>>> # Register the MCP endpoint in your client. It publishes:
>>> #   convert / duration / chunk / silence / concat /
>>> #   roomtone / split / separate / resemblance
>>> # …with the same argument names as the FastAPI routes.

Author

Warith Harchaoui, Ph.D. — https://linkedin.com/in/warith-harchaoui/

audio_helper.mcp.main()[source]

Entry point for the audio-helper-mcp console script.

Boots the FastAPI app (which now serves both the /… HTTP routes and the MCP endpoint) with uvicorn in single-worker mode. Meant for local / container usage; behind a real load balancer use uvicorn/gunicorn directly.

Return type:

None