Back to Browse

Retrykit MCP Server

Developer ToolsModerate6.6MCP RegistryLocal
Free

Server data from the Official MCP Registry

AI/LLM retry diagnostics, SDK double-retry audit, and fault evaluation MCP server.

About

AI/LLM retry diagnostics, SDK double-retry audit, and fault evaluation MCP server.

Security Report

6.6
Moderate6.6Moderate Risk

retrykit is a zero-dependency TypeScript retry/rate-limit library with an embedded stdio MCP server and CLI; the visible code shows no exfiltration, shell execution, or hardcoded secrets, and its permissions (filesystem reads of the workspace, stdio, env-based API keys) match its developer-tools purpose. Minor concerns are limited to the CLI's workspace file writes via init and the truncated engine.ts being unreviewed, so no significant findings lower the score. Supply chain analysis found 1 known vulnerability in dependencies (1 critical, 0 high severity). Package verification found 1 issue.

10 files analyzed · 6 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

process_spawn

Check that this permission is expected for this type of plugin.

system_info

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "retrykit": {
      "command": "npx",
      "args": [
        "-y",
        "@rohan9024/retrykit@2.1.2"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

@rohan9024/retrykit v3.0.0

The reliability and quota engine for production AI applications: prevent retry storms, coordinate provider limits, and recover streams safely—with zero runtime dependencies.

Quick start

npm i @rohan9024/retrykit
# Node.js >=22 is required
import OpenAI from 'openai';
import { wrapOpenAI } from '@rohan9024/retrykit/auto';

const client = wrapOpenAI(new OpenAI({ apiKey: process.env.OPENAI_API_KEY, maxRetries: 0 }));
const result = await client.chat.completions.create({ model: 'gpt-4o-mini', messages: [{ role: 'user', content: 'Hello' }] });

Vibe-coder prompt

Install @rohan9024/retrykit, inspect existing provider retry behavior, use @rohan9024/retrykit/auto or a focused subpath, set nested SDK retries to 0, and run the project checks. Never use the unscoped retrykit package.

Install the coding-agent skill separately:

npx skills add rohan9024/retrykit --skill retrykit

Modules

ImportPurpose
@rohan9024/retrykitCurated root API
/coreRetry, backoff, providers, circuit breaker, coordinator
/autoNested client proxy and environment key discovery
/fetchAbort-aware HTTP retries and idempotency policies
/streamCheckpoint-safe stream recovery
/compactionTool-call-safe context compaction
/budgetRetry and cost budget primitives
/validateStructural Standard Schema validation retries
/mcpExplicitly idempotent MCP retries
/ai-sdkStructural Vercel AI SDK middleware
/otelZero-dependency, secret-scrubbed GenAI span hooks
/stores/upstashEdge-safe Upstash REST state store
/testingDeterministic Fault Lab utilities
/clientCoordinated fetch, retry, circuit, budget, and stream client

Reliability rules

  • Retry only safe or explicitly idempotent operations.
  • A stream is resumable only when getCheckpoint is supplied.
  • Set SDK retries to 0 when RetryKit owns the policy.
  • Built-in coordination state is process-local.
  • Pricing and token estimates are estimates unless based on actual provider usage.
  • POST and PATCH retries require an idempotency key or explicit replay approval.
  • Unclassified errors are not retried by default.

Honest comparison

RetryKit focuses on AI-provider concerns—rate-limit headers, key pools, stream checkpoints, budgets, and agent-friendly subpaths. p-retry, async-retry, and cockatiel remain good generic promise-retry choices; Axios Retry and Opossum target HTTP and circuit breaking. Provider SDKs and AI frameworks may overlap, so avoid stacking policies.

Development

npm run typecheck
npm test
npm run build

CLI and migration

Use npx @rohan9024/retrykit doctor --json to audit SDK retry settings, npx @rohan9024/retrykit eval to run deterministic Fault Lab scenarios, npx @rohan9024/retrykit init --dry-run to preview setup, and npx @rohan9024/retrykit mcp for the stdio MCP server.

Migrating from p-retry: use retry() for promise operations, createRetryFetch() for HTTP, and the provider-aware policy when rate-limit headers, billing classification, stream checkpoints, or replay safety matter. Keep p-retry for generic non-AI work that does not need these guarantees.

CI / PR Audit Action

- uses: rohan9024/retrykit@v2
  with:
    fail-on-error: 'true'
    sarif-file: retrykit-doctor.sarif

The action writes a SARIF report and prints JSON findings. It fails only for error-severity findings when fail-on-error is enabled.

Fault Lab

Try the static Fault Lab at https://rohan9024.github.io/retrykit/ for deterministic demonstrations of retry storms, stream interruptions, and tool-call safety.

Reproducible benchmark simulation

Run node benchmarks/storm-benchmark.mjs for the deterministic 50-caller Fault Lab simulation. The current measured policy table is:

StrategyRequests FiredWasted Quota RetriesStream DuplicatesCompaction Crashes
Naive SDK + generic 3x loop1501005050
Naive while retry20015010050
RetryKit v2.1 policy100000

These are deterministic simulation counts, not provider-latency or download claims.

MIT licensed.

Reviews

No reviews yet

Be the first to review this server!