Transport · troubleshooting record
Remote MCP connection fails with a TLS certificate error
The HTTPS handshake failed before any MCP message was exchanged. Causes include an expired certificate, an incomplete chain, a hostname mismatch, a corporate interception proxy, or a client that does not trust a private CA.
Symptoms
- Client reports certificate has expired, self-signed certificate, or unable to verify the first certificate.
- The endpoint works in one machine's browser but not from the client process.
- A corporate proxy presents a certificate the runtime does not trust.
Confirmed causes
These causes have a documented basis. They may not be the cause of your specific failure.
The server certificate is expired or issued for a different hostname
TLS verification checks validity dates and subject alternative names.
The client runtime does not trust the corporate or private CA
Node.js and Python use their own trust stores by default and may not use the OS store.
The server sends an incomplete certificate chain
A missing intermediate certificate breaks verification on clients that do not fetch it.
Possible causes
- A development endpoint uses a self-signed certificate.
- The clock on the client machine is wrong.
- A proxy terminates TLS and re-signs traffic.
What still needs verification
- The certificate issuer, hostname, and expiry date.
- Whether the chain is complete from the server.
- The trust store used by the client's runtime.
Affected environments
Fixes
Fix the certificate or trust chain
- Renew an expired certificate and include the full chain.
- Use a hostname that matches the certificate.
- Install the required CA in the client runtime's trust store only if it is legitimately trusted.
Avoid insecure shortcuts
- Do not disable TLS verification globally.
- Use a local reverse proxy with a trusted certificate for development if needed.
- Correct the system clock if certificate validity fails unexpectedly.
Verify the fix
- The TLS handshake succeeds from the client host.
- The certificate chain and hostname validate.
- The MCP initialization completes over HTTPS.
Paste the configuration into the Config Doctor. It runs in your browser, never uploads the file, and can show structural issues and safe fixes.
Why we believe this
- nodejs.org/api/tls.htmlOfficial documentation · checked Oct 23, 2026 · documented
Node.js TLS documentation describes certificate verification and trust behavior.