Add missing TasksCallCapability to enable proper MCP task support by maxisbey · Pull Request #1854 · modelcontextprotocol/python-sdk

@claude

The enable_tasks() method was creating TasksToolsCapability without
the required nested call capability. This caused VS Code Copilot and
other MCP clients to fail their capability detection check
(tasks?.requests?.tools?.call !== undefined), silently falling back
to synchronous tool calls instead of using the proper asynchronous
MCP Tasks protocol.

This fix:
- Imports TasksCallCapability from mcp.types
- Passes call=TasksCallCapability() when creating TasksToolsCapability
- Adds unit test to verify the nested capability is properly set

Without this fix, long-running tools would timeout after 5 minutes
instead of receiving proper asynchronous task handling.

Github-Issue: #1853

@maxisbey enabled auto-merge (squash)

January 14, 2026 12:13

@maxisbey maxisbey added bug

Something isn't working

improves spec compliance

When a change improves ability of SDK users to comply with spec definition

P2

Moderate issues affecting some users, edge cases, potentially valuable feature

labels

Jan 14, 2026

@maxisbey maxisbey deleted the claude/fix-issue-1853-0cjKC branch

January 15, 2026 09:55

BabyChrist666 pushed a commit to BabyChrist666/python-sdk that referenced this pull request

Feb 24, 2026