Skip to content

fix(mcp): support MCP SDK 0.9 registry capabilities - #8758

Open
tacman wants to merge 2 commits into
api-platform:5.0from
tacman:fix/mcp-sdk-09
Open

tacman wants to merge 2 commits into
api-platform:5.0from
tacman:fix/mcp-sdk-09

Conversation

@tacman

@tacman tacman commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch? 5.0
Tickets —
License MIT
Doc PR Not needed (compatibility fix)

MCP SDK 0.9 adds RegistryInterface::publishesListChanges(), so loading SecureRegistry currently fails with a missing abstract method when using Symfony MCP bundle 0.15. Forward the capability to the decorated registry, retain SDK 0.8 compatibility, and allow both SDK versions in Composer.

src/Mcp/Tests/Capability/Registry/SecureRegistryTest.php reproduces the fatal error before the fix and checks both true and false forwarding without triggering lazy loading. The capability tests pass with SDK 0.9.0 (17 tests, 38 assertions) and 0.8.1 (17 tests, 38 assertions); existing PHPUnit mock notices remain. Targeted PHPStan, PHP CS Fixer, and Composer validation pass.

tacman commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

A quick update: Symfony AI 1.0.0-BETA1 has now been released, including symfony/mcp-bundle beta 1, which requires mcp/sdk ^0.9. This compatibility fix is therefore relevant to the 1.0 beta as well as 0.15.

We've migrated our shared AI bundles and consuming apps to beta 1. API Platform's MCP integration remains a blocker: we've temporarily disabled it in affected apps, and kept one app on the older MCP bundle where we still need that integration.

My expectation is that entering beta should mean fewer breaking changes as Symfony AI approaches 1.0, though that's an expectation, not a backward-compatibility guarantee—particularly for the separately versioned MCP SDK, which is still at 0.9. This PR keeps support for both SDK 0.8 and 0.9; the targeted registry tests already pass against both versions.

Would you be open to moving this compatibility fix forward now that beta 1 is available?

@tacman

tacman commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@soyuka, a nudge on this one. Symfony AI 1.0.0-BETA1 is out, and symfony/mcp-bundle beta 1 requires mcp/sdk ^0.9. With SDK 0.9, loading SecureRegistry fails on a missing abstract method (RegistryInterface::publishesListChanges()), so mcp: true can't be used with the beta. The fix forwards that capability to the decorated registry, keeps SDK 0.8 support, and is about 40 lines. The registry tests pass on both 0.8.1 and 0.9.0. We've had to disable the API Platform MCP integration in our apps until it lands. Happy to adjust anything: branch, tests, naming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant