codex mcp login fails for Slack official MCP with `Dynamic client registration not supported`
Open 💬 9 comments Opened Mar 2, 2026 by mkanetsuna
What version of Codex CLI is running?
codex-cli 0.105.0-alpha.8
What subscription do you have?
ChatGPT Enterprise
Which model were you using?
gpt-5.3-codex
What platform is your computer?
Darwin 24.2.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iTerm.app (zsh)
What issue are you seeing?
When configuring Slack MCP as the official remote endpoint (https://mcp.slack.com/mcp), codex mcp login slack fails immediately.
Config:
[mcp_servers.slack]
url = "https://mcp.slack.com/mcp"
Command:
codex mcp login slack
Output:
Error: Registration failed: Dynamic registration failed: Registration failed: Dynamic client registration not supported
What steps can reproduce the bug?
- Add this to config.toml:
[mcp_servers.slack]
url = "https://mcp.slack.com/mcp"
- Run:
codex mcp login slack
- Observe the error:
Dynamic client registration not supported
What is the expected behavior?
I expect Codex to let me authenticate against Slack’s official MCP server using Slack app credentials, without requiring Dynamic Client Registration.
Additional information
Slack official MCP docs state DCR is not supported and require pre-registered app identity.
https://docs.slack.dev/ai/slack-mcp-server/
9 Comments
I can reproduce this on the current latest CLI as well, and there is one additional failure mode that may help narrow the bug.
Environment
codex-cli 0.115.0ChatGPT Progpt-5.4macOS 15.6 (24G84)Darwin 24.6.0 arm64iTerm.app,zshObserved behavior
codex mcp login slackstill fails immediately with:codex mcp add slack --url https://mcp.slack.com/mcpis also misleading / partially broken for the same reason. It first adds the server successfully, then auto-detects OAuth, then fails in the same DCR step:So there are really two user-visible problems here:
codex mcp login slackcannot authenticate against Slack's official MCP endpoint.codex mcp add slack --url ...appears to succeed, but then falls into the same unsupported OAuth path and leaves the user in a partially-configuredenabled / Not logged instate.Reproduction steps on 0.115.0
Dynamic client registration not supported.Expected behavior
codex mcp add ...should also avoid leaving the user with a half-configured state after triggering a login flow that cannot succeed.Why this looks like a Codex-side compatibility gap
Potential fix directions
I dug through current
origin/mainplus the currentrmcpOAuth flow, and this still looks like a real unsupported case rather than a config typo.https://mcp.slack.com/mcpdoes not support Dynamic Client Registration and instead requires a registered app with fixedclient_id/client_secretorigin/mainexposesscopes,oauth_resource, andbearer_token_env_varfor streamable HTTP MCP servers, but notclient_id/client_secretinMcpServerConfigcodex mcp loginstill always routes through the genericperform_oauth_login(...)pathrmcpdependency,start_authorization(...)falls back to dynamic client registration unless the provider advertises URL-based client IDs; when no registration endpoint exists it returnsDynamic client registration not supportedSo the narrow claim I can support is: Slack MCP currently hits a real Codex capability gap for providers that require pre-registered confidential OAuth clients.
I put up a small branch that only improves the CLI failure message so it explains the limitation directly instead of surfacing the raw DCR error:
77d4027COPYFILE_DISABLE=1 cargo test -p codex-cli rewrite_oauth_login_errorI can support that narrow UX fix today.
I cannot yet support "Codex already has a way to pass Slack app credentials through
codex mcp login," because I do not see a current config/API surface for that onorigin/main.We did some follow up research into this and have confirmed that the codex client is not sending the newly minted client_id along to the /token endpoint, thus (in our case) the server refuses give a token because it's an "invalid or missing client_id"
We've validated that all other steps are working. (not to mention just about every other agent cli tool that supports rmcp)
Suggested fix: Send client_id to /token endpoints after dynamic client registration.
Wondering if it would make sense to generalize this issue description from focused on Slack to generic support of pre-registered flow (to make it more visible and add some weight), or is it better to create separate issue?
MCP docs (https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#client-registration-approaches) say:
Just in case mentioning claude does trigger anything, they support this just fine - you can pass client_id parameter when registering MCP server.
I took a second pass on current
origin/main, and this now looks narrower than"Slack MCP needs something
rmcpcannot do."Exact results:
rmcp 0.15.0already has a configured-client path viaAuthorizationManager::configure_client(...)pre-registered OAuth clients
oauth_client_idandoauth_client_secret_env_varfor streamable HTTP MCP servers and threadsthem through:
codex mcp loginmcpServer/oauth/loginhttps://github.com/SproutSeeds/codex/tree/scratch/issue-13200-pre-registered-oauth
987ef9cccargo check -p codex-core -p codex-cli -p codex-rmcp-client -p codex-app-servercargo test -p codex-rmcp-client perform_oauth_logincargo test -p codex-core --lib config::types::testscargo test -p codex-core --lib config::edit::testscargo test -p codex-core --lib mcp::skill_dependencies::testscargo test -p codex-core --lib config::schema::tests::config_schema_matches_fixturecargo test -p codex-core streamable_http_with_oauth_round_tripSo the tighter conclusion I can support now is:
#13200is a real Codex capability gap for providers that require apre-registered confidential OAuth client
rmcplacks a configured-client mechanismmechanism on
origin/mainOne caveat: the nearest app-server integration test I tried
(
suite::v2::plugin_install::plugin_install_returns_apps_needing_auth) timedout twice during harness initialization before it reached the OAuth path, so I
would not overclaim app-server positive-path coverage from that test yet.
If this direction looks reasonable, the branch is ready for a closer review.
Hit this same wall today. While we wait for upstream support for pre-registered OAuth clients, there's a working bearer-token workaround that gets Codex talking to
mcp.slack.com:TL;DR: Register your own Slack app, run the OAuth code-exchange manually to mint a user token (
xoxp-…), then configure Codex with--bearer-token-env-var SLACK_MCP_TOKENinstead ofcodex mcp login. Bypasses the DCR step entirely. Slack's hosted MCP server accepts the user token as a bearer once the app has MCP server access enabled.Full step-by-step (including the non-obvious "enable MCP server access on the app" toggle and a cleaned app manifest): https://ianhsiao.me/blog/enabling-slack-mcp-in-codex-and-claude-code-workaround
This works, but the problem with this approach is that you have to renew the token time to time, plus its generally not a best practice to hardocde tokens in plain text in a config file.
This was solved in my case after #22575 was merged and shipped in 0.142.0.
That PR lets you set a pre-registered OAuth client_id for an MCP server. When it's set, Codex skips Dynamic Client Registration and uses that client for the PKCE flow, which is what Slack requires. With no client_id it still falls back to DCR, hence the error here. So first make sure you're on ≥ 0.142.0.
Slack also requires the
redirect_urito match one registered on the Slack app, so the default random loopback port won't work. You need two things.First, the callback overrides. These are top-level keys, so put them at the very top of the config:
Then the server itself, with the pre-registered client_id:
The redirect has to match what's registered on your Slack app, then run codex mcp login slack.
@mzeng-openai (sorry for the ping) One thing I noticed:
oauth.client_idisn't in the public docs, even though oauth_resource, scopes, and both callback keys are. Might be worth adding since it's what makes Slack's MCP work.I hit a related but narrower MCP OAuth compatibility issue with strict registered redirect URIs and opened #30460.
In short, even when
mcp_oauth_callback_urlis configured, Codex currently appends a server-derived callback id to it before sending it asredirect_uri. That means a provider/app registered forhttp://localhost:<port>/callbackseeshttp://localhost:<port>/callback/<callback_id>instead.This is separate from pre-registered client support/DCR, but it affects the same class of hosted MCPs once a static
oauth.client_idis available. I put a small reference branch on #30460 that keeps the current callback-id behavior for generated local redirects, but uses explicitmcp_oauth_callback_urlvalues verbatim.