Skip to content

[Feature]: Add support for MCP Tasks #588

Description

@julien896

Problem statement

MCP supports Tasks, but xmcp doesn't currently have a built-in way to define them.

Some operations take more than a single request to complete. In those cases, developers need to manually handle task creation, progress tracking, results, and cancellation using the underlying MCP protocol.

A task API similar to the existing tool API would make these workflows much easier to implement.

Proposed solution

Add support for MCP Tasks in xmcp.

At a minimum, it would be useful to have:

  • A way for tools to return a task instead of an immediate result.
  • Helpers for creating tasks and reporting their status.
  • Support for reading task results and cancelling tasks.
  • TypeScript types for task-related responses and metadata.

Ideally, xmcp would handle the MCP protocol details while allowing users to plug in their own execution and persistence layer. This would make it easier to build background workflows without forcing a specific job system or storage implementation.

Package

xmcp (core framework)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions