How do I configure self-signed certificates or a custom CA for gitlab-mcp?
gitlab-mcp (zereight/gitlab-mcp) has no documentation for configuring self-signed certificates or custom Certificate Authorities. The thread discusses whether the CA certificate should be provided via the GITLAB_CA_CERT_PATH environment variable rather than NODE_EXTRA_CA_CERTS, and whether a reverse proxy should handle TLS. What is the correct way to set this up?
Originally asked on GitHub: https://github.com/zereight/gitlab-mcp/issues/187
4 answers
The issue is closed as completed, but the thread itself does not confirm what was changed or that the documentation was updated. No version number is mentioned.
Two approaches were discussed:
-
Reverse proxy for TLS (Docker + SSE). A contributor suggested running gitlab-mcp as a Docker container and placing a Caddy reverse proxy in front of it when using the SSE transport. Their reasoning was that SSL/TLS handling does not need to be a module inside the MCP server, and a proxy is the simplest way to expose the server over HTTPS.
-
GITLAB_CA_CERT_PATH instead of NODE_EXTRA_CA_CERTS. Another commenter (not a maintainer) asked the issue author to confirm that the real problem was missing documentation: a previous change (PR #72) should have documented that the CA certificate is supplied through the GITLAB_CA_CERT_PATH environment variable rather than the common Node.js NODE_EXTRA_CA_CERTS variable. The author did not confirm this in the thread, so treat it as an unconfirmed suggestion, not a verified fix.
As general advice: if you need to trust a custom CA, try setting GITLAB_CA_CERT_PATH to the path of your CA certificate file in the environment where the server runs; if you need HTTPS between clients and the server, use a reverse proxy such as Caddy. Since neither approach is confirmed here, check the project's current documentation for the exact configuration.
Did this work for you?-
What a GitHub user tried on GitHub (Outcome unclear)
Reported that gitlab-mcp lacks documentation for self-signed certificates and custom Certificate Authorities, making setup difficult in environments with custom CAs.
Source: https://github.com/zereight/gitlab-mcp/issues/187 (opens external site)
Did this work for you?What @iwakitakuma33 tried on GitHub (Outcome unclear)
Suggested running gitlab-mcp as a Docker container with SSE behind a Caddy reverse proxy to handle SSL/TLS, arguing that SSL support does not need to be built into the MCP server.
Source: https://github.com/zereight/gitlab-mcp/issues/187#issuecomment-3146420345 (opens external site)
Did this work for you?What @jadtmcc tried on GitHub (Outcome unclear)
Asked the issue author to confirm that the CA certificate should be provided via the GITLAB_CA_CERT_PATH environment variable rather than NODE_EXTRA_CA_CERTS, referencing PR #72.
Source: https://github.com/zereight/gitlab-mcp/issues/187#issuecomment-3162923389 (opens external site)
Did this work for you?
Related questions
- How do I enable pipeline tools in gitlab-mcp (@zereight/mcp-gitlab)?
- GitLab MCP tools skipped: 'missing types in its parameter schema' in Qwen Code / Gemini CLI
- GitLab MCP clients reject tools: inputSchema is {} (invalid_literal at inputSchema.type)
- How do I get an MR's milestone in gitlab-mcp when it says 'No milestone assigned'?
- gitlab-mcp 2.1.23 crashes at startup: express-rate-limit does not provide ipKeyGenerator