Skip to content

[Server] SEP-2663 Tasks: TaskStoreInterface with InMemory and PSR-16 stores #347

Open

Description

@chr-hertel

Task persistence for SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335.

Scope

  • Mcp\Server\Task\TaskStoreInterface: save(), get() (null for unknown or expired — a client cannot tell them apart and does not need to), delete().
  • InMemoryTaskStore with a task limit (default 1000, oldest-by-last-use evicted) so unbounded task creation cannot exhaust memory. Right for stdio and single-process runtimes; wrong under PHP-FPM, where the worker that creates a task is not the one polled for it.
  • Psr16TaskStore (PSR-16 cache-backed) for PHP-FPM — a filesystem adapter covers the "file store" case, so no separate FileTaskStore.
  • Expiry is TTL-based (Task::isReadable() on read, cache TTL for PSR-16) plus the in-memory limit; no request-counted GC pass.
  • The store is the one place both server-side task state and the pending server→client asks (Task::$inputRequests) live.
  • The store is handed to TasksExtension, not to the builder (see [Server] SEP-2663 Tasks: TasksExtension, capability gate, tasks/* handlers #346).

Activity

  1. added
    Server
    P0
    improves spec compliance
    needs design
    enhancement
    on May 26, 2026
  2. added
    2026-07-28
    on May 26, 2026
  3. changed the title [-][Server] SEP-2663 Tasks: TaskStoreInterface with InMemory default and DoS limits[/-] [+][Server] SEP-2663 Tasks: TaskStoreInterface with InMemory and PSR-16 stores[/+] on Aug 17, 2026
  4. removed
    P0
    on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2026-07-28Serverenhancementimproves spec complianceneeds design

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions