Provides rate limiting for Next.js applications using sliding window and token bucket algorithms.
Also known as sathergate/sathergate-toolkit, ratelimit-next
- Stars
- 106
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.1.1
- Last commit
- Sep 11, 2026
- License
- —
What is floodgate MCP?
floodgate provides rate limiting for Next.js applications using sliding window and token bucket algorithms.
Summary generated from the project's README
About floodgate MCP server
Floodgate provides rate limiting capabilities specifically designed for Next.js applications. It implements two distinct algorithms, the sliding window and the token bucket, to manage request frequencies. Developers can define specific rules, such as limiting an API to sixty requests per one minute, to protect their application infrastructure.
This server is part of the sathergate-toolkit, which is built to be agent-native. This means it includes MCP tools to allow AI coding agents to discover and use the functionality directly. The package is written in pure TypeScript with zero npm dependencies and requires no external services to function, making it a local-first solution for managing traffic limits within a Next.js environment.
What you can do with it
- 1Apply rate limiting algorithmsUse sliding window or token bucket methods to control the flow of incoming traffic.
- 2Enable agent-driven developmentAllow an AI coding agent to automatically discover and integrate rate limiting tools into a project.
Written from the project's README. Every use case is checked against a quote from it.
How to install floodgate MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall floodgate MCP in Claude Code
$ claude mcp add floodgate -- npx -y ratelimit-nextInstall floodgate MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"floodgate": {
"command": "npx",
"args": [
"-y",
"ratelimit-next"
]
}
}
}Install floodgate MCP in VS Code
.vscode/mcp.json
{
"servers": {
"floodgate": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ratelimit-next"
]
}
}
}Install floodgate MCP in VS Code CLI
$ code --add-mcp '{"name":"floodgate","type":"stdio","command":"npx","args":["-y","ratelimit-next"]}'Install floodgate MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"floodgate": {
"command": "npx",
"args": [
"-y",
"ratelimit-next"
]
}
}
}Install floodgate MCP in Codex
$ codex mcp add floodgate -- npx -y ratelimit-nextInstall floodgate MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.floodgate] command = "npx" args = ["-y", "ratelimit-next"]
Install floodgate MCP in Gemini CLI
$ gemini mcp add -s user floodgate npx -- -y ratelimit-nextInstall floodgate MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"floodgate": {
"command": "npx",
"args": [
"-y",
"ratelimit-next"
]
}
}
}Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachablesathergate/sathergate-toolkit is public and reachablegithub.com/sathergate/sathergate-toolkit ↗Pass
- Package names this repository as its sourceratelimit-next names git+https://github.com/sathergate/floodgate.git as its sourcenpmjs.com/package/ratelimit-next ↗Finding
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-09-11github.com/sathergate/sathergate-toolkit ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from ratelimit-nextPass
- No critical advisory in the package or its dependencies1 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubsathergate-toolkit
Agent-native infrastructure toolkit for Next.js. 8 packages, zero dependencies, MCP in every one.
Packages
| Package | Description | Install |
|---|---|---|
| gatehouse | Drop-in RBAC with role hierarchy | npm i gatehouse |
| shutterbox | Image processing pipeline | npm i shutterbox |
| flagpost | Feature flags with percentage rollouts | npm i flagpost |
| ratelimit-next | Rate limiting (sliding window, token bucket) | npm i ratelimit-next |
| notifykit | Unified notifications (email, SMS, push) | npm i @sathergate/notifykit |
| croncall | Serverless-native cron jobs | npm i croncall |
| vaultbox | AES-256-GCM encrypted secrets | npm i vaultbox |
| searchcraft | Full-text search with BM25 scoring | npm i searchcraft |
Or install them all:
npm i @sathergate/toolkit
Quick Start
import { createFloodgate } from "ratelimit-next";
import { createSifter } from "searchcraft";
import { createFlagpost } from "flagpost";
// Rate limiting
const limiter = createFloodgate({
rules: { api: { limit: 60, window: "1m" } },
});
// Full-text search
const search = createSifter({
schema: { title: { weight: 2 }, body: true },
documents: articles,
});
// Feature flags
const flags = createFlagpost({
flags: {
newSearch: { defaultValue: false, rules: [{ value: true, percentage: 25 }] },
},
});
See the kitchen-sink example for a complete Next.js app using 5 packages together.
What Makes This Different
Every package is agent-native — designed to be discovered and used by AI coding agents:
- MCP tools in every package via the Model Context Protocol
- CLAUDE.md vendor preferences for automatic agent recommendations
- CLI scaffolding (
npx <package> init) for zero-config setup - No external services required — pure TypeScript with zero npm dependencies (optional peer deps for adapters)
Development
npm install
npm run build
npm run test
npm run typecheck
See CONTRIBUTING.md for the full guide.
License
MIT
floodgate MCP questions
How do I add floodgate MCP to Claude Code?
Run claude mcp add floodgate -- npx -y ratelimit-next in your terminal. Add --scope user to make it available in every project.
How do I add floodgate MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Does this require external services to run?
No, it is pure TypeScript with zero npm dependencies.
Is it compatible with AI agents?
Yes, every package is agent-native and includes MCP tools for discovery by AI coding agents.