Skip to content

[FEATURE][CF-DATAPLANE][TASKS]: Add stateless backend-scoped task handles #6185

Description

@lucarlig

Part of #5683.

Scope

Implement this in the Rust dataplane repository (contextforge-org/contextforge-data-plane) for MCP 2026-07-28 only.

In a virtual host with multiple upstream MCP backends, an upstream-generated taskId is not sufficient to route later tasks/get, tasks/update, and tasks/cancel requests. The dataplane must expose a stable handle without relying on protocol sessions or an in-memory task-to-backend map.

Work

  • Add a versioned, opaque, stateless task-handle codec containing the backend route and original upstream taskId.
  • Keep the encoding reversible by any dataplane replica; do not depend on Mcp-Session-Id, process memory, or Redis session affinity.
  • Reject malformed handles, unsupported handle versions, and backends outside the caller's current virtual-host configuration without leaking backend details.
  • Keep the codec usable by both task-creation responses and all tasks/* lifecycle methods.
  • Update the MCP routing semantics documentation.

Acceptance criteria

  • Arbitrary valid upstream task IDs round-trip without loss.
  • Handles from multiple backends cannot collide or route to the wrong backend.
  • Malformed, unknown-version, and unavailable-backend handles fail closed with protocol-appropriate errors.
  • A handle remains routable after a dataplane restart or on a different replica with the same configuration.
  • Focused unit tests cover round trips, invalid input, backend isolation, and versioning.

Out of scope

  • Python control-plane task handling.
  • Legacy initialize, MCP sessions, SSE, or MCP 2025-11-25 task compatibility.
  • Reintroducing removed tasks/list or tasks/result methods.

Metadata

Metadata

Assignees

Labels

CF-DATAPLANETasks related to the creation of new Data Plane for ContextForge.mcp-2026-07-28Issues related to compliance with MCP 2026-07-28rustRust programming

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions