Description
When using a self-hosted GitLab instance that returns http:// URLs in API responses (e.g. self links, resource URLs), some operations fail with:
MCP error -32603: Protocol "http:" not supported. Expected "https:"
This happens even when GITLAB_API_URL is set to https://. The issue is that GitLab API responses may contain internal links using http:// (common in self-hosted setups where external_url differs from the actual protocol), and the MCP server's HTTP client rejects them.
Steps to reproduce
- Configure a self-hosted GitLab instance that returns
http:// in API response bodies
- Set
GITLAB_API_URL=https://gitlab.example.com/api/v4
- Call any tool that follows URLs from API responses, e.g.
get_project
Expected behavior
The server should handle http:// URLs from API responses, or at minimum use the protocol from GITLAB_API_URL when constructing follow-up requests.
Actual behavior
Error: MCP error -32603: Protocol "http:" not supported. Expected "https:"
Workaround
Pinning to an older version (@zereight/mcp-gitlab@2.0.25) seem to avoid the issue.
EDIT: Downgrading to v2.0.25 fixed issue mentioned above, but introduces occasional HTTP 500 internal errors
Environment
@zereight/mcp-gitlab@2.0.32 (latest to date via npx)
- Self-hosted GitLab with HTTPS proxy but HTTP internal (dockerized) URLs
- Claude Code CLI
Description
When using a self-hosted GitLab instance that returns
http://URLs in API responses (e.g.selflinks, resource URLs), some operations fail with:MCP error -32603: Protocol "http:" not supported. Expected "https:"
This happens even when
GITLAB_API_URLis set tohttps://. The issue is that GitLab API responses may contain internal links usinghttp://(common in self-hosted setups whereexternal_urldiffers from the actual protocol), and the MCP server's HTTP client rejects them.Steps to reproduce
http://in API response bodiesGITLAB_API_URL=https://gitlab.example.com/api/v4get_projectExpected behavior
The server should handle
http://URLs from API responses, or at minimum use the protocol fromGITLAB_API_URLwhen constructing follow-up requests.Actual behavior
Error: MCP error -32603: Protocol "http:" not supported. Expected "https:"
Workaround
Pinning to an older version (
@zereight/mcp-gitlab@2.0.25) seem to avoid the issue.EDIT: Downgrading to v2.0.25 fixed issue mentioned above, but introduces occasional HTTP 500 internal errors
Environment
@zereight/mcp-gitlab@2.0.32(latest to date via npx)