Bug Description
When using experimental.enable_tasks(), the SDK creates TasksToolsCapability() without the nested call capability. This causes VS Code Copilot to silently fall back to synchronous tool calls instead of using the MCP Tasks protocol.
Expected Behavior
The task capabilities should include tasks.requests.tools.call so clients can detect task-augmented tool call support:
capabilities.tasks.requests.tools.call = TasksCallCapability()
Actual Behavior
experimental.py line 80-82:
capabilities.tasks.requests = ServerTasksRequestsCapability(
tools=TasksToolsCapability() # ❌ Missing call=TasksCallCapability()
)
VS Code Copilot checks:
const serverSupportsTasksForTools = h.capabilities.tasks?.requests?.tools?.call !== undefined;
Since call is None, the check fails silently.
One-Line Fix
# mcp/server/lowlevel/experimental.py, line 81
- tools=TasksToolsCapability()
+ tools=TasksToolsCapability(call=TasksCallCapability())
Also need to import at the top:
from mcp.types import TasksCallCapability
Reproduction
from mcp.server import Server
from mcp.server.lowlevel.server import NotificationOptions
server = Server("test")
server.experimental.enable_tasks()
opts = server.create_initialization_options(NotificationOptions(), {})
# This is None but should be TasksCallCapability()
print(opts.capabilities.tasks.requests.tools.call) # None ❌
Environment
- MCP Python SDK: 1.25.0
- Python: 3.12
- VS Code: 1.96+ with Copilot extension
Impact
All MCP servers using experimental.enable_tasks() are affected. VS Code Copilot cannot use MCP Tasks for long-running tools, causing 5-minute timeouts instead of proper async task handling.
Related
Bug Description
When using
experimental.enable_tasks(), the SDK createsTasksToolsCapability()without the nestedcallcapability. This causes VS Code Copilot to silently fall back to synchronous tool calls instead of using the MCP Tasks protocol.Expected Behavior
The task capabilities should include
tasks.requests.tools.callso clients can detect task-augmented tool call support:Actual Behavior
experimental.pyline 80-82:VS Code Copilot checks:
Since
callisNone, the check fails silently.One-Line Fix
Also need to import at the top:
Reproduction
Environment
Impact
All MCP servers using
experimental.enable_tasks()are affected. VS Code Copilot cannot use MCP Tasks for long-running tools, causing 5-minute timeouts instead of proper async task handling.Related