n8n-io/n8n · error · UserError
MCP server "${server.name}": only http(s) URLs are allowed,
Error message
MCP server "${server.name}": only http(s) URLs are allowed, got "${parsed.protocol}" What it means
Error "MCP server "${server.name}": only http(s) URLs are allowed, got "${parsed.protocol}"" thrown in n8n-io/n8n.
Source
Thrown at packages/@n8n/instance-ai/src/mcp/mcp-client-manager.ts:236
return await promise;
} finally {
inFlight.delete(key);
}
}
private async validateConfigs(configs: McpServerConfig[]): Promise<void> {
for (const server of configs) {
if (!server.url) continue;
let parsed: URL;
try {
parsed = new URL(server.url);
} catch {
throw new UserError(`MCP server "${server.name}": invalid URL "${server.url}"`);
}
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
throw new UserError(
`MCP server "${server.name}": only http(s) URLs are allowed, got "${parsed.protocol}"`,
);
}
if (this.ssrfValidator) {
const result = await this.ssrfValidator.validateUrl(server.url);
if (!result.ok) {
throw new UserError(
`MCP server "${server.name}": URL blocked by SSRF policy - ${result.error.message}`,
);
}
}
}
}
private async connectAndListTools(
configs: McpServerConfig[],
clientKey: string,View on GitHub (pinned to 5ac6606e81)
When it happens
Trigger: Thrown at packages/@n8n/instance-ai/src/mcp/mcp-client-manager.ts:236 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/f036c50096c7abc6.
Report an issue: GitHub.