video_helper.mcp module

Video Helper: Model Context Protocol (MCP) surface.

A thin adapter that exposes the FastAPI app from video_helper.api as MCP tools, so any MCP-aware host (an agent runtime, an IDE integration, a custom shell) can call video-helper’s operations — validation, dimensions, duration, format conversion, chunking, black-video/image-loop generation, concat, overlay, audio mux/extraction, subtitle burn/conversion, frame extraction, and dense optical flow — as first-class tools. Uses fastapi-mcp (https://github.com/tadata-org/fastapi_mcp): one wrapper publishes the whole existing HTTP surface, so the routes are never duplicated.

Install the extra to pull in fastapi-mcp:

pip install "video-helper[mcp]"

Then run the server (HTTP API + MCP endpoint at /mcp):

video-helper-mcp                 # console entry point
python -m video_helper.mcp       # equivalent

Author

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

video_helper.mcp.main()[source]

Console entry point (video-helper-mcp): serve the API + MCP endpoint.

Boots the FastAPI app (now serving both the plain HTTP routes and the /mcp MCP endpoint) with uvicorn in a single worker. Local-first: binds to loopback by default (override with VIDEO_HELPER_HOST / VIDEO_HELPER_PORT).

Return type:

None