v0.7.0
What's Changed
Introduces the SEP-2133 extensions framework and the first extension built on it, tasks (SEP-2663). Task status is delivered by polling only, which SEP-2663 makes conformant.
Added
- The SEP-2133 extensions framework. An extension declares its capability identifier, settings, and the methods it owns, enabled via
ServerBuilder::enableExtension()/ClientBuilder::enableExtension(). Extensions are disabled by default and every declaration is validated at enable time. - Extension capability negotiation on both sides. A server answers an extension-owned request from a client that did not declare the extension with
-32021. A client refuses an extension's outbound methods against a server that did not advertise it. - The tasks extension (
io.modelcontextprotocol/tasks, SEP-2663) underNexus\Mcp\Extension\Tasks. It servestasks/get,tasks/updateandtasks/cancel, and brokerstools/callinto long-running tasks. TheTaskClientfacade calls tools as tasks, polls at the server-suggested interval, and answersinput_requiredrounds through a resolver. RequestHandlerDecoratorInterface, the seam for wrapping the handler that serves a spec-registry method atbuild()time. Treat its shape as provisional while0.xlasts.Client::stampMeta()andClient::mintRequestId()are public, so hand-builtsendRequest()requests carry the same lifecycle_metaand id scheme the typed methods use.ResultType::Taskand theTaskHandleResultmarker, and theMcp-Nameheader mirrorsparams.taskIdon the tasks methods.
Changed
ServerBuilder::addRequestHandler()/addNotificationHandler()and theirClientBuildercounterparts take the envelope class that parses the registered method (see BREAKING_CHANGES.md).
Fixed
- Vendor-method handlers registered via
addRequestHandler()/addNotificationHandler()were unreachable: the parser answered-32601before dispatch consulted them. - A vendor or extension handler returning a result outside the spec's typed pairs was refused as an internal error. Non-spec methods now wrap any result in the generic response envelope.
- A request parsed by a user-registered class without
RequestParams-shaped params crashed into a-32603. It is now rejected as-32600with the echoed id.
Full Changelog: v0.6.0...v0.7.0