feat!: extract Axum to standalone rust-mcp-axum crate#146
Open
hashemix wants to merge 5 commits into
Open
Conversation
…factor/extract-axum-crate
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
Extracts the Axum HTTP server integration from
rust-mcp-sdkinto a standalonerust-mcp-axumcrate. This makesrust-mcp-sdkframework-agnostic (zero HTTPframework dependencies) while providing a dedicated first-class Axum crate.
👥 Support for both scenarios:
create_axum_server().start().awaitmcp_routes(state, handler, &mount_opts)to mount on existing Axum apps✨ Changes Made
New crate:
crates/rust-mcp-axum/- standalone Axum integration withAxumServer,AxumServerOptions,AxumRuntime,mcp_routes()mount function,AxumMountOptionsfor BYO-server pattern, andcreate_axum_server()factoryRenamed types:
HyperServer→AxumServerHyperServerOptions→AxumServerOptionsHyperRuntime→AxumRuntimecreate_server()→create_axum_server()Deleted
crates/rust-mcp-sdk/src/hyper_servers/, SDK is now framework-agnostic ⭐SDK cleanup: removed
axum,axum-serverdependencies; removedhyper-server,ssl,tls-no-providerfeatures;removed
#[cfg(feature = "hyper-server")]gatesAdded new tests in covering health check, streamable HTTP, SSE, messages, fallback routes, error bridge, and options
Updated SDK examples and related SDK integration tests as well as
rust-mcp-extraexamples🛠️ Testing Steps
# Full CI pipeline cargo make check💡 Additional Notes
Breaking changes :