Refactor MCP gateway into focused modules#59
Merged
Conversation
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
lucarlig
marked this pull request as ready for review
July 15, 2026 12:51
dawid-nowak
approved these changes
Jul 16, 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.
Summary
mcp_gateway.rstomcp_service.rsso the filename matches its primary responsibilitymcp_service.rsas a thinMcpServicedefinition and RMCPServerHandleradaptermcp_service/by capability: initialization, tools, resources, prompts, and completionbackend_transports.rsidentifier_routing.rslist_aggregation.rsWhy
The original module mixed RMCP server handling, session-scoped backend transport storage, identifier routing, list aggregation, and tests in one file. Separating those concerns makes the hot path easier to navigate while retaining one clear adapter for the RMCP trait.
Impact
This is a behavior-preserving internal refactor. MCP handler bodies now live behind thin
ServerHandlerdelegations, with no intended protocol or runtime behavior changes.Validation
cargo fmt --all --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo nextest run --locked --workspace(68 passed)mdbook build docs/bookmdbook test docs/bookgit diff --check