Rate Limiter State Calculator

Rate Limiter State Calculator MCP Connector for Claude

A+

Deterministic engine for evaluating Token Bucket, Leaky Bucket, and sliding window rate limiting states.

3 tools Official Updated Oct 1, 2026 Official Vinkius Partner

This MCP server provides a deterministic engine for evaluating the current state of various rate-limiting algorithms. It allows AI agents to decide if API calls should be permitted, queued, or dropped based on mathematical models. Use calculate_token_bucket_state to check token availability and burst headroom, calculate_leaky_bucket_state to evaluate queue depth and overflow, and calculate_distributed_and_window_metrics to manage global limits and 60-second sliding window compliance.

rate-limitingtoken-bucketleaky-bucketapi-controldeterministic

3 tools expose this connector's capabilities to your AI agent.

calculate_distributed_and_window_metrics

Provides high-level oversight of globalThis limits and temporal request density

calculate_leaky_bucket_state

Evaluates the current congestion and overflow status of a Leaky Bucket

calculate_token_bucket_state

Determines if a specific request can be fulfilled based on the Token Bucket algorithm and calculates the wait time if denied

See how to talk to your AI agent using Rate Limiter State Calculator.

Check if I have enough tokens for a request that costs 5 tokens, given a rate limit of 2 per second, a burst capacity of 10, 8 current tokens, and the last refill was 1 second ago.

Yes, you have enough tokens. After the refill, you have 10 tokens available, which covers the cost of 5.

What is the current queue depth if the leaky bucket has a capacity of 10, a drain rate of 1 per second, and 5 requests just arrived while the queue was already at 7?

The current queue depth is 10, and 2 requests were dropped due to overflow.

Calculate the per-agent share for a global limit of 100 requests per second shared by 5 agents.

Each agent is allocated a share of 20 requests per second.

The `calculate_token_bucket_state` tool calculates available tokens by adding the refill rate multiplied by elapsed time to the current token count, capped by the burst capacity.