Error OAuth step when connecting MCP to ChatGPT

I’m setting up a MCP server at ChatGPT

it works flawlessly on Claude, OAuth and tool calls.
So far, it has worked perfectly in ChatGPT playground, however, on ChatGPT itself, it doesn’t work
Here is the error checking the console:

{
    "detail": "MCP server myurl does not support client_secret_post token endpoint auth method"
}

However, this is my /.well-known/oauth-authorization-server implementation:

@auth_router.api_route("/.well-known/oauth-authorization-server", methods=["GET"])
async def well_known():
    return JSONResponse({
        "issuer": BASE_URL,
        "authorization_endpoint": f"{BASE_URL}/authorize",
        "token_endpoint":  f"{BASE_URL}/token",
        "registration_endpoint":  f"{BASE_URL}/register",
        "response_types_supported": ["code"],
        "grant_types_supported": ["authorization_code"],
        "code_challenge_methods_supported": ["S256"],
        "token_endpoint_auth_methods_supported": ["client_secret_basic", "client_secret_post"],
    })

Has anyone faced this issue?

In my case the issue was caused by the behavior of the /oauth2/register endpoint implemented in the django-oauth-toolkit-dcr library.

Specifically, when a DCR request includes any value other than "token_endpoint_auth_method": "none", the library defaults to returning "token_endpoint_auth_method": "client_secret_basic" in the response, even if the client explicitly requested "client_secret_post".

This mismatch triggers the error from OpenAI:

"MCP server <url> does not support client_secret_post token endpoint auth method"

After applying a small patch to ensure the endpoint returns the requested token_endpoint_auth_method, everything worked as expected.

1 Like