Description
This is working beautifully - an elegant solution. With just a few lines of code, my FastAPI server endpoints now accessible via MCP endpoints. The httpx injection for timeout is brilliant.
Just one suggestion - support for rate limiting.
Is your feature request related to a problem? Please describe.
Yes – I’d like to implement standard rate limiting (e.g. X requests per minute) as supported by packages like slowapi
. As far as I can tell, this isn't currently supported.
Describe the solution you'd like
Support for rate limiting in MCP – either via dependency injection or any other approach.
Describe alternatives you've considered
I’ve tried using slowapi
at the middleware level – both globally and at individual endpoints – but it didn’t work consistently. Often the client connects to the MCP server, but the tool fails to detect it properly. Tried a few variations, but didn't works ...
Additional context
NA
Thanks for sharing a wonderful solution.