Rate-limit MCP requests per principal, not per IP

Aberta
#85 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
32/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Go
Estrelas
1
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de coder/faucet

Todas as issues de coder/faucet

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.