-
Notifications
You must be signed in to change notification settings - Fork 1.3k
mcp tasks: add capabilities.tasks negotiation for task-mode tools #2538
Description
hi — field report from gemini-research-mcp, a production mcp server using fastmcp[tasks] with TaskConfig(mode="required").
what we observe
copilot cli (v1.0.18) does not declare capabilities.tasks during mcp client initialization. when an mcp server exposes a tool with TaskConfig(mode="required"), the call is rejected:
McpError: MCP error -32600: Tool "research_deep" requires task-based execution.
Use client.experimental.tasks.callToolStream() instead.
the same server and tools work correctly in vs code copilot chat, which negotiates task capabilities via task: shouldUseTask ? {} : undefined in mcpServer.ts.
impact
- mcp servers using task mode for long-running operations (3-20 min) cannot be invoked from copilot cli
- server authors must downgrade to
TaskConfig(mode="optional")as a workaround, losing progress reporting and timeout resilience - parity gap with vs code copilot chat
evidence
copilot cli:
- no
capabilities.tasksin client init → server rejectstools/callwith-32600
vs code refs (working):
mcpServer.ts#L1057-L1088— progressToken + shouldUseTask logicmcpServerRequestHandler.ts#L365-L384— notifications/progress forwarded- related: microsoft/vscode#298013 — statusMessage surfacing (merged in 1.111.0)
server refs (gemini-research-mcp):
server.py#L570-L572—task=TaskConfig(mode="required")server.py#L685-L688—ctx.report_progress()for status updates
mcp spec:
- tasks introduced in
2025-11-25spec update (experimental) - fastmcp implementation:
fastmcp[tasks]>=3.0.2with docket-based task routing
request
add capabilities.tasks negotiation to copilot cli's mcp client, and use client.experimental.tasks.callToolStream() for tools that require task-based execution. this brings parity with vs code copilot chat and unblocks long-running mcp tools.