Skip to content

Conversation

hashemix
Copy link
Member

📌 Summary

Add Middleware Support to mcp_http_handler for Enhanced Request/Response Processing and future Oauth support.

This pull request adds middleware support to the mcp_http_handler module, enabling modular and extensible processing of HTTP requests and responses. The implementation includes a Middleware trait, a MiddlewareChain struct for chaining multiple middleware instances, and utility functions to support consistent body handling.

This feature enables developers to insert custom logic- such as logging, authentication, or rate limiting—into the HTTP request/response pipeline in a thread-safe, asynchronous-compatible way, independent of the underlying HTTP framework.

🛠️ Testing Steps

cargo make check

@hashemix hashemix merged commit 18b1e6f into main Oct 19, 2025
3 checks passed
@hashemix hashemix mentioned this pull request Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant