Hello everyone,
I’m currently testing the mixed authentication mode of ChatGPT App, where some tools don’t require OAuth, but others do. I’ve followed the implementation guidelines, but I noticed that when I add the app for testing and select Mixed as the authentication mode, the authentication UI is triggered immediately.
Is this the expected behavior? I was under the impression that the OAuth UI would only appear when a user attempts to use a tool configured with an OAuth2 securityScheme.
Any clarification would be appreciated.
I noticed the same thing. Just select None (No Auth) and it will work just fine.
Thanks for the insight. Have you been able to finish the authentication and tool calling? I find in this mode, there isn’t auth token attached in the request header.
Yes it works. The trick is in the meta data. Let me check my code.
For unauthenticated tool calls, use the “nouath” value in your securitySchemes array when defining the Tool.
securitySchemes = [
{
"type": "noauth",
"scopes": []
},
],
For authenicated calls
securitySchemes = [
{
"type": "oauth2",
"scopes": []
},
],
Once you are inside the tool call method, you can get the bearer token like this:
request_context = mcp._mcp_server.request_context
request = getattr(request_context, "request", None)
headers = getattr(request, "headers", None)
header_value = headers.get("Authorization")
header_value = header_value.strip()
token = header_value[7:].strip()
Of course, once you have the token, you’ll need to verify it.
Hey guys! Just to help you with it. When you add the app it for some reason triggers the authentication flow, but if you disconnect the app and connect again (which would be the flow that the user would do) you will be able to connect without authenticating. This way you can reproduce a user using you app as a guest
Seeing the same thing on a published plugin (portal ZIP, auth.type: "mixed", v1.0.6). Clicking Install on the directory listing calls POST /backend-api/aip/connectors/links/oauth straight away and opens our /oauth2/authorize page. There is no “continue without an account” choice, and our server isn’t contacted before that.
Our server follows the per-tool pattern: noauth on the open tools, oauth2 on the rest, and an unauthenticated initialize and tools/list get 200. The docs say policy.authentication decides “whether auth happens on install or first use,” but I can only find it in marketplace.json, not in plugin.json or mcp.json, and nothing says it applies to a portal-uploaded plugin.
Two questions for anyone who knows:
Q1: Can a published mixed-auth plugin let a signed-out user install without OAuth, or is install always an OAuth step?
Q2: Is there a documented way to set auth on install vs. first use for a plugin uploaded through platform.openai.com/plugins?
@OpenAI_Support, a pointer to the intended behavior would help.
Hey @shuai_jinko,
Sorry for the long wait. Are you still being asked to sign in right away when you add your app for testing with Mixed authentication selected?
@superset-jvmaia, thanks for explaining what happens when you click Install and sharing the checks you’ve already completed.
Could you open your plugin in the submission portal, select MCPs, and confirm whether the saved authentication setting shows Mixed?
Our submission guide recommends checking the saved connection settings after uploading a new version, because an upload may not replace an existing OAuth client configuration. This will help confirm that the saved setting matches your uploaded package.
If the saved setting already shows Mixed, please let me know. That will help narrow down the next steps for your questions about guest installation and sign-in timing.
- Aish
hey @OpenAI_Support it already shows mixed!
Hi @superset-jvmaia,
Thanks for confirming that the saved setting is Mixed and for sharing the checks you’ve completed. We’re looking into the sign-in behavior and will follow up here if we have an update to share.
Thanks for your patience while we investigate.
-Aish
Hi @OpenAI_Support We have the same issue. Our connector is already set to Mixed, and the tool has the noauth type, but it is still asking to connect to our app when we click Connect.
“_meta”: {
“securitySchemes”: [
{ “type”: “noauth” },
{ “type”: “oauth2”, “scopes”: [“tracy”] }
]
}