feat(everything): add SEP-1686 Tasks support #3193
Draft
+872
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add support for SEP-1686 Tasks to the Everything Server. This enables the server to demonstrate MCP's task-based execution pattern for long-running operations, including task lifecycle management, status polling, and the
input_requiredflow.This PR demonstrates both directions of MCP Tasks:
Server Details
Motivation and Context
This addresses issue #3037 - adding Tasks support to the Everything Server as part of the SEP-1686 implementation.
The Everything Server serves as a reference implementation demonstrating MCP capabilities. With Tasks now part of the MCP specification (2025-11-25 schema), the Everything Server should demonstrate this feature to help client developers understand and test their Tasks implementations.
Server-side Tasks (Client calls Server)
tools/callwith task parametertasks/getwithstatusMessageupdatestasks/resultinput_requiredstatus flow with elicitation side-channelClient-side Tasks (Server calls Client) - Bidirectional
sampling/createMessagewith task metadataCreateTaskResulttasks/getfor status updatestasks/resultelicitation/createHow Has This Been Tested?
simulate-research-query) still need testing with Inspectortrigger-sampling-request-async,trigger-elicitation-request-async) need Inspector with task supportTODO: Full testing with Inspector once it supports Tasks capability.
Breaking Changes
None.
Types of changes
Checklist
Additional context
Files Changed
src/everything/server/index.tsInMemoryTaskStoreandInMemoryTaskMessageQueuefrom SDK experimentaltaskscapability withlist,cancel, andrequests.tools.callsrc/everything/tools/simulate-research-query.ts(new)experimental.tasks.registerToolTask()APIinput_requiredflow whenambiguous: trueis passedsrc/everything/tools/trigger-sampling-request-async.ts(new)tasks/getfor statustasks/resulttasks.requests.sampling.createMessagesrc/everything/tools/trigger-elicitation-request-async.ts(new)tasks.requests.elicitation.createsrc/everything/tools/index.tssrc/everything/docs/features.mdBidirectional Task Flow
tools/callsimulate-research-querysampling/createMessagetrigger-sampling-request-asyncelicitation/createtrigger-elicitation-request-asyncRelated PRs/Issues