mcpproxy-go icon indicating copy to clipboard operation
mcpproxy-go copied to clipboard

[Feature]: Long-running tool support via the tasks extension (io.modelcontextprotocol/tasks)

Open felipecrs opened this issue 1 week ago • 0 comments

Problem / motivation

A long tool call that is interrupted mid-flight is dead today: the client loses the work unless the connection has MRTR continuation support and the upstream server kept the request alive. The io.modelcontextprotocol/tasks extension is the protocol answer: the server assigns a task id, the client polls or listens for updates, and a call can be retrieved or cancelled after the fact.

Many modern tools declare execution.taskSupport in their listings. mcpproxy drops that declaration at discovery (client.go#L515-L549, config.go#L1523-L1541), and tasks/* methods have no routing anywhere: an upstream that sends one hits the same decline path as any unknown method.

This depends on preserving execution.taskSupport through discovery (see #2042).

(mcp-go v1.0.0 types include tasks/get/tasks/list/tasks/result/tasks/cancel payloads, but not the finalized tasks/update. The 2026-07-28 changelog defines the full set: https://modelcontextprotocol.io/specification/2026-07-28/changelog)

Proposed solution

  • Capture execution.taskSupport per tool (blocked on #2042)
  • Route tasks/get, tasks/list, tasks/update and tasks/result to the client that owns the upstream connection, which is what internal/clientrelay already does for elicitation, sampling and roots (relay.go)
  • Decide whether a required task-support tool should surface as callable at all when tasks routing is unavailable, as an alternative to a runtime error
  • Possibly contribute the finished method-set constants upstream to mcp-go, where tasks/update is still missing

Alternatives considered

Waiting for the protocol era-pin to be lifted first. Rational, but getting the routing in place under the current era would make that transition a configuration flip instead of a feature project. This bit is a judgement call.

Which edition?

Both / not sure

Pre-submission checklist

  • [x] I searched existing issues and discussions for a similar request

felipecrs avatar Nov 25 '26 16:11 felipecrs