mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 06:19:43 +08:00
The `mcp` client was declared only under the `partners` extra, but the MCP connection manager and the built-in PageIndex MCP server are core: the manager overlays a reserved `pageindex` entry onto the config whenever a PageIndex API key is set, on any turn. A plain `pip install deeptutor` therefore had no `mcp`, so the connection task raised ModuleNotFoundError, never resolved the caller's ready future, and every turn stalled for the full 15s connect timeout before reporting the one cause that was not responsible: "connect timed out after 15s". Declare `mcp>=1.26.0,<2.0.0` as a core dependency of both published distributions and drop it from the `partners` extra, which now inherits it. Mirror the move in requirements/ (cli.txt gains it, partners.txt inherits it via server.txt). Also import `mcp` inside `_run_server`'s guarded block rather than above it. At function scope the import raised before anything could fail `ready`, which is what turned a permanent, instantly-knowable error into a timeout plus an orphaned "Task exception was never retrieved". Inside the block the real cause reaches the caller immediately. Closes #792