n8n-io/n8n · error · UserError
MCP server " ": URL blocked by SSRF policy
Error message
MCP server "${server.name}": URL blocked by SSRF policy - ${result.error.message} What it means
The SSRF validator rejected the MCP server's URL — it resolves to a blocked target such as a private/loopback/link-local address, a non-standard port, or a redirected/dns-rebinding-prone destination. The message embeds the validator's own reason; the throw prevents the instance from fetching internal endpoints via MCP config.
Solutions
- Point the MCP server at a public, routable https endpoint
- If the internal destination is intentional, ask the admin to allowlist it in the SSRF policy configuration
- Check for DNS names that resolve to private IPs; use an address the policy permits
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/@n8n/instance-ai/src/mcp/mcp-client-manager.ts:244 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/1b8f6b1b99cd12db.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/instance-ai/src/mcp/mcp-client-manager.ts:244
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,
requireApproval: boolean,
logger: Logger,
source: string,
): Promise<McpRegularToolsResult> {
const client = new McpClient(
buildNativeMcpConfigs(configs, requireApproval, this.options.onToolCallSettled),
);
this.clientsByKey.set(clientKey, client);View on GitHub (pinned to 5ac6606e81)