Skip to content
AdminKit

Cancellation (MCP)

Cancellation, part of the Model Context Protocol specification, is how either side of an MCP connection asks the other to stop processing a request that is still in progress, using a notifications/cancelled message that names the original request's ID and an optional human-readable reason. Because it is an ordinary JSON-RPC notification, it carries no ID of its own and expects no reply. A receiver that gets a cancellation notification should stop working on the named request, free whatever it was holding for it, and not send a response for that request afterward -- but the spec also makes cancellation advisory rather than guaranteed: a receiver may simply ignore a cancellation naming a request it has never heard of, one it already finished, or one it cannot actually interrupt. Because a cancellation notification and the original request's own response can cross in transit, the sender of a cancellation is expected to ignore any response that still arrives for the request it just tried to cancel. The initialize request specifically must never be cancelled by a client.

By AdminKit team, Netbase JSC · Updated