mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-24 14:34:17 +02:00
Refactors docket/background task support to be encapsulated within each component rather than requiring external coordination: - Move task_config to FastMCPComponent base class (default: forbidden) - Add register_with_docket(docket) method that components use to register themselves, checking task_config internally - Add add_to_docket() method that handles component-specific calling conventions (splatted kwargs vs positional dict) - Simplify server registration to just call component.register_with_docket() - Update task handlers to use component.add_to_docket() This enables custom Tool/Resource/Prompt subclasses to support background tasks by setting task_config and optionally overriding the docket methods. |
||
|---|---|---|
| .. | ||
| cli | ||
| client | ||
| contrib | ||
| deprecated | ||
| experimental | ||
| integration_tests | ||
| prompts | ||
| resources | ||
| server | ||
| tools | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_mcp_config.py | ||