{"record":{"id":"8eae9d090229c267","repo":"paperclipai/paperclip","slug":"mcp-remote-connection-disabled","errorCode":"mcp_remote_connection_disabled","errorMessage":"Connection is disabled.","messagePattern":"Connection is disabled\\.","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":403,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":4669,"sourceCode":"    const [connection] = await db\n      .select()\n      .from(toolConnections)\n      .where(\n        and(\n          eq(toolConnections.id, entry.connectionId),\n          eq(toolConnections.companyId, session.companyId),\n        ),\n      )\n      .limit(1);\n    if (!connection || connection.transport !== \"mcp_remote\") {\n      throw new ToolGatewayHttpError(\n        404,\n        `Tool \"${tool.name}\" not found`,\n        \"tool_not_found\",\n      );\n    }\n    if (!connection.enabled || connection.status !== \"active\") {\n      throw new ToolGatewayHttpError(\n        403,\n        \"Connection is disabled.\",\n        \"mcp_remote_connection_disabled\",\n        {\n          connectionId: connection.id,\n        },\n      );\n    }\n    if (isRailwayEndpoint(connection.config.url) && isRailwayToolBlocked(entry.toolName)) {\n      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\");\n    }\n    return { entry, connection };\n  }\n\n  async function governedToolArguments(\n    session: ToolGatewaySession,\n    tool: ToolGatewayDescriptor,\n    parameters: unknown,","sourceCodeStart":4651,"sourceCodeEnd":4687,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L4651-L4687","documentation":"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.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:2531 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the connection in connection settings before invoking its tools."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}