Supabase MCP repeatedly requires reauthentication: OAuth token refresh failed during initialize
What version of Codex CLI is running?
codex-cli 0.111.0
What subscription do you have?
Unknown
Which model were you using?
Unknown
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
What issue are you seeing?
My Supabase MCP integration seems to require reauthentication repeatedly.
After previously authenticating Supabase MCP, Codex sometimes starts with this error instead of refreshing the existing auth session:
⚠ MCP client for `supabase` failed to start: MCP startup failed: handshaking with MCP server
failed: Send message error Transport
[rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttp
ClientWorker<rmcp::transport::auth::AuthClient<reqwest::async_impl::client::Client>>>] error:
Auth error: OAuth token refresh failed: Failed to parse server response, when send initialize
request
⚠ MCP startup incomplete (failed: supabase)
The practical result is that I have to authenticate Supabase again and again, even though the expected behavior seems to be token refresh or stable session reuse.
What steps can reproduce the bug?
- Configure the Supabase MCP server in Codex CLI and authenticate it successfully.
- Use Codex normally for some time, or return in a later session after the auth/token has aged.
- Start Codex again.
- Observe that Supabase MCP sometimes fails during startup with the refresh/initialize error above.
- Reauthenticate Supabase MCP to get it working again, until the cycle repeats.
I have not pinned down a minimal deterministic repro beyond the repeated pattern above.
What is the expected behavior?
If the stored auth session is still refreshable, Codex should refresh it successfully and start the Supabase MCP server without manual intervention.
If the auth session is invalid, Codex should report that clearly rather than failing during MCP initialize with a parse error.
Additional information
This looks related to the broader MCP OAuth / handshake issues that have been reported before, but I could not find an existing issue with this exact Supabase error string.
Potentially related reports:
- #5254
- #6020
- #6572
- #9535
- #11297
The key detail here is the combination of:
- Supabase MCP
- repeated reauthentication requirement
OAuth token refresh failedFailed to parse server response- failure while sending the MCP
initializerequest
If maintainers want, I can provide more environment details or try with additional logging enabled.
11 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reviewed the bot suggestions and I don't think either is a true duplicate:
streamable_httpinitialize/response-decoding issue using a PAT, and it was closed in favor of #11284 (Cannot initialize Streamable HTTP MCP servers). That looks like a broader transport compatibility problem, but not specifically an OAuth refresh / repeated reauthentication failure.This issue is specifically about Supabase MCP auth refresh failing during startup:
Auth error: OAuth token refresh failed: Failed to parse server response, when send initialize requestThe distinctive behavior here is that Supabase appears to require repeated manual reauthentication instead of refreshing the stored auth session.
So there may be some shared initialize/handshake surface area, but I don't think this should be closed as a duplicate of either suggested issue.
Additional data point: I previously contacted Supabase support about this, and they indicated they believe this is on the Codex side rather than the Supabase side.
They specifically pointed me to #6020 as a related Codex MCP startup/handshake issue affecting other MCP servers as well.
I still don't think this issue is a strict duplicate of #6020, because the observable failure here is specifically:
Auth error: OAuth token refresh failed: Failed to parse server response, when send initialize requestand the user-facing behavior is repeated manual reauthentication for Supabase.
But this does seem like more evidence that the root cause may live in the Codex MCP client / rmcp auth+initialize path rather than in Supabase alone.
Faced the issue today where:
Compared to other tools like Claude Code, the experience is really not great. Codex should trigger opening the auth page if the token needs to be refreshed.
codex mcp login supabasesolve the problem to me.I am running below command every other day to authenticate with supabase. But, on claude code i connected like a 2 months back and its still working. Wondering how to make the connection work without breaking.
codex mcp login supabaseID 019e0e56-91e1-7932-ab6c-2953ce75cee6
Also running into this issue
This issue affects me and I use both Codex and Claude. I often have to restart Codex after manual reauthentication which is a real time waster. Claude does not suffer this issue.
Any update on this issue? The MCP Server connection is buggy. Sometimes it works if explicitly asked. But if Codex gives me a plan with Supabase as a consideration, it should run the Migration file that was created.
Still having this same issue with multiple OAuth MCP servers, not just Supabase.
Codex is simply not handling OAuth refresh properly. Seems pretty clear from all of the related reports.
some issue