How to Connect NocoBase MCP Server to ChatGPT Using OAuth?

Hi everyone!

I’m trying to connect the NocoBase MCP Server directly to ChatGPT using the custom MCP server integration, but I’m having trouble completing the setup.

My Environment

  • NocoBase (self-hosted)
  • MCP Server plugin installed and enabled
  • IdP: OAuth plugin installed
  • MCP Server URL: https://nocobase.urbanna.com.br/api/mcp
  • Authentication: OAuth 2.0

ChatGPT successfully discovers the following OAuth endpoints:

  • Authorization: /api/idpOAuth/authorize
  • Token: /api/idpOAuth/token
  • Registration: /api/idpOAuth/register
  • Issuer: /api
  • Resource: /api/mcp

However, when I try to create the connection in ChatGPT, I receive the following error:

Some application settings were rejected. Check the server URL or tunnel ID, icon, and authentication settings, then try again.

I also tried connecting through OpenAI Codex, but the OAuth authentication fails with:

invalid_client
client is invalid

Additionally, when accessing /api/idpOAuth/register directly through a browser, it returns Not Found (GET request).

My Questions

  1. Does the NocoBase MCP Server officially support direct integration with ChatGPT using OAuth 2.0?
  2. Do I need to manually register an OAuth client and generate a client_id?
  3. Does NocoBase support OAuth Dynamic Client Registration (DCR), which ChatGPT may require for authentication?
  4. Are there any additional configurations required in the MCP Server or IdP: OAuth plugins?
  5. Has anyone successfully connected a self-hosted NocoBase instance to ChatGPT or OpenAI Codex?

What I’m Trying to Achieve

My goal is to use ChatGPT as an AI assistant to interact directly with NocoBase through MCP, including:

  • Querying and managing database records
  • Creating collections and fields
  • Configuring relationships between collections
  • Managing data sources
  • Building and modifying NocoBase applications through natural language

Has anyone managed to get this working?

If so, could you share a working configuration, documentation, or a step-by-step guide?

Any help would be greatly appreciated!

Thanks in advance!

idk if you’ve read this already, but here you go

Hi again!

Just a quick update on my previous issue.

I found that NocoBase’s OAuth plugin restricts Dynamic Client Registration (DCR) to HTTP loopback redirect URIs.

I temporarily patched provider-dispatch.js to allow ChatGPT’s HTTPS callback:

https://chatgpt.com/connector_platform_oauth_redirect

The patch was successfully applied, and the JavaScript syntax check passed. However, ChatGPT still fails to connect. I haven’t restarted the NocoBase process since applying the patch, so the running OAuth provider may still be using the original validation.

Since I’m running NocoBase in production through Docker/Coolify, I’d prefer not to modify internal files or risk disrupting the application.

Is there an officially supported way to connect ChatGPT to NocoBase MCP using OAuth 2.0?

Specifically, can the OAuth provider be configured to accept external HTTPS callback URLs without modifying the source code?

Any guidance from the NocoBase team would be greatly appreciated. Thanks!

@hongboji

@hongboji Any Solution?