web_search_helper.mcp_server module
MCP server (optional [mcp] extra): the API’s routes as agent tools.
fastapi-mcp is mounted at /mcp on a copy of web_search_helper.api’s
app; the tools are exactly the routes listed below, by their operation_id,
so the MCP door can never drift from the REST one.
Run it with:
pip install 'web-search-helper[mcp,embed]'
WSH_DATA_DIR=site/search-data uvicorn web_search_helper.mcp_server:app --port 8041
MCP endpoint: http://127.0.0.1:8041/mcp (Streamable HTTP).
Author: Warith Harchaoui <warithmetics@deraison.ai>
- web_search_helper.mcp_server.EXPOSED = ['indexes', 'search', 'calibrate', 'check_online']
a route added to the API becomes a tool only by a deliberate edit here.
queryis left out on purpose: it expects a 384-number vector, which no agent should be asked to produce.- Type:
An explicit allowlist