Make StreamableHTTPTransport a Rack application#263
Open
koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
Make StreamableHTTPTransport a Rack application#263koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
StreamableHTTPTransport a Rack application#263koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
06f5b81 to
361288f
Compare
StreamableHTTPTransport a standard Rack applicationStreamableHTTPTransport a Rack application
d6d5860 to
d746725
Compare
Add `call(env)` to `StreamableHTTPTransport`, making it a Rack application that works with `mount`, `run`, and Rack middleware. Refactor examples to use Rack middleware classes for MCP logging instead of proc wrappers, demonstrating idiomatic Rack composition with the new `run(transport)` pattern. Update README.md with mount and controller integration patterns. Closes modelcontextprotocol#59, modelcontextprotocol#60 ## How Has This Been Tested? Added tests for `call(env)` as a Rack app. All tests pass. ## Breaking Change No breaking changes. All existing APIs are preserved: - `StreamableHTTPTransport.new(server)` continues to work as before. - `handle_request(request)` is unchanged. The new `call(env)` is a purely additive public method.
d746725 to
0912d7d
Compare
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.
Add
call(env)toStreamableHTTPTransport, making it a Rack application that works withmount,run, and Rack middleware.Refactor examples to use Rack middleware classes for MCP logging instead of proc wrappers, demonstrating idiomatic Rack composition with the new
run(transport)pattern.Update README.md with mount and controller integration patterns.
Closes #59, #60
How Has This Been Tested?
Added tests for
call(env)as a Rack app. All tests pass.Breaking Change
No breaking changes. All existing APIs are preserved:
StreamableHTTPTransport.new(server)continues to work as before.handle_request(request)is unchanged. The newcall(env)is a purely additive public method.Types of changes
Checklist