-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
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 TasksCallCapabilityReproduction
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
- VS Code MCP Tasks PR: mcp: implement sep-1732 tasks microsoft/vscode#277888 (SEP-1732 implementation)
- FastMCP issue: Task capabilities in wrong location (experimental.tasks vs tasks) jlowin/fastmcp#2870 (related capabilities location bug)
- MCP Specification: SEP-1686 (Background Tasks), SEP-1732 (Tasks)
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers