What's Changed
- Use negotiated MCP protocol version for HTTP client requests by @andrew-downey in #257
- Improve test error when unexpected errors are found in response by @axlon in #259
- Fix schema return type in tool stub by @axlon in #261
- Bump stefanzweifel/git-auto-commit-action from 7.1.0 to 7.2.0 in the github-actions group by @dependabot[bot] in #263
- Bump stefanzweifel/git-auto-commit-action from 7.1.0 to 7.2.0 in the github-actions group by @dependabot[bot] in #264
- Fix nested OAuth resource path with preceding route parameters by @lazerg in #262
- Add
#[SensitiveParameter]to parameters carrying secrets by @axlon in #265 - Fix CursorPaginator returning trailing items for a negative cursor offset by @dfinchenko in #267
- Update phpdoc for assertStructuredContent by @chrisvanlier2005 in #268
- Fix DCR scope persistence for Passport clients by @Gujiassh in #270
- Serialize structured content before asserting by @chrisvanlier2005 in #269
New Contributors
- @andrew-downey made their first contribution in #257
- @axlon made their first contribution in #259
- @dfinchenko made their first contribution in #267
- @chrisvanlier2005 made their first contribution in #268
Full Changelog: v0.8.2...v0.9.0
Upgrading To v0.9.0 From v0.8.0
Custom Client Transports
Likelihood Of Impact: low
The Laravel\Mcp\Client\Contracts\Transport contract now requires a setProtocolVersion method. The client calls this method after the initialize handshake so the transport can send the negotiated protocol version on subsequent requests.
If your application implements this contract, add the method to your transport:
public function setProtocolVersion(string $version): void
{
$this->protocolVersion = $version;
}Transports that do not send per-request headers may implement the method as a no-op, as the first-party StdioTransport does.
Client Protocol Version Negotiation
Likelihood Of Impact: Medium
The MCP client now validates the negotiated protocol version against the new ProtocolVersion::clientSupported() method rather than ProtocolVersion::supported(). The client supports 2025-11-25 and 2025-06-18.
Connecting to a server that negotiates 2025-03-26 or 2024-11-05 previously succeeded and will now throw a Laravel\Mcp\Exceptions\ClientException.
The ProtocolVersion::supported() method is unchanged and still reports every version the server accepts.