paperclipai/paperclip · error · ToolGatewayHttpError
mcp_remote_status
mcp_remote_status
Error message
Remote MCP server returned an HTTP error
What it means
Remote MCP forwarding: the upstream server answered tools/call with a non-2xx HTTP status. The connection health is marked error and a 502 mcp_remote_status wraps the upstream status, request id, and execution details — the failure originates in the remote server, not the gateway or the agent's request shape.
Source
Thrown at server/src/services/tool-gateway.ts:3106
payload,
});
}
async function createStandingDelegationInteraction(
session: ToolGatewaySession,
connection: typeof toolConnections.$inferSelect,
userId: string,
) {
if (!session.issueId || !session.agentId || !session.runId) return;
const [company] = await db.select({ issuePrefix: companies.issuePrefix }).from(companies)
.where(eq(companies.id, session.companyId)).limit(1);
const href = `/${company?.issuePrefix ?? ""}/apps/${connection.id}/setup`;
const idempotencyKey = `connection-delegation:${connection.id}:${userId}:${session.agentId}`;
const payload = {
version: 1 as const,
prompt: `Allow this agent to use your ${connection.name} account for autonomous runs`,
acceptLabel: "Review delegation",
rejectLabel: "Not now",
detailsMarkdown: "This autonomous run is paused. Paperclip will not use your personal identity until you explicitly delegate it to this named agent.",
target: {
type: "custom" as const,
key: `connection:${connection.uid}:delegation:${userId}:${session.agentId}`,
revisionId: connection.updatedAt.toISOString(),
label: `Delegate ${connection.name}`,
href,
},
};
const [existing] = await db.select({ id: issueThreadInteractions.id }).from(issueThreadInteractions).where(and(
eq(issueThreadInteractions.companyId, session.companyId),
eq(issueThreadInteractions.issueId, session.issueId),
eq(issueThreadInteractions.idempotencyKey, idempotencyKey),
)).limit(1);
if (existing) {
await db.update(issueThreadInteractions).set({
status: "pending",
continuationPolicy: "wake_assignee",View on GitHub (pinned to 5716fe907e)
Solutions
- The remote MCP server returned an HTTP error. Check the server URL, credentials, and remote server health, then retry.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/src/services/tool-gateway.ts:3106 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-08-18).
Data as JSON: /api/errors/405a34a5e2d5db12.
Report an issue: GitHub.