Skip to content

Conversation

hashemix
Copy link
Member

📌 Summary

This pull request introduces significant improvements to the HTTP and SSE handling logic, decoupling it from the Axum server to enable compatibility with other HTTP servers.

🔍 Related Issues

✨ Changes Made

  • Replaced direct usage of Axum-specific sse::Event with an enhanced, server-agnostic SseEvent struct for improved flexibility.
  • Introduced McpHttpHandler to encapsulate StreamableHttp and SSE logic, improving modularity and reusability.
  • Refactored HTTP handling to use http::Request and http::Response, decoupling StreamableHttp and SSE logic from the Axum server.
  • Updated the HyperServer Axum router to integrate with the new McpHttpHandler for request handling.
  • Streamlined AppState to retain only essential objects, improving efficiency.
  • Included minor refactoring and performance improvements for better code maintainability.

These changes enhance the codebase's flexibility, maintainability, helps with upcoming changes that includes supporting various HTTP servers and serverless MCP servers using services like AWS Lambda, while preserving existing functionality. New examples

🛠️ Testing Steps

cargo make check

💡 Additional Notes

This is the initial phase of a series of planned updates to further enhance server-agnostic and serverless support. More PRs are planned to build on these changes.

@hashemix hashemix added 🔧 Refactor Code cleanup or restructuring with no functional change. 🚀 Enhancement A suggested improvement to existing functionality. labels Oct 12, 2025
@hashemix hashemix merged commit d10488b into main Oct 12, 2025
3 checks passed
@hashemix hashemix mentioned this pull request Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 Enhancement A suggested improvement to existing functionality. 🔧 Refactor Code cleanup or restructuring with no functional change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant