Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Tool-level rate limiting per role

Aperta
#983 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
redis, typescript
Ambito
api, backend

Direzione di ricerca

Start in packages/backend/src/mcp-server/mcp-endpoint.controller.ts, where planToolSet builds the handler each tool is registered with, and find the existing role tool whitelist model to see where a per-role, per-tool limit would be stored. The issue leaves the storage shape and the Redis versus in-process counting design open, so agree that with maintainers first. Done means an over-limit call returns a readable MCP error with the limit and retry time, and the in-process path documents that it is not shared across replicas.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

help wanted roadmap

An MCP role can already be restricted to a set of tools. It cannot yet be restricted in how often it calls them, which matters most for the two cases where a runaway agent is expensive: metered upstream APIs, and database connectors.

Scope

  • Per-role, per-tool limit (calls per minute / per hour), stored alongside the existing role tool whitelist.
  • Enforced in the MCP tool handler, before the upstream call.
  • Over-limit returns a proper MCP error the agent can read ("rate limit for this tool: N/min, retry in Xs"), not a generic failure.
  • Counted in Redis when REDIS_URL is set, in-process otherwise, and the in-process path must be honest about not being shared across replicas.

Where to look

  • packages/backend/src/mcp-server/mcp-endpoint.controller.ts — planToolSet builds the handler each tool is registered with.
  • The role/tool-whitelist model for where the limit belongs.
Lingua principale
TypeScript
Stelle
856
Fork
82
Merge medio
8h 27m
PR unite (30g)
104

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HelpCode-ai/anythingmcp

Tutte le issue di HelpCode-ai/anythingmcp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.