{"record":{"id":"f036c50096c7abc6","repo":"n8n-io/n8n","slug":"mcp-server-server-name-only-http-s-urls-are","errorCode":null,"errorMessage":"MCP server \"${server.name}\": only http(s) URLs are allowed, got \"${parsed.protocol}\"","messagePattern":"MCP server \"(.+?)\": only http\\(s\\) URLs are allowed, got \"(.+?)\"","errorType":"validation","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/src/mcp/mcp-client-manager.ts","lineNumber":236,"sourceCode":"\t\t\treturn await promise;\n\t\t} finally {\n\t\t\tinFlight.delete(key);\n\t\t}\n\t}\n\n\tprivate async validateConfigs(configs: McpServerConfig[]): Promise<void> {\n\t\tfor (const server of configs) {\n\t\t\tif (!server.url) continue;\n\n\t\t\tlet parsed: URL;\n\t\t\ttry {\n\t\t\t\tparsed = new URL(server.url);\n\t\t\t} catch {\n\t\t\t\tthrow new UserError(`MCP server \"${server.name}\": invalid URL \"${server.url}\"`);\n\t\t\t}\n\n\t\t\tif (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n\t\t\t\tthrow new UserError(\n\t\t\t\t\t`MCP server \"${server.name}\": only http(s) URLs are allowed, got \"${parsed.protocol}\"`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (this.ssrfValidator) {\n\t\t\t\tconst result = await this.ssrfValidator.validateUrl(server.url);\n\t\t\t\tif (!result.ok) {\n\t\t\t\t\tthrow new UserError(\n\t\t\t\t\t\t`MCP server \"${server.name}\": URL blocked by SSRF policy - ${result.error.message}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async connectAndListTools(\n\t\tconfigs: McpServerConfig[],\n\t\tclientKey: string,","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/src/mcp/mcp-client-manager.ts#L218-L254","documentation":"Error \"MCP server \"${server.name}\": only http(s) URLs are allowed, got \"${parsed.protocol}\"\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/instance-ai/src/mcp/mcp-client-manager.ts:236 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}