{"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":2627,"sourceCode":"      summary.staticHeaderNames.push(name);\n    }\n\n    const metadataHeaders = metadataHeadersForSession(input.session, policy);\n    for (const [name, value] of Object.entries(metadataHeaders)) {\n      if (reservedHeaders.has(name)) continue;\n      if (managedCredentialHeaders.has(name)) {\n        summary.collisionRules.push({ header: name, source: \"metadata\", action: \"kept_managed_credential\" });\n        continue;\n      }\n      if (headers[name] !== undefined) {\n        summary.collisionRules.push({ header: name, source: \"metadata\", action: \"overrode_previous_header\" });\n      }\n      headers[name] = value;\n      summary.metadataHeaderNames.push(name);\n    }\n\n    for (const [name, value] of Object.entries(credentialHeaders)) {\n      if (headers[name] !== undefined) {\n        summary.collisionRules.push({ header: name, source: \"credential\", action: \"overrode_previous_header\" });\n      }\n      headers[name] = value;\n    }\n\n    summary.staticHeaderNames.sort();\n    summary.passthroughHeaderNames.sort();\n    summary.droppedPassthroughHeaderNames = [...new Set(summary.droppedPassthroughHeaderNames)].sort();\n    summary.metadataHeaderNames.sort();\n    return { headers, summary };\n  }\n\n  async function markRemoteConnectionHealth(\n    connection: typeof toolConnections.$inferSelect,\n    status: \"ok\" | \"error\" | \"missing_secret\" | \"degraded\",\n    message: string | null,\n  ) {\n    const now = new Date();","sourceCodeStart":2609,"sourceCodeEnd":2645,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/tool-gateway.ts#L2609-L2645","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":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}