Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/src/client/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const Set<String> _statelessRemovedRequestMethods = {
const Set<String> _statelessRemovedNotificationMethods = {
Method.notificationsInitialized,
Method.notificationsRootsListChanged,
Method.notificationsTasksStatus,
};

/// An MCP client implementation built on top of a pluggable [Transport].
Expand Down
1 change: 1 addition & 0 deletions lib/src/server/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class Server extends Protocol {
static const Set<String> _statelessRemovedNotificationMethods = {
Method.notificationsInitialized,
Method.notificationsRootsListChanged,
Method.notificationsTasksStatus,
};

static const Set<String> _inputRequiredResultMethods = {
Expand Down
26 changes: 26 additions & 0 deletions test/mcp_2026_07_28_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,18 @@ void main() {
resultParams: const TaskResultRequest(taskId: 'task-1'),
meta: taskExtensionMeta,
),
)
..receive(
JsonRpcTaskStatusNotification(
statusParams: const TaskStatusNotification(
taskId: 'task-1',
status: TaskStatus.working,
ttl: null,
createdAt: '2026-07-28T00:00:00Z',
lastUpdatedAt: '2026-07-28T00:00:00Z',
),
meta: taskExtensionMeta,
),
);
await _pump();

Expand Down Expand Up @@ -2623,6 +2635,20 @@ void main() {
method: Method.notificationsRootsListChanged,
call: client.sendRootsListChanged,
),
(
method: Method.notificationsTasksStatus,
call: () => client.notification(
JsonRpcTaskStatusNotification(
statusParams: const TaskStatusNotification(
taskId: 'task-1',
status: TaskStatus.working,
ttl: null,
createdAt: '2026-07-28T00:00:00Z',
lastUpdatedAt: '2026-07-28T00:00:00Z',
),
),
),
),
];

for (final scenario in removedNotifications) {
Expand Down