Skip to content

Connect ChatGPT

You need two values from Set up the MCP server: the Endpoint URL and the client ID (the External Client App’s Consumer Key).

ChatGPT asks for more settings than Claude does. Three of them must be changed from what ChatGPT picks by default, or sign-in fails: the registration method, the token endpoint auth method and OIDC. The steps below call each one out.

Custom MCP servers have to be allowed on your ChatGPT account. In a company workspace, an admin controls this. If you do not see Add custom MCP server in step 1, see OpenAI’s guide, Connect from ChatGPT, or ask your workspace admin.

In ChatGPT, open Plugins in the sidebar. Select Add at the top right, then Add custom MCP server.

The Add menu on ChatGPT's Plugins page, with three items: Create plugin, Upload plugin archive and Add custom MCP server.
Add custom MCP server is the last item in the Add menu.
  • Name: something that tells you which org it is, such as Salesforce Org. ChatGPT refuses a name another app already uses, plain Salesforce included.
  • Connection: leave it on Server URL and paste the Endpoint URL.
  • Authentication: leave it on OAuth.

Do not create it yet. ChatGPT reads the server’s sign-in details as soon as you paste the URL, and Advanced OAuth settings becomes available. Select it.

The Add custom MCP server form in ChatGPT with Salesforce Org as the name, the ApexAgent endpoint in the Connection field and OAuth as the authentication.
Fill in the name and the Endpoint URL, then open Advanced OAuth settings.

The advanced settings open beside the form. Under Client registration:

  1. Change Registration method to User-Defined OAuth Client. ChatGPT preselects Dynamic Client Registration, which Salesforce does not support.
  2. Paste the Consumer Key into OAuth client ID.
  3. Leave OAuth client secret empty.
  4. Change Token endpoint auth method to none. There is no secret to send.
The form with Advanced OAuth settings open. Registration method is User-Defined OAuth Client, a callback URL is shown, the OAuth client ID is filled in, the client secret is empty and Token endpoint auth method is none.
Registration method, OAuth client ID and Token endpoint auth method are the three fields to set here.

4. Allow ChatGPT’s callback URL in Salesforce

Section titled “4. Allow ChatGPT’s callback URL in Salesforce”

The same panel shows a Callback URL. Salesforce only sends users back to URLs you have allowed, so copy it with the button beside it.

In Salesforce Setup, open External Client App Manager, edit ApexAgent MCP, and add the URL to Callback URL under its OAuth settings, on a line of its own. Save. Salesforce can take a few minutes to apply the change.

You can leave the ChatGPT form open while you do this.

Scroll down in the advanced settings.

Under Scopes, api and refresh_token should both be ticked. ChatGPT finds these from the server. Leave Base scopes empty.

The Scopes section of the advanced settings, with api and refresh_token ticked under Default scopes and the Base scopes box empty.
The two default scopes are all ApexAgent needs.

Further down, under OpenID support, untick OIDC enabled. Left on, ChatGPT asks Salesforce for extra scopes the app does not allow, and sign-in fails with invalid_scope.

The OpenID support section of the advanced settings with the OIDC enabled box unticked.
OIDC enabled must be unticked.

Back on the left, tick I understand and want to continue, then select Create as a plugin.

ChatGPT then offers to connect. Select the Continue to button, which carries your connector’s name, and sign in with your own Salesforce login. If you are already signed in to Salesforce in that browser, it connects straight away.

ChatGPT's Connect dialog for the new connector, with a Continue button that leads to the Salesforce sign-in.
Continue takes you to Salesforce to sign in.

When it has worked, the plugin’s page lists your Salesforce account under Connected accounts.

The plugin's settings page in ChatGPT, showing a Salesforce account listed under Connected accounts.
A connected account means sign-in succeeded.

Start a new chat. Select + in the message box and choose your connector, then ask something about your org.

The menu behind the plus button in ChatGPT's message box, with the Salesforce connector listed among the tools.
Pick the connector from the + menu to use it in a chat.
ChatGPT's answer to a question about a customer's open cases: four cases, each linked to its record in Salesforce, with priority and status.
Asked which cases a customer has open, ChatGPT answers from Salesforce and links each record.
What you see What to check
invalid_scope OIDC enabled is still ticked
redirect_uri_mismatch The callback URL is not in the External Client App yet, or the change has not applied. Wait a few minutes and try again
An error about registration Registration method is still Dynamic Client Registration
invalid_client Token endpoint auth method is not none, or the client ID is not the Consumer Key
Sign-in works, then you are refused You do not have the ApexAgent User permission set

After you change which tools the server exposes, open the plugin’s page in ChatGPT and select Refresh tools.