MCP auth repeatedly resets when multiple server entries use the same hosted Linear URL
What issue are you seeing?
I am seeing repeated auth failures with Linear MCP in both Codex App and Codex CLI.
I have three Linear MCP server entries:
linear— global/default, for my personal Linear teamlinear_tce— project-specificlinear_tcetest— project-specific
In the TCE project config I disable the global linear entry, so Codex should only use linear_tce and linear_tcetest for that project.
This worked fine until a few days ago. Since then, Codex repeatedly hits auth issues and I have to log in again to all three Linear MCP entries several times per day.
One detail that may matter: all three entries point at the same hosted Linear MCP URL:
https://mcp.linear.app/mcp
They only differ by Codex MCP server name. Could the auth/session cache be keyed by the MCP URL rather than by the Codex server name?
What steps can reproduce the bug?
- Configure a global Linear MCP server named
linearwith URLhttps://mcp.linear.app/mcp. - In a project-level Codex config, disable
linear. - In that same project config, add two Linear MCP servers named
linear_tceandlinear_tcetest, both using URLhttps://mcp.linear.app/mcp. - Authenticate each Linear MCP entry.
- Use Codex App and Codex CLI across the global workspace and the project workspace.
- After some time, observe that Codex starts reporting auth issues and requires logging in again to all three MCP entries.
The issue is intermittent, but currently happens several times per day.
What is the expected behavior?
Each MCP server entry should keep its own auth state, even when multiple entries use the same hosted MCP URL.
Disabling the global linear entry in a project config should not disturb auth for linear_tce or linear_tcetest, and auth should not reset several times per day.
Additional information
Versions:
- Codex App: 26.602.40724
- Codex CLI: v0.137.0
- macOS: 26.0.1 (25A362)
Relevant config shape:
Global ~/.codex/config.toml:
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
Project .codex/config.toml:
[mcp_servers.linear]
enabled = false
[mcp_servers.linear_tce]
url = "https://mcp.linear.app/mcp"
[mcp_servers.linear_tcetest]
url = "https://mcp.linear.app/mcp"
Project agent instructions also tell agents to use linear_tce for TCE-* issues and linear_tcetest for TCETEST-* issues, never the global linear MCP.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Update: I think I have a workable setup for my use case, in case it helps anyone.
The goal was to use different Linear workspaces from the same machine, with different Codex projects using different Linear MCP identities.
The approach that seems to work is to avoid the Linear MCP OAuth flow for these project-specific entries and use per-workspace Linear API keys via
bearer_token_env_var.Global
~/.codex/config.toml:Project
.codex/config.toml:Then I added the env vars to
~/.zshenv:This does not prove the OAuth/session bug is fixed, but it gives a cleaner workaround for multi-workspace Linear MCP usage: