Rate-limit MCP requests per principal, not per IP

オープン
#85 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

Start with the rate-limit rule for /github/mcp in vercel.firewall.json and the polling defaults in faucet/events.go, then read docs/security.md for the per-login limits already enforced in process. Trace where the MCP request is authenticated and the superblink-events token's login or service client is resolved, since the new key has to come from there, and check what key the edge firewall can actually rate-limit on. Done means per-principal limiting on /github/mcp, a looser per-IP limit for unauthenticated and login traffic, and the two documented together.

索引モデルが issue の本文から書いたものです。

説明

Problem

The MCP rate limit on /github/mcp is 120 requests a minute per IP (vercel.firewall.json). A Coder deployment sends every user's MCP traffic from one egress IP: polls, renewals and the superblink-events tool calls of every chat. One busy deployment can then get 429 for all of its users, while one heavy user behind their own IP is barely limited.

At the recommended nextPollMs of 5000 (faucet/events.go), 10 poll subscriptions fill the budget. At a 30 s client floor, about 60 do, before any tool call.

Proposal

Key the MCP rate limit on the authenticated principal (the superblink-events token's login or service client) instead of the IP, and keep a looser per-IP limit only for unauthenticated requests and the login endpoints. The per-login limits that superblink-events already enforces in process (5 concurrent polls, 10 waits, docs/security.md) fit this model.

Context

Coder Agents plans to subscribe to superblink-events events for chat automations: webhook delivery on public deployments, poll as the fallback. Many users of one deployment share the egress IP in both modes.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

主要言語
Go
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/faucet のほかの issue

coder/faucet の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。