paperclipai/paperclip · error · ToolGatewayHttpError

gateway_auth_throttled

gateway_auth_throttled

Error message

MCP gateway authentication was throttled

What it means

Repeated named-gateway authentication failures tripped the authFailures limiter: within the sliding window the token/gateway failure counter reached protocolLimits.authFailures.max, so further attempts are refused with a throttle response carrying retryAfterMs. The audit entry records the original failedReasonCode plus limiter details; legitimate clients must wait out the window and then use a valid token.

Source

Thrown at server/src/services/tool-gateway.ts:3712

    try {
      await request("initialize", {
        protocolVersion: "2024-11-05",
        capabilities: {},
        clientInfo: { name: "paperclip-tool-gateway", version: "0.3.1" },
      });
      child.stdin.write(`${JSON.stringify({ jsonrpc: "2.0", method: "notifications/initialized", params: {} })}\n`);
      return await request(
        input.protocolMethod ?? "tools/call",
        input.protocolParams ?? {
          name: input.entry?.toolName,
          arguments: input.parameters ?? {},
        },
      );
    } finally {
      clearTimeout(timer);
      child.stdin.end();
      child.kill("SIGTERM");
      await exitPromise.catch(() => undefined);
    }
  }

  async function fullyAssignedMcpConnections(session: ToolGatewaySession) {
    if (!session.gatewayProfileId) return [];
    return db
      .select({ connection: toolConnections })
      .from(toolProfileEntries)
      .innerJoin(toolConnections, eq(toolProfileEntries.connectionId, toolConnections.id))
      .where(and(
        eq(toolProfileEntries.companyId, session.companyId),
        eq(toolProfileEntries.profileId, session.gatewayProfileId),
        eq(toolProfileEntries.selectorType, "connection"),
        eq(toolProfileEntries.effect, "include"),
        eq(toolConnections.companyId, session.companyId),
        eq(toolConnections.enabled, true),
        eq(toolConnections.status, "active"),
        inArray(toolConnections.transport, ["mcp_remote", "local_stdio"]),

View on GitHub (pinned to 01ad858492)

Solutions

  1. Authentication attempts were throttled. Stop retrying briefly, verify the token is correct, and retry after the throttle window.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at server/src/services/tool-gateway.ts:3571 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/90fc98a8d74721a8. Report an issue: GitHub.