Feature request: native Rate Limiting (MCP spec compliance)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- networking
Research direction
Start at the transport layer and trace how messages pass through Transport::send(), then read the existing SinkStreamTransport decorator pattern. Define how a concurrent-safe token bucket applies to Progress, Completion, Sampling, Logging, and Elicitation messages across stdio, SSE, HTTP, and WebSocket transports. Done means all listed message types receive the required transport-level rate limiting.
Written by the indexing model from the issue text.
Description
Problem
The MCP specification requires rate limiting across multiple message types.
Required (MUST/SHOULD):
Progressnotifications: "Both parties SHOULD implement rate limiting to prevent flooding"Completionrequests: "MUST implement appropriate rate limiting"Samplingrequests: "Clients SHOULD implement rate limiting"Loggingmessages: "Servers SHOULD rate limit log messages"Elicitationrequests: "Clients SHOULD implement rate limiting"
Proposed Architecture
Transport Layer Rate Limiting (token bucket algorithm)
Why Transport Layer:
- Universal Coverage: All message types, all transports (stdio/SSE/HTTP/WebSocket)
- Single Integration Point: All messages flow through
Transport::send() - Existing Patterns: Following established decorator pattern (
SinkStreamTransport) - Performance: Early filtering, concurrent-safe
- Dominant language
- Rust
- Stars
- 3.9k
- Forks
- 645
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 37
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/rust-sdk
-
streamable-http server: a supplied Mcp-Method contradicting an initialize body is silently accepted Openbug P1 ready for work T-transport
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
modelcontextprotocol/rust-sdk#1271 ·
-
bug P2 ready for work T-model
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/rust-sdk#1242 ·
-
P3 question T-documentation T-enhancement
Difficulty 1/5 Under an hour Newbie friendliness 86/100
modelcontextprotocol/rust-sdk#1155 ·
-
bug P1 ready for work T-model T-service
Difficulty 3/5 1-2 days Newbie friendliness 72/100
modelcontextprotocol/rust-sdk#1283 · 1 comment ·
-
bug P0 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1272 · 1 assignee ·
All issues in modelcontextprotocol/rust-sdk
Similar issues
-
bug CLI custom-model
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100