Repository navigation
Allow mcp/sdk ^0.8.1 next to ^0.9 - #47
Merged
Merged
Conversation
* Widen the mcp/sdk constraint to "^0.8.1 || ^0.9" * The MCP server console uses only API that is the same in 0.8.1 and 0.9.0: Server::builder(), Builder::setServerInfo(), setDiscovery(), addPrompt(), addTool(), build(), Server::run() and StdioTransport * Lets projects install packages that still require mcp/sdk ^0.8, for example api-platform/mcp Claude-Session: https://claude.ai/code/session_01FJNNwwvzPyUiqfifdYCy99
geronica
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Widen the
mcp/sdkconstraint from^0.9to^0.8.1 || ^0.9.Why
ai-dev0.8.0 replacedphp-mcp/serverwithmcp/sdk ^0.9(#43).api-platform/mcprequiresmcp/sdk ^0.8in all its releases,dev-mainincluded. So a project withspryker-sdk/ai-dev0.8.0 cannot installapi-platform/mcp, because Composer can install only onemcp/sdkversion. This blocks the Storefront API MCP work (PMIP-670).Why this is safe
McpServerConsoleandExamplePromptuse only API that is the same inmcp/sdk0.8.1 and 0.9.0:Server::builder(),Server::run()Builder::setServerInfo(),setDiscovery(),addPrompt(),addTool(),build(): identical signaturesStdioTransportwith the default constructor#[McpPrompt]How I tested it
composer update -W --with mcp/sdk:0.8.1, thencomposer test: OK (138 tests, 965 assertions).McpServerConsoleon 0.8.1 and on 0.9.0:initialize,prompts/list(findsyou_are_welcomeby discovery),tools/listandtools/callgive the expected results.prefer-lowestCI job now resolvesmcp/sdk0.8.1.Notes
--prefer-lowest, Composer installspsr/container1.0.0, and the server then fails withDeclaration of Mcp\Capability\Registry\Container::get(string $id): mixed must be compatible with Psr\Container\ContainerInterface::get($id). This happens withmcp/sdk0.9.0 too, because both versions allowpsr/container ^1.0 || ^2.0. The tests do not reach that class, so CI stays green. A follow-up can requirepsr/container ^1.1 || ^2.0.Checklist
https://claude.ai/code/session_01FJNNwwvzPyUiqfifdYCy99