servers

Everything Server - Features

Architecture | Project Structure | Startup Process | Server Features | Extension Points | How It Works

Tools

Prompts

Resources

Resource Subscriptions and Notifications

Simulated Logging

Tasks (SEP-1686)

The server advertises support for MCP Tasks, enabling long-running operations with status tracking:

Task Lifecycle

  1. Client calls tools/call with task: true parameter
  2. Server returns CreateTaskResult with taskId instead of immediate result
  3. Client polls tasks/get to check status and receive statusMessage updates
  4. When status is completed, client calls tasks/result to retrieve the final result

Task Statuses

Demo Tools

Server-side tasks (client calls server): Use the simulate-research-query tool to exercise the full task lifecycle. Set ambiguous: true to trigger elicitation - the server will send an elicitation/create request directly and await the response before completing.

Client-side tasks (server calls client): Use trigger-sampling-request-async or trigger-elicitation-request-async to demonstrate bidirectional tasks where the server sends requests that the client executes as background tasks. These require the client to advertise tasks.requests.sampling.createMessage or tasks.requests.elicitation.create capabilities respectively.

Bidirectional Task Flow

MCP Tasks are bidirectional - both server and client can be task executors:

Direction Request Type Task Executor Demo Tool
Client -> Server tools/call Server simulate-research-query
Server -> Client sampling/createMessage Client trigger-sampling-request-async
Server -> Client elicitation/create Client trigger-elicitation-request-async

For client-side tasks:

  1. Server sends request with task metadata (e.g., params.task.ttl)
  2. Client creates task and returns CreateTaskResult with taskId
  3. Server polls tasks/get for status updates
  4. When complete, server calls tasks/result to retrieve the result