Migrating from 0.2
What changed between mcp-vitest 0.2 and 0.3, and how to keep the old behavior if it bites.
Everything from 0.2 keeps working. Three changes alter what your server sees, so they are worth a look if a suite starts behaving differently.
| Change | Effect | If it bites |
|---|---|---|
v2 connections now negotiate 2026-07-28. Through 0.2.1 the v2 lane silently ran 2025-11-25, because versionNegotiation defaults to 'legacy'. | The 2026 era is required for doubles to work at all. Progress collection was verified unaffected. | mcpTest(server, { protocolVersion: '2025-11-25' }) restores the old behavior. |
The client now advertises sampling, elicitation, and roots. Capabilities are declared at connect, before a test body can register a double, so they go out unconditionally. | A server that branches on client capabilities now takes its sampling or elicitation path where 0.2.1 took the fallback, then fails with no double is registered. | Register the double, or assert the fallback against a server built without those branches. |
SdkClientLike gained a required complete(). | Only affects a hand-written SdkClientLike or RawConnection. | Add the method. Nothing else changed shape. |
RawConnection gained a required supports. | Same audience: a hand-written connection must declare { roots, serverInitiatedRequests }. | Add the field. It is required on purpose - an absent one would read as "supports everything". |