Skip to content

Option for Rate Limiting #81

Open
Open
@amararun

Description

@amararun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions