Skip to content

Connect Salesforce to Codex

Use Codex in the ChatGPT desktop app to inspect the live org before it touches the code: query records, read the schema, pull Apex and Flows into staging, and deploy with the test level you choose.

7 days free · No card required

How to connect Salesforce to Codex

  1. Find or add ApexGenius. Open Plugins in the ChatGPT desktop app. Select an ApexGenius plugin shared with you or one you created, and install it if needed. Setup options below cover personal plugins and desktop settings.
  2. Connect and authorize. Connect Salesforce in ApexGenius if needed. From the app’s connection prompt, sign in and approve the intended Salesforce connection and access. The app opens the authorization page for you.
  3. Return and use Salesforce. Start a new Codex task, ask ApexGenius one read-only question, and check the result against a successful read in Activity.

Plugin availability and labels depend on your app and workspace. Installation alone does not verify Salesforce access.

Watch the connection

7.2-second walkthrough · Silent, with captions

Read the steps Follow along at your own pace

1. Enable developer mode

ChatGPT Security and login settings with the Developer mode switch enabled.
This captured workspace places Developer mode in Settings, then Security and login.Open full-size image (opens in a new tab)

2. Create the plugin

ChatGPT New Plugin form filled with the ApexGenius name, server URL connection, MCP endpoint, and OAuth authentication.
This captured workspace labels the form New Plugin. Copy the live endpoint above, keep Server URL and OAuth selected, then acknowledge the warning.Open full-size image (opens in a new tab)

3. Find ApexGenius

ChatGPT Plugins directory search showing ApexGenius in the Personal section.
After creation, search Plugins for ApexGenius. A developer-mode copy appears under Personal rather than the Public catalog.Open full-size image (opens in a new tab)

4. Review the connection

ChatGPT ApexGenius plugin details showing its connection, permission control, and Developer mode label.
Open ApexGenius to review its connection, permission behavior, and Developer mode label before using it in a Work chat.Open full-size image (opens in a new tab)

The walkthrough uses the original ChatGPT web plugin captures. After connecting, open Codex in the desktop app and start a new task with ApexGenius. A ChatGPT web connection does not verify Codex access.

A public ApexGenius plugin listing is not verified. Use a plugin shared with you or one you created, subject to your account and workspace policy.

Create a personal plugin

Where Developer mode is available, open ChatGPT Settings, then Security and login, and enable it. In Plugins, select the plus button, enter ApexGenius and a description, then add this URL under Connection. Create the connection, complete OAuth, and review the tools. Return to Codex in the desktop app and start a new task with the plugin enabled.

https://server.autom8.pro/mcp
OpenAI custom connection guide (opens in a new tab)
No plugin available? Use desktop settings
  1. In the ChatGPT desktop app, open Settings, then MCP servers, then Add server.
  2. Name the server ApexGenius, choose Streamable HTTP, and paste the MCP address below.
  3. Save, select Restart, then Authenticate. Sign in to ApexGenius and authorize the intended connections and access.
  4. Start a new Codex task and ask one read-only question. Check the returned result and its matching successful read in Activity.
https://server.autom8.pro/mcp
OpenAI desktop MCP settings (opens in a new tab)
Manual setup for developers

Codex CLI is optional. Run these commands, complete browser authorization, then start a new session. Do not paste bearer tokens or static authorization headers.

Register the remote MCP server

codex mcp add apexgenius --url https://server.autom8.pro/mcp

Authorize in your browser

codex mcp login apexgenius

Inspect registered servers

codex mcp list

The desktop app, CLI, and IDE extension share MCP configuration on the same host. The IDE extension does not install plugins. ChatGPT web does not read local Codex configuration.

Additional reference: the Salesforce setup guide.

Start free

What it looks like in Codex

An illustrative read-only request and response. Your results come from the account and dates you choose.

How the route works
Codex
CodexApexGenius MCP route
Which opportunities over 50k are closing this month and who owns them?
ApexGenius
Working with ApexGenius1 tool search · 2 reads
RequestOpen opportunities
Account scopeAuthorized connections checked
apex_search_toolsSalesforce records · Find the Salesforce read pathComplete
Salesforceapex_call_read_toolquery_soql · Query opportunities closing this monthComplete
Salesforceapex_call_read_toolquery_soql · Read owner namesComplete
Codex

Six opportunities over 50k close this month. Four belong to Priya Shah, two to Marcus Lee. The largest is Acme Renewal at 180k, stage Negotiation. Nothing was changed.

Read-only route
Codex

What you can ask once it is connected

Which Apex classes reference Opportunity.StageName?

Pull the Account trigger into staging and explain what it changes.

Which Flows fire when a Lead is converted in this org?

Deploy the staged Flow and show me the deployment result.

You choose what Codex is allowed to touch

Choose the saved accounts and tools this Codex connection may use. Its authorization carries that scope, and each business connection’s tool and resource restrictions still apply.

  • Full accessEvery enabled tool on the connections you choose.
  • Read onlyLooks things up, changes nothing.
  • CustomPick apps and tools one by one.
  • · The selected Salesforce connection remains visible in the gateway workspace.
  • · Tool availability is resolved for the current connection and account context.
  • · Supported Salesforce write activity is recorded for review.
  • · Server-enforced Auto, Ask, and Off approval modes are in development.

The Salesforce operations Codex can run

21 operations: 11 Read and 10 Write. Available tools depend on your connection and permissions. Review any action that changes or removes data. Codex discovers these operations through the ApexGenius gateway.

  • list_projectsReadList accessible Salesforce connections and their environment details.
  • query_soqlReadRun SOQL and return selected Salesforce fields.
  • get_recordReadRetrieve one record by object type and ID.
  • list_objectsReadList accessible Salesforce objects.
  • describe_objectReadReturn fields, types, picklists, relationships, and permissions.
  • search_recordsReadSearch records across Salesforce objects.
  • read_fileReadRead one staged component or documentation file.
  • list_filesReadList staged or documentation files with an optional folder or pattern filter.
  • grepReadSearch staged file names or contents.
  • check_deploy_statusReadRead deployment status, component results, and test details.
  • list_live_metadataReadList live components of one metadata type in the selected org.
  • create_recordWriteCreate one Salesforce record.
  • write_fileWriteCreate or overwrite a Salesforce metadata component or Markdown document in private staging.
  • edit_fileWriteReplace exact matching content in a staged Salesforce metadata component or document.
  • cancel_deployWriteCancel an in-progress Salesforce deployment.
  • get_live_componentWritePull one live component into the private staging workspace.
  • update_recordWriteUpdate selected fields on one Salesforce record.
  • delete_recordWriteDelete one Salesforce record by ID.
  • execute_anonymous_apexWriteExecute supplied anonymous Apex, which can change or delete data.
  • delete_fileWritePermanently remove one staged component or documentation file.
  • deployWriteDeploy selected staged files with the requested Salesforce test level.

Questions people ask first

What if ApexGenius is not listed in Plugins?

Use an ApexGenius plugin shared with you or one you created, subject to workspace policy. A public listing is not verified. The desktop MCP settings fallback below connects the same hosted endpoint without a terminal.

Can I still use Codex CLI or the IDE extension?

Yes, remote MCP setup remains a developer option in Manual setup. The app plugin walkthrough is the default here. Plugin installation is not supported in the IDE extension.

How do Codex, ChatGPT, and ChatGPT Work differ?

The supported app surfaces follow the same plugin journey: find or add ApexGenius, connect, authorize, then return and use Salesforce. Codex runs tasks in the ChatGPT desktop app; ChatGPT offers Chat and Work. Start with Plugins in the app you use; availability and authorization depend on your account and workspace. A ChatGPT web custom app has its own setup and does not inherit a local Codex configuration.

Do I need my own Salesforce connected app?

No. You sign in with Salesforce OAuth and ApexGenius holds the authorization for the connection, refreshing it as Salesforce requires.

Can I connect production and a sandbox at the same time?

Yes. Each org is its own Salesforce connection, and an AI agent can be scoped to one of them, both, or neither.

Can an agent delete records or deploy without me?

The operation must be enabled in the access you authorize. Choose Read only to exclude writes. Delete, anonymous Apex, and deploy carry risk labels; confirmation behavior depends on the tool and AI client, with no universal server-side human-approval guarantee.

Is my Salesforce data stored by ApexGenius?

The ordinary MCP path does not intentionally retain record results. Operational, connection, credential, usage, and audit data is retained so activity can be reviewed.

Which AI agents can use this connection?

Codex starts in Plugins in the ChatGPT desktop app. Claude, Claude Code, Cursor, VS Code, and ChatGPT Work each have their own setup guide. Authorize the saved Salesforce connection separately for each AI client; availability and controls vary.

Connect Salesforce to Codex today

Start free

7 days free. No card required. Disconnect any time.