Feat: Http SSE transport as per '2024-11-05' MCP spec#34
Merged
sixlive merged 5 commits intoprism-php:mainfrom Mar 1, 2026
Merged
Feat: Http SSE transport as per '2024-11-05' MCP spec#34sixlive merged 5 commits intoprism-php:mainfrom
sixlive merged 5 commits intoprism-php:mainfrom
Conversation
sixlive
approved these changes
Mar 1, 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.
Description
This PR adds support for the HTTP with Server-Sent Events (SSE) transport protocol, as defined in the MCP specification (2024-11-05). This enables the Relay package to connect to MCP servers that expose HTTP+SSE endpoints, complementing the existing
HttpandStdiotransports.The implementation follows the MCP HTTP+SSE transport flow:
endpointevent to obtain the message posting URL with session IDinitializerequest with required params (protocolVersion,capabilities,clientInfo)initializednotification after successful initializationmessageeventsConfiguration Example
Files Changed
src/Enums/Transport.php- AddedHttpSseenum casesrc/Transport/HttpSseTransport.php- New transport implementationsrc/Transport/TransportFactory.php- Added factory support forHttpSsetests/Unit/Transport/HttpSseTransportTest.php- Test suite (19 test cases)tests/TestDoubles/HttpSseTransportFake.php- Test double for mockingtests/Unit/Transport/TransportFactoryTest.php- Added test case for HttpSse factory creationTesting
All existing tests pass (78 tests, 170 assertions). The new transport includes 19 dedicated test cases.
Breaking Changes
None. This is a purely additive feature that introduces a new transport option without modifying existing transports or APIs.