fastmcp/tests/server
Chris Guidry 82301773cf Proxy tasks forbidden, mount tasks working
Simplifies the task support story for proxies and mounts:
- Mounts get full SEP-1686 task support (unchanged)
- Proxies explicitly forbid task execution

The cross-session task forwarding for proxies turned out to be complex
since each client connection creates a new server lifespan with a new
Docket context, and task keys include session_id. Rather than introduce
that complexity, proxies now explicitly refuse task-augmented execution.

Key changes:
- All proxy components (ProxyTool, ProxyPrompt, ProxyResource,
  ProxyTemplate) now have task_config.mode="forbidden"
- Proxy tests verify forbidden behavior (sync execution works,
  task=True returns error/raises McpError)
- Fixed prompt task handler to check hasattr(prompt, "task_config")
  instead of isinstance(prompt, FunctionPrompt) so it applies to
  ProxyPrompt too
- Added test suites for both proxy and mount task behavior

Also includes minor fixes:
- Fixed result.meta_ -> result.meta in ProxyTool.run()
- Fixed client handling of returned_immediately without taskId
- Bumped pydocket>=0.15.2

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 11:44:28 -05:00
..
auth Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561) 2025-12-05 21:29:14 -05:00
http Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561) 2025-12-05 21:29:14 -05:00
middleware refactor: move task attribute to function-based variants only [SEP-1686] (#2560) 2025-12-05 21:05:42 -05:00
openapi Switch to new OpenAPI parser as default (#2513) 2025-12-01 20:29:18 -05:00
proxy Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561) 2025-12-05 21:29:14 -05:00
tasks Proxy tasks forbidden, mount tasks working 2025-12-08 11:44:28 -05:00
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_app_state.py Update docs and test 2025-06-20 13:06:48 -04:00
test_auth_integration.py Update FastMCP for MCP SDK 1.23.1 auth changes 2025-12-03 11:50:08 -05:00
test_context.py 2.14 deprecation removals (#2329) 2025-12-01 14:11:00 -05:00
test_dependencies.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_file_server.py Internal refactor of MCP handlers (#2005) 2025-10-05 08:45:10 -04:00
test_icons.py Implement icon support (#2121) 2025-10-17 17:28:08 -04:00
test_import_server.py 2.14 deprecation removals (#2329) 2025-12-01 14:11:00 -05:00
test_input_validation.py Add Pydantic-compatible input validation (#2073) 2025-10-14 11:49:30 -07:00
test_log_level.py Add log level support for stdio and HTTP transports (#1840) 2025-09-19 13:46:30 -04:00
test_logging.py Remove enable_docket setting; Docket is now always on 2025-12-05 11:40:04 -05:00
test_mount.py Remove enable_docket setting; Docket is now always on 2025-12-05 11:40:04 -05:00
test_run_server.py Update tests for prompts 2025-06-04 16:37:41 -04:00
test_server.py Switch to new OpenAPI parser as default (#2513) 2025-12-01 20:29:18 -05:00
test_server_docket.py Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561) 2025-12-05 21:29:14 -05:00
test_server_interactions.py Add regression tests for functools.wraps + Context (#2524) (#2566) 2025-12-06 12:32:39 -05:00
test_server_lifespan.py Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561) 2025-12-05 21:29:14 -05:00
test_streamable_http_no_redirect.py Improve redirect handling to address 307's (#1387) 2025-08-08 11:55:30 -04:00
test_tool_annotations.py Add TaskConfig for SEP-1686 execution modes 2025-12-06 21:01:11 -05:00
test_tool_exclude_args.py Fix exclude_args with non-serializable types 2025-11-17 12:25:43 -05:00
test_tool_transformation.py Internal refactor of MCP handlers (#2005) 2025-10-05 08:45:10 -04:00