-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Problem:
The n8n-mcp package cannot connect to n8n instances that use custom Certificate Authority (CA) certificates, even when NODE_TLS_REJECT_UNAUTHORIZED=0 is set in the environment configuration.
Environment:
- OS: macOS
- n8n instance: Self-hosted with custom CA certificate
- MCP setup: Claude Code VS Code extension with n8n-mcp server
Error:
- Health check fails with "No response from n8n server"
- Direct Node.js testing reveals SELF_SIGNED_CERT_IN_CHAIN error
- curl works fine (uses system certificate store)
Root Cause:
Node.js doesn't trust custom CA certificates by default, unlike curl which uses the system certificate store (/etc/ssl/cert.pem on macOS).
Working Solution:
Add NODE_EXTRA_CA_CERTS environment variable pointing to the custom CA certificate:
{
"env": {
"N8N_API_URL": "https://your-n8n-instance.com",
"N8N_API_KEY": "your-api-key",
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
"NODE_EXTRA_CA_CERTS": "/path/to/custom-ca.pem"
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels