Repository navigation
feat(cloudflare): add IP-based rate limiting for MCP and OAuth routes - #619
Merged
Merged
Conversation
dcramer
force-pushed
the
rate-limit-mcp
branch
from
October 31, 2025 22:47
eeb888b to
886a1ec
Compare
dcramer
force-pushed
the
rate-limit-mcp
branch
from
October 31, 2025 22:56
886a1ec to
b7db42e
Compare
Implements rate limiting for MCP clients at 60 requests per minute per IP to protect against high traffic volumes. Built on Cloudflare rate limit bindings with privacy-preserving SHA-256 IP hashing. Key changes: - Add MCP_RATE_LIMITER binding (60 req/60s per IP) - Create reusable rate-limiter utility with graceful degradation - Create client-ip utility for consistent IP extraction across routes - Apply rate limiting before OAuth processing in index.ts - Update app.ts and search.ts to use centralized IP extraction - Add error handling and Sentry logging when IP cannot be extracted - Update tests to include required CF-Connecting-IP headers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Code <noreply@anthropic.com>
dcramer
force-pushed
the
rate-limit-mcp
branch
from
October 31, 2025 23:00
b7db42e to
94988b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements rate limiting for MCP clients at 60 requests per minute per IP to protect against high traffic volumes. Built on Cloudflare rate limit bindings with privacy-preserving SHA-256 IP hashing.
Key changes:
🤖 Generated with Claude Code