Skip to content

feat(mcp): support modern task execution - #78

Draft
carldebilly wants to merge 1 commit into
dev/cdb/issue-51-mcp-v2from
dev/cdb/issue-72-mcp-tasks
Draft

feat(mcp): support modern task execution#78
carldebilly wants to merge 1 commit into
dev/cdb/issue-51-mcp-v2from
dev/cdb/issue-72-mcp-tasks

Conversation

@carldebilly

@carldebilly carldebilly commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

Adds modern MCP Tasks support for Repl commands marked .LongRunning().

Behavior

  • Uses the official ModelContextProtocol.Extensions.Tasks 2.2.0 extension.
  • A modern client that negotiates io.modelcontextprotocol/tasks receives a task handle for a long-running command and can poll or cancel it.
  • Commands without .LongRunning() remain synchronous.
  • Clients without Tasks support, including legacy clients, receive the existing synchronous tools/call response.
  • Uses an in-memory task store by default, suitable for stdio; ReplMcpServerOptions.TaskStore allows a durable shared store for HTTP or restart-resilient deployments.

Documentation

Documents the modern-only protocol, the default store, and the current SDK limitation: task-backed MCP tools cannot compose with MRTR/interactive flows yet.

Validation

  • C# integration tests using the official SDK client cover task creation and polling, synchronous behavior, legacy fallback, and cancellation.
  • MSTest runs the official MCP Inspector 2.2.0 against the real stdio sample, covering normal resources and the long-running synchronous fallback.
  • MCP suite: 234 passing, 2 Inspector tests opt-in; Inspector run: 2/2 passing.

Closes #72.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement MCP Tasks runtime for .LongRunning() commands (ModelContextProtocol.Extensions.Tasks)

1 participant