paperclipai/paperclip · error · ToolGatewayHttpError

mcp_remote_connection_disabled

mcp_remote_connection_disabled

Error message

Connection is disabled.

What it means

Remote MCP connection guard: the tool catalog entry resolved to a connection, but that connection is not enabled or its status is not active, so calls through it are refused with 403 before dispatch. Re-enable the connection (or wait for its health to recover) rather than retrying the tool call.

Solutions

  1. Enable the connection in connection settings before invoking its tools.
Defensive patterns

Strategy: validation

When it happens

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

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-09-18). Data as JSON: /api/errors/8eae9d090229c267. Report an issue: GitHub.

Appendix: source

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

    const [connection] = await db
      .select()
      .from(toolConnections)
      .where(
        and(
          eq(toolConnections.id, entry.connectionId),
          eq(toolConnections.companyId, session.companyId),
        ),
      )
      .limit(1);
    if (!connection || connection.transport !== "mcp_remote") {
      throw new ToolGatewayHttpError(
        404,
        `Tool "${tool.name}" not found`,
        "tool_not_found",
      );
    }
    if (!connection.enabled || connection.status !== "active") {
      throw new ToolGatewayHttpError(
        403,
        "Connection is disabled.",
        "mcp_remote_connection_disabled",
        {
          connectionId: connection.id,
        },
      );
    }
    if (isRailwayEndpoint(connection.config.url) && isRailwayToolBlocked(entry.toolName)) {
      throw new ToolGatewayHttpError(403, "This Railway action cannot bind its effects to an approved target. Use redeploy, restart, or rollback for an existing deployment.", "railway_action_blocked");
    }
    return { entry, connection };
  }

  async function governedToolArguments(
    session: ToolGatewaySession,
    tool: ToolGatewayDescriptor,
    parameters: unknown,

View on GitHub (pinned to 3f1d897a7c)