n8n-io/n8n · error · UserError
MCP server " ": only http(s) URLs are allowed, got
Error message
MCP server "${server.name}": only http(s) URLs are allowed, got "${parsed.protocol}" What it means
Config validation in McpClientManager.validateConfigs: the MCP server's URL parsed successfully but its scheme is not http/https (e.g. file:, ws:, or a bare host interpreted oddly). Only http(s) remotes are supported, and the message names the server and the offending protocol.
Solutions
- Change the MCP server URL to start with http:// or https://
- For local stdio servers, use the stdio transport config instead of a URL
- Check for a missing scheme or copy-paste artifacts in the configured URL
Defensive patterns
Strategy: validation
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.
Appendix: 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)