Sponsor MCPSafe10 founding slots
Rate Limits

Rate Limits

Understand API rate limits and how to handle them in your integrations.

Rate Limit Tiers

Anonymous

No API key required
API Requests: 30 requests/minute
Scans: 5 scans/hour
Public server listing
Basic scan results

Free (Authenticated)

Free account with API key — all features included
API Requests: 120 requests/minute
Scans: 20 scans/hour
Full API access
Vulnerability details
Scan history
Webhooks
CI/CD integration

Rate Limit Headers

Every API response includes headers to help you track your rate limit usage.

X-RateLimit-Limit

Maximum requests allowed in the current window

Example: 60

X-RateLimit-Remaining

Requests remaining in the current window

Example: 45

X-RateLimit-Reset

Unix timestamp when the rate limit resets

Example: 1705312800

Retry-After

Seconds to wait before retrying (only on 429 responses)

Example: 30

Handling Rate Limits

429 Too Many Requests

When you exceed the rate limit, you'll receive a 429 response.

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please try again later.",
    "retryAfter": 30
  }
}

Best Practices

Implement Exponential Backoff

When you receive a 429, wait the specified time before retrying. Double the wait time for each consecutive failure.

Monitor Rate Limit Headers

Check X-RateLimit-Remaining before making requests to avoid hitting the limit.

Cache Responses

Cache server data locally to reduce API calls. Server information doesn't change frequently.

Use Webhooks for Scans

Instead of polling for scan results, use webhooks to receive notifications when scans complete.

Example: Retry Logic

JavaScript
async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, options);

    if (response.status === 429) {
      const retryAfter = response.headers.get('Retry-After') || 30;
      const waitTime = parseInt(retryAfter) * 1000 * Math.pow(2, i);
      console.log(`Rate limited. Waiting ${waitTime}ms...`);
      await new Promise(resolve => setTimeout(resolve, waitTime));
      continue;
    }

    return response;
  }

  throw new Error('Max retries exceeded');
}

MCPSafe is 100% Free

All features are available at no cost. Create a free account to get higher rate limits and full API access.

Create Account