Prerequisites:
streamable-http
docker run -i --rm
-e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token
-e GITLAB_API_URL="https://gitlab.com/api/v4"
-e GITLAB_READ_ONLY_MODE=true
-e USE_GITLAB_WIKI=true
-e USE_MILESTONE=true
-e USE_PIPELINE=true
-e STREAMABLE_HTTP=true
-p 3333:3002
iwakitakuma/gitlab-mcp
according to MCP specifications 2025-06-18 specs
The server MUST either return Content-Type: text/event-stream in response to this HTTP GET, or else return HTTP 405 Method Not Allowed, indicating that the server does not offer an SSE stream at this endpoint.
When spring ai initializes clients for MCP servers it sends GET /mcp request and expects 405 response from MCP server to continue proper initialization. But because of gitlab-mcp returns 404 spring ai fails on startup.
if (isEventStream(response)) {
logger.debug("Established SSE stream via GET");
return this.eventStream(stream, response);
} else if (isNotAllowed(response)) {
logger.debug("The server does not support SSE streams, using request-response mode.");
return Flux.empty();
} else if (isNotFound(response)) {
if (transportSession.sessionId().isPresent()) {
String sessionIdRepresentation = sessionIdOrPlaceholder(transportSession);
return mcpSessionNotFoundError(sessionIdRepresentation);
} else {
return this.extractError(response, "[missing_session_id]");
}
Expected: gitlab-mcp responds with 405 to GET /mcp when STREAMABLE_HTTP=true
Prerequisites:
streamable-http
docker run -i --rm
-e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token
-e GITLAB_API_URL="https://gitlab.com/api/v4"
-e GITLAB_READ_ONLY_MODE=true
-e USE_GITLAB_WIKI=true
-e USE_MILESTONE=true
-e USE_PIPELINE=true
-e STREAMABLE_HTTP=true
-p 3333:3002
iwakitakuma/gitlab-mcp
according to MCP specifications 2025-06-18 specs
The server MUST either return Content-Type: text/event-stream in response to this HTTP GET, or else return HTTP 405 Method Not Allowed, indicating that the server does not offer an SSE stream at this endpoint.When spring ai initializes clients for MCP servers it sends GET /mcp request and expects 405 response from MCP server to continue proper initialization. But because of gitlab-mcp returns 404 spring ai fails on startup.
Expected: gitlab-mcp responds with 405 to GET /mcp when STREAMABLE_HTTP=true