stacklok / stacklok/toolhive

[Deferred] Rate limit prompts/get and resources/read

Open
#4,554 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api enhancement go kubernetes operator
Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

User Story

As a cluster admin,
I want to rate limit prompts/get and resources/read in addition to tools/call,
so that all substantive MCP operations are protected.

Context

Deferred — not part of the initial implementation. Created for visibility.

See THV-0057: Rate Limiting for MCP Servers for full design details.

Acceptance Criteria

  • Per-user and global limits on prompts/get and resources/read
  • Per-prompt and per-resource operation limits via rateLimiting.prompts[] and rateLimiting.resources[]
  • Same config pattern as tools
  • Redis key patterns: thv:rl:{namespace}:{server}:...:prompt:{promptName} and ...:resource:{resourceName}

Dependencies

  • STORY-001, STORY-002 (core rate limit infrastructure)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked THV-0057 rate-limiting RFC, then trace the core rate-limit infrastructure from STORY-001 and STORY-002 and the existing tools configuration. Confirm how prompts/get and resources/read should mirror tools, including the specified Redis key patterns; done means all listed per-user, global, prompt, and resource limits are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, redis
Domain
backend-api-design, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.