What version of the Codex App are you using (From “About Codex” dialog)?
0.46.0
What subscription do you have?
Enterprise
What platform is your computer?
Darwin 25.2.0 arm64 arm
What issue are you seeing?
Codex cannot complete MCP initialization against GitLab MCP, even though authentication succeeds and the GitLab MCP server is reachable outside Codex.
With direct GitLab MCP config:
experimental_use_rmcp_client = true
[mcp_servers.GitLab]
url = "https://gitlab.com/api/v4/mcp"
OAuth login succeeds:
Successfully logged in to MCP server 'GitLab'.
But MCP access fails during initialize:
failed to get client: MCP startup failed: handshaking with MCP server failed:
Send message error ... error decoding response body, when send initialize request
With a stdio bridge using mcp-remote, Codex still fails during initialize:
failed to get client: MCP startup failed: handshaking with MCP server failed:
connection closed: initialize response
In the same environment, GitLab MCP itself is reachable outside Codex and returns a valid initialize response.
What steps can reproduce the bug?
- Use Codex CLI 0.46.0 on macOS.
- Configure GitLab MCP with:
experimental_use_rmcp_client = true
[mcp_servers.GitLab]
url = "https://gitlab.com/api/v4/mcp"
- Run:
- Complete the OAuth flow successfully.
- Attempt to use the GitLab MCP server from Codex, for example via MCP resource listing.
Observed result:
failed to get client: MCP startup failed: handshaking with MCP server failed:
Send message error ... error decoding response body, when send initialize request
Additional reproduction:
- Replace direct transport with a stdio bridge using mcp-remote.
- Restart Codex.
- Retry the same MCP access.
Observed result:
failed to get client: MCP startup failed: handshaking with MCP server failed:
connection closed: initialize response
Control test outside Codex:
- A reference client can connect successfully to the same GitLab MCP endpoint after OAuth.
- A direct initialize round-trip against GitLab MCP returns:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-03-26",
"capabilities": {
"tools": {
"listChanged": false
}
},
"serverInfo": {
"name": "Official GitLab MCP Server",
"version": "18.11.0-pre"
}
}
}
PII/confidential details redacted:
- repo/group names omitted
- tokens omitted
- local usernames/paths omitted
Session id / token usage / context window:
What is the expected behavior?
f GitLab MCP is configured and authenticated successfully, Codex should be able to initialize the MCP server and use its tools/resources without failing during initialize.
Additional information
GitLab-side requirements were enabled before testing:
- GitLab Duo Core
- experiment / beta features at the top-level group
This appears to be a Codex MCP client/runtime compatibility issue rather than a GitLab entitlement or OAuth issue, because:
- OAuth succeeds
- the GitLab MCP server is reachable outside Codex
- Codex fails specifically during MCP initialize / transport handling
What version of the Codex App are you using (From “About Codex” dialog)?
0.46.0
What subscription do you have?
Enterprise
What platform is your computer?
Darwin 25.2.0 arm64 arm
What issue are you seeing?
Codex cannot complete MCP initialization against GitLab MCP, even though authentication succeeds and the GitLab MCP server is reachable outside Codex.
With direct GitLab MCP config:
OAuth login succeeds:
But MCP access fails during initialize:
With a stdio bridge using mcp-remote, Codex still fails during initialize:
In the same environment, GitLab MCP itself is reachable outside Codex and returns a valid initialize response.
What steps can reproduce the bug?
Observed result:
Additional reproduction:
Observed result:
Control test outside Codex:
{ "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2025-03-26", "capabilities": { "tools": { "listChanged": false } }, "serverInfo": { "name": "Official GitLab MCP Server", "version": "18.11.0-pre" } } }PII/confidential details redacted:
Session id / token usage / context window:
What is the expected behavior?
f GitLab MCP is configured and authenticated successfully, Codex should be able to initialize the MCP server and use its tools/resources without failing during
initialize.Additional information
GitLab-side requirements were enabled before testing:
This appears to be a Codex MCP client/runtime compatibility issue rather than a GitLab entitlement or OAuth issue, because: