fastmcp/tests/cli
Chris Guidry 66aaf420c9
[2.14] SEP-1686 tasks (#2378)
* Implement MCP background tasks (SEP-1686) using Docket

Adds support for background task execution via the MCP task protocol,
powered by Docket for task queue management.

- Tools, resources, and prompts can be marked with `task=True` to run async
- Progress dependency for tracking task progress
- CurrentDocket and CurrentWorker dependencies for advanced use cases
- Client API with `.call_tool(..., task=True)` returns task handles
- Task status notifications via subscriptions
- CLI worker command for distributed task processing

Configuration via environment:
- FASTMCP_ENABLE_DOCKET=true
- FASTMCP_ENABLE_TASKS=true
- FASTMCP_DOCKET_URL=redis://... (or memory:// for single-process)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix tasks example import (TaskStatusResponse → GetTaskResult)

The example was using a non-existent TaskStatusResponse type.
Updated to use mcp.types.GetTaskResult which is what the
on_status_change callback actually receives.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix env var name in Docket error messages

The error messages referenced FASTMCP_EXPERIMENTAL_ENABLE_DOCKET but the
actual setting is FASTMCP_ENABLE_DOCKET.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove deprecated code re-added from pre-#2329 branch

- Remove ExtendedEnvSettingsSource (FASTMCP_SERVER_ prefix support)
- Remove dependencies parameter from FastMCP.__init__

* Replace fakeredis git pin with PyPI release

* Remove redundant fakeredis dev dep (pulled via pydocket)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-12-04 20:10:35 -05:00
..
__init__.py Add tests 2025-07-06 20:50:31 -04:00
test_cli.py Remove shell=True from Windows subprocess calls (#2091) 2025-10-14 12:30:46 -07:00
test_config.py Fix path resolution in install commands (#1951) 2025-09-29 20:04:12 -04:00
test_cursor.py Fix: URL-encode server name in Cursor deeplinks (#2369) 2025-11-04 11:26:57 -05:00
test_install.py feat: add support for Gemini CLI integration (#1709) 2025-09-06 12:08:56 -04:00
test_mcp_server_config_integration.py Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
test_mcp_server_config_schema.py Hotfix: restore --transport streamable http at CLI (#1743) 2025-09-03 17:24:22 -04:00
test_project_prepare.py Enable more type checking rules (#1775) 2025-09-07 11:11:44 -04:00
test_run.py Fix asyncio error when running FastMCP 1.x servers (#2084) 2025-10-14 11:24:51 -07:00
test_run_config.py Add log level support for stdio and HTTP transports (#1840) 2025-09-19 13:46:30 -04:00
test_server_args.py Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
test_shared.py Ensure test is platform agnostic 2025-07-07 09:51:12 -04:00
test_tasks.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_with_argv.py Consolidate server loading logic into FileSystemSource (#1614) 2025-08-24 20:50:25 -04:00