Skip to content

Use Codex's OAuth client for MCP when the workspace doesn't advertise CIMD - #1338

Open
andy-xu-db wants to merge 1 commit into
mainfrom
andy-xu-db/codex-app-mcp-cimd
Open

andy-xu-db wants to merge 1 commit into
mainfrom
andy-xu-db/codex-app-mcp-cimd

Conversation

@andy-xu-db

@andy-xu-db andy-xu-db commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Codex desktop app shows ug's MCP servers as "Auth unsupported". Codex uses that label for every stdio server, and ug writes the stdio ug mcp-proxy entry. Since #1257, ug writes the native URL + OAuth entry only when the workspace advertises client_id_metadata_document_supported. Workspaces such as eng-ml-inference.staging and dbc-a5d4177a-49dc don't advertise it, even though they accept Codex's published client (https://chatgpt.com/oauth/codex/client.json).

With this change, Codex skips the advertisement check. It still needs the existing oauth_client_available token-endpoint probe to pass, and the service still has to be connection-backed. Claude and Cursor are unchanged, and so are PAT and unknown-client fallbacks, which still use the proxy.

Testing

  • Manual check on macOS against eng-ml-inference.staging: I hand-wrote a URL + OAuth entry with the Codex client and ran codex mcp login. The browser sign-in completed.
  • uv run pytest tests/test_mcp.py tests/test_agent_codex.py tests/test_mcp_oauth.py passes. Cursor keeps its test that requires the advertisement, and Codex gets a new test that skips it.
  • just lint passes. In the full suite, 12 tests fail. 11 of them also fail on unchanged main (test_agents_init required-update, test_e2e_user_agent, test_smart_router). The 12th, one run of test_launcher_flags_control_routing_hook, passed when I reran it on main.

This pull request and its description were written by Isaac.

… CIMD

Codex desktop labels stdio MCP servers "Auth unsupported". Workspaces that
recognize Codex's published client but don't advertise CIMD metadata fell
back to the proxy; use the URL + OAuth entry for Codex whenever the client
probe passes.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant