best_engine_ai_helper.mcp module

best-engine-ai-helper: Model Context Protocol (MCP) surface.

A thin adapter that exposes the FastAPI app from best_engine_ai_helper.api as MCP tools, so any MCP-aware host (an agent runtime, an IDE integration, a custom shell) can call /api/system (this machine’s hardware snapshot), /api/recommend (the best local LLM/VLM engine for a free-text task, and the best paid cloud model for it alongside) and /api/providers (which paid providers hold a usable key) as first-class tools — the same detect-then-recommend workflow the CLI’s detect/recommend/report commands expose. Uses fastapi-mcp (https://github.com/tadata-org/fastapi_mcp): one wrapper publishes the whole existing HTTP surface, so the routes are never duplicated.

The `/v1` routes are excluded. The same app serves an OpenAI-compatible surface, and publishing /v1/chat/completions as an MCP tool would make the description below untrue: an MCP host would gain a tool that runs a model, when the point of this surface is that it decides and never calls. A host that wants inference has the OpenAI protocol for it, on the same port.

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

best-engine-ai-helper-mcp                 # console entry point
python -m best_engine_ai_helper.mcp       # equivalent

Author

Warith Harchaoui <warithmetics@deraison.ai>

best_engine_ai_helper.mcp.main()[source]

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

Boots the FastAPI app (now serving both the /api/... routes, the /gui page, and the /mcp MCP endpoint) with uvicorn in a single worker. Local-first: binds to loopback by default (override with BEST_ENGINE_HOST / BEST_ENGINE_PORT).

Return type:

None