refactor: refactor Streamable HTTP ktor extensions (#562) - #568
Merged
Conversation
kpavlov
commented
Mar 1, 2026
| @@ -1,3 +1,5 @@ | |||
| @file:Suppress("TooManyFunctions") | |||
Contributor
Author
There was a problem hiding this comment.
Splitting the file is beyond the scope of this PR.
kpavlov
commented
Mar 1, 2026
| route(path) { | ||
| post { | ||
| mcpStatelessStreamableHttpEndpoint( | ||
| enableDnsRebindingProtection = enableDnsRebindingProtection, |
Contributor
Author
There was a problem hiding this comment.
This code caused a configuration object to be created on every call.
kpavlov
marked this pull request as ready for review
March 1, 2026 21:09
e5l
requested changes
Mar 2, 2026
kpavlov
force-pushed
the
kpavlov/562-refactor-ktor-extensions
branch
from
March 2, 2026 09:43
d436796 to
927cdbc
Compare
kpavlov
force-pushed
the
kpavlov/562-refactor-ktor-extensions
branch
from
March 2, 2026 15:31
a872e0a to
f5845fa
Compare
…generics for improved type safety
…erverTransport.Configuration` - Refactored `mcpStatelessStreamableHttp` to utilize `StreamableHttpServerTransport.Configuration` for enhanced flexibility and maintainability. - Introduced additional overloads of MCP routing functions to improve usability and extensibility. - Added missing KDoc comments.
kpavlov
force-pushed
the
kpavlov/562-refactor-ktor-extensions
branch
from
March 2, 2026 17:45
f5845fa to
4d6681b
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…ents - Deleted the unused `hasTransport` method from `TransportManager`. - Removed redundant KDoc comments for private methods in `KtorServer`.
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.
TransportManager.hasTransportStreamableHttpServerTransport.Configuration: refactoredmcpStatelessStreamableHttpto useStreamableHttpServerTransport.Configuration; Introduced additional overloads of MCP routing functions.Motivation and Context
Address the issue when StreamableHttpServerTransport.Configuration is created on every post invocation
How Has This Been Tested?
Regression tests. No public api changes
Breaking Changes
None
Types of changes
Checklist
Additional context
#521