feat: use MCP Tasks protocol for async operations#1631
Merged
Conversation
Replace hand-rolled task store with the MCP SDK's InMemoryTaskStore. The SDK auto-registers handlers for tasks/get, tasks/result, tasks/list, and tasks/cancel when taskStore is passed to the Server constructor. - Training agent uses extra.taskStore (SDK wrapper with status notifications and session propagation) with raw store fallback for tests - TTL clamped to 24h max, 1h default to prevent memory exhaustion - Tool definitions declare execution.taskSupport per MCP spec - Docs show both Server + taskStore and McpServer + registerToolTask paths - Security guidance for publishers: session scoping, TTL limits, rate limits Related: adcontextprotocol/adcp-client#378 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merge main into mcp-task-support branch. Resolve conflict in task-handlers.ts tools/call handler by combining our task-augmented result assignment pattern with main's adcpError() structured error format. Update 27 test assertions to match adcpError response shape. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… format and status_filter defaults Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley
added a commit
that referenced
this pull request
Mar 23, 2026
Take main's training-agent tests (already fixed by MCP Tasks PR #1631), renumber our migration from 323 to 324 to avoid conflict with 323_addie_no_speculation.sql, and update test reference. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
InMemoryTaskStore— the SDK auto-registers handlers fortasks/get,tasks/result,tasks/list,tasks/cancelextra.taskStore(SDK wrapper with status notifications and session propagation) with raw store fallback for test harnessexecution.taskSupportper MCP Tasks specServer+taskStoreandMcpServer+registerToolTaskpathsRelated client-side work: adcontextprotocol/adcp-client#378, adcontextprotocol/adcp-client#379
Test plan
🤖 Generated with Claude Code