Repository navigation
Open
Description
Motivation
#102 / draft PR #106 correctly land run_agent as an MCP task on the 2025-11-25 experimental shape that mcp 1.30 still ships (capabilities.tasks, params.task, tasks/get|result|list|cancel). The PR body already records the spike finding: that experimental API is deprecated, and a host that speaks only the official Tasks extension keeps the plain synchronous call.
That official extension is now published:
- Spec: Tasks extension (
io.modelcontextprotocol/tasks), revision 2026-07-28 - SEP: SEP-2663 (Final; moves tasks out of core into an extension)
- Overview + reference: modelcontextprotocol.io/extensions/tasks, modelcontextprotocol/ext-tasks
Wire differences that matter for s1a-mcp (non-exhaustive; follow the spec):
- Capability is per-request
extensions["io.modelcontextprotocol/tasks"], not the oldcapabilities.tasksblob. - Server returns
resultType: "task"/CreateTaskResult; clients polltasks/get(and optionallytasks/update/tasks/cancel). - Status set is
working | input_required | completed | failed | cancelled; tool-levelisError: truestayscompletedwith the tool result (protocol faults usefailed). - Hosts that only negotiate the extension will never send the 2025-11-25
params.taskflag that [Feat] Let run_agent run as an MCP task (2025-11-25 experimental tasks on the 1.x SDK) #106 keys off.
Until this port lands, Claude Code / other 2026-07-28 hosts that advertise the extension still cannot get a durable handle for a multi-minute Allrecipes / Flights run_agent.
Proposed work
- After [MCP] Adopt MCP Tasks so long run_agent can outlive the host session #102 / [Feat] Let run_agent run as an MCP task (2025-11-25 experimental tasks on the 1.x SDK) #106 merge (or in parallel behind a feature flag): spike which
mcp/ FastMCP release first speaksio.modelcontextprotocol/tasks. Record whether the mcp 2 / fastmcp 4 move from #74 is now a hard prerequisite. - Advertise the extension in server discover capabilities; treat a client that only sends the extension (no experimental
taskparam) as task-capable forrun_agent. - Map the existing in-memory task store + cancel/
CancelScopepath from [Feat] Let run_agent run as an MCP task (2025-11-25 experimental tasks on the 1.x SDK) #106 onto the extension methods; keep the experimental path working until hosts drop it, or document a cutover window. - Contract tests with a fake client capability blob for: extension-only client, experimental-only client, neither (sync path). No live browser required.
- Update
docs/skills.md/docs/architecture.md: which host protocol revision was verified; do not invent host flags.
Acceptance criteria
- Client without any tasks capability: behaviour matches today's sync path (existing MCP tests pass).
- Client advertising only
io.modelcontextprotocol/tasks:run_agentreturns a task handle;tasks/getreaches a terminal status with the same summary shape as the sync tool result;tasks/cancelfrees the run slot. - Experimental 2025-11-25 path either still works or is explicitly removed with a CHANGELOG note and a migration sentence in the docs.
- Docs name the SDK / FastMCP versions that were tested; no unverified host CLI flags.
References
- https://tasks.extensions.modelcontextprotocol.io/specification/2026-07-28/tasks
- https://modelcontextprotocol.io/seps/2663-tasks-extension
- https://modelcontextprotocol.io/extensions/tasks/overview
- https://github.com/modelcontextprotocol/ext-tasks
- Related: [MCP] Adopt MCP Tasks so long run_agent can outlive the host session #102, [Feat] Let run_agent run as an MCP task (2025-11-25 experimental tasks on the 1.x SDK) #106, [Deps] Bound mcp below 2 and record what blocks the move to the 2026-07-28 SDK #74, [MCP] Keep long run_agent calls inside host tool timeouts: progress, bounded lock wait, cancellation, documented settings #83
Metadata
Metadata
Assignees
Labels
No labels
Activity
Birfy commentedon Nov 16, 2026
Spike for step 1 (checked 2026-11-16 against PyPI and the openjiuwen pin
jj-0.1.0in this repo's lock):io.modelcontextprotocol/tasksexists only on the 2.x / 4.x line.fastmcp-tasks4.2.0 describes itself as "Background task execution for FastMCP servers via the io.modelcontextprotocol/tasks extension (SEP-2663)". It requiresfastmcp-slim[server]==4.2.0(somcp>=2), pluspydocket>=0.26.1andredis.mcp2.3.0 ships a genericmcp/server/extension.py(extension request methods such astasks/get) but no built-in tasks store.modelcontextprotocol/ext-taskspublishes only a TypeScript package.mcp1.30.0 (mcp>=1.26,<2inpyproject.toml). The 1.x SDK only has the deprecated 2025-11-25 experimental tasks that [Feat] Let run_agent run as an MCP task (2025-11-25 experimental tasks on the 1.x SDK) #106 uses.jj-0.1.0declaresfastmcp<4.0,>=2.14.2, and fastmcp 3.x requiresmcp<2. The extension cannot be installed next to the openjiuwen pin until the fork relaxes that bound.That leaves two paths. (a) Wait for an openjiuwen pin that allows fastmcp 4 / mcp 2, then adopt
fastmcp-tasks; its docket/redis backend would also need an in-memory or local option fors1a-mcp. (b) Hand-roll the extension's wire methods on the 1.x low-level server next to #106's in-memory store. (b) can be done without a dependency move, but it re-implements a spec that the SDK line already covers, and we would have to drop it after the move. I'd hold this issue until #106 lands and the openjiuwen bound moves, rather than open a PR on (b).