Skip to content

Connect Codex to Salesforce

Connect Codex to Salesforce through ApexGenius in the ChatGPT desktop app. Start in Plugins to authorize your org and inspect records, schema, Apex and Flows.

7 days free · No card required

How to connect Salesforce to Codex

FirstConnect Salesforce to ApexGenius

ThenConnect ApexGenius to Codex

Codex desktop app with Plugins selected and ApexGenius listed under Available to your account.
Open Codex in the ChatGPT desktop app, then Plugins, and find ApexGenius.Open full-size image (opens in a new tab)
Codex plugin page for ApexGenius with a Connect button and a note that authorization opens in the browser.
Select ApexGenius and choose Connect. Authorization opens in your browser.Open full-size image (opens in a new tab)
ApexGenius approval page titled Connect Codex to ApexGenius with Full access, Read only, and Custom options.
Choose Full access, Read only, or Custom, then approve.Open full-size image (opens in a new tab)
Codex task asking ApexGenius to list the fields on Opportunity, with a completed read-only Salesforce result.
Start a new task, select ApexGenius, and ask one read-only Salesforce question.Open full-size image (opens in a new tab)

The desktop-app screens are labeled reconstructions of the Codex plugin flow; the approval screen is a real ApexGenius capture. A ChatGPT web connection does not verify Codex access.

  1. Find or add ApexGenius. Open Plugins in the ChatGPT desktop app and select an ApexGenius plugin shared with you or one you created.
  2. Connect and authorize. Sign in from the app’s connection prompt and approve the intended Salesforce connection and access.
  3. Return and use Salesforce. Start a new Codex task, ask one read-only question, and check the result against Activity.

Plugin availability and labels depend on your app and workspace. A public ApexGenius listing is not verified, and installing one does not by itself verify Salesforce access.

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 Codex can do in Salesforce

21 operations. Read looks things up and changes nothing. Write changes Salesforce and runs only when that tool is enabled.

Read11 operations

Looks things up. Changes nothing.

Connection context

  • list_projectsList accessible Salesforce connections and their environment details.

Records and schema

  • query_soqlRun SOQL and return selected Salesforce fields.
  • get_recordRetrieve one record by object type and ID.
  • list_objectsList accessible Salesforce objects.
  • describe_objectReturn fields, types, picklists, relationships, and permissions.
  • search_recordsSearch records across Salesforce objects.

Staging and documentation

  • read_fileRead one staged component or documentation file.
  • list_filesList staged or documentation files with an optional folder or pattern filter.
  • grepSearch staged file names or contents.

Live metadata and deployment

  • check_deploy_statusRead deployment status, component results, and test details.
  • list_live_metadataList live components of one metadata type in the selected org.

Write10 operations

Changes Salesforce. Runs only when enabled.

Records and schema

  • create_recordCreate one Salesforce record.
  • update_recordUpdate selected fields on one Salesforce record.
  • delete_recordDelete one Salesforce record by ID.

Apex runtime

  • execute_anonymous_apexExecute supplied anonymous Apex, which can change or delete data.

Staging and documentation

  • write_fileCreate or overwrite a Salesforce metadata component or Markdown document in private staging.
  • edit_fileReplace exact matching content in a staged Salesforce metadata component or document.
  • delete_filePermanently remove one staged component or documentation file.

Live metadata and deployment

  • deployDeploy selected staged files with the requested Salesforce test level.
  • cancel_deployCancel an in-progress Salesforce deployment.
  • get_live_componentPull one live component into the private staging workspace.

You choose what Codex can use

When you approve Codex, pick Full access, Read only, or Custom. Read only allows the Read operations and nothing else. Custom picks apps and tools one by one.

Limits in Salesforce

  • · 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.
  • · Turn a tool off to block calls. Enabled tools run when called.

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

Try asking

“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.”

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.

One connection
Selected Salesforce connections
CodexCodex
ApexGeniusApexGenius
MCP
SalesforceProd org
SalesforceSandbox
SalesforceClient A
SalesforceClient B
SalesforceDev org

Managed Salesforce connection

Connect the org once. No Salesforce connection to babysit.

ApexGenius hosts the MCP connection, securely stores the Salesforce OAuth authorization, and refreshes routine access tokens automatically. You do not have to build a server or rebuild the connection every time a session expires.

What ApexGenius manages
  • No MCP server infrastructure for you to host or patch
  • Automatic Salesforce access-token refresh
  • The same authorized projects stay available across your ApexGenius MCP clients
  • A new login only when Salesforce revokes access or an org policy requires it

For Salesforce users, operators, admins, and consultants

Start with a current Salesforce question inside Codex

Use the ApexGenius plugin in Codex to read the selected Salesforce connection. When the task requires more depth, inspect configuration, stage reviewed metadata, and verify a supported deployment path from the same conversation.

Query live Salesforce data

Ask Codex for task-specific SOQL against an authorized Salesforce connection and return only the fields needed for the answer.

“Show open Opportunities over $50k by stage and owner.”

Understand the org that exists

Inspect objects, fields, relationships, staged source, and supported live metadata before proposing a change.

“Explain what updates Opportunity Stage and where the automations overlap.”

Stage and review changes

Create or edit supported source files, read the staged result, and stop before any deployment is requested.

“Add the field in staging, show me the finished files, and stop before deploy.”

Deploy after approval

Invoke the labeled deployment tool when requested, track the job, and verify the result against the authorized org.

“Deploy the approved files, check the status, and confirm what landed.”

Plugin setup

Connect ApexGenius to Codex

Connect the ApexGenius plugin in the ChatGPT desktop app, approve the access Codex may use, then start a task. Manual setup with the MCP URL below stays available for Codex CLI.

ApexGenius MCP server URL

https://server.autom8.pro/mcp
  1. 1

    Connect Salesforce to ApexGenius

    Create your ApexGenius account and authorize the Salesforce org you want Codex to use.

  2. 2

    Open Plugins in Codex

    In the ChatGPT desktop app, open Codex, then Plugins, and find an ApexGenius plugin available to your account.

  3. 3

    Connect ApexGenius

    Select ApexGenius and choose Connect. Authorization opens in your browser.

  4. 4

    Approve the access Codex may use

    On the ApexGenius approval page choose Full access, Read only, or Custom, then approve. You can change it later.

  5. 5

    Start a new Codex task

    Return to the desktop app, start a new task with ApexGenius selected, and ask one read-only Salesforce question first.

Availability depends on plan and workspace

Codex tasks run in the ChatGPT desktop app. The plugins and tools you can use depend on your account and workspace. Plugin installation is not supported in the IDE extension; Codex CLI remote MCP setup remains a developer option. A public ApexGenius plugin listing is not verified.

Consultant workflow

One controlled path from question to deployment

ApexGenius keeps the selected Salesforce connection explicit, so the intended org or environment stays clear throughout the workflow.

1

Choose the connection

List the authorized Salesforce connections and select the org or sandbox for this task.

2

Inspect before changing

Read the relevant schema and metadata so the proposed change matches the real org.

3

Stage the work

Create or edit supported source files without deploying them yet.

4

Review and approve

Read the staged result and confirm the intended files, target org, and Salesforce test level.

5

Deploy when requested

Invoke the labeled deployment action, run the selected tests, and check the final Salesforce status.

ApexGenius MCP

Connect Salesforce to Codex free

Try the full ApexGenius MCP product for seven days with no credit card. When the trial ends, choose whether to subscribe for $25 per user each month to keep using ApexGenius.

  • ✓ No ApexGenius monthly MCP cap
  • ✓ Salesforce connection capacity shown after sign-in
  • ✓ OAuth and Salesforce permission enforcement
  • ✓ Records, metadata, Apex, staged files, and deployment

Questions

Salesforce Codex MCP FAQ

How do I add ApexGenius to Codex?

In the ChatGPT desktop app, open Codex, then Plugins, and select an ApexGenius plugin shared with you or one you created. Choose Connect, approve the access you want in ApexGenius, and start a new Codex task with ApexGenius selected. A public listing is not verified.

Can Codex change Salesforce through ApexGenius?

Eligible write tools can run only when the access you approved, the selected ApexGenius connection, and your Salesforce permissions allow them. Codex may ask for confirmation.

Does ApexGenius need my Salesforce password?

No. You authorize Salesforce through OAuth on Salesforce’s sign-in screen. ApexGenius uses the credential for the selected Salesforce connection, so profiles, permission sets, object access, and field-level security still apply.

What if ApexGenius is not listed in Plugins?

Use an ApexGenius plugin shared with you or one you created, subject to workspace policy. The desktop MCP settings fallback connects the same hosted endpoint without a terminal, and Codex CLI remains a developer option under Manual setup.

Is Codex included with ApexGenius?

No. ApexGenius is the Salesforce MCP connection. Your ChatGPT subscription, which includes Codex, and your Salesforce subscription remain separate. Plugin availability and workspace controls are governed by OpenAI and your workspace administrator.

How many Salesforce orgs can I use from Codex?

Your signed-in Connections screen shows the current Salesforce connection capacity for your account. Each production org or sandbox remains a separate authorized connection, and you select the intended one for the task.

Last verified August 28, 2026

ChatGPT Apps navigation, Developer Mode, plan availability, and permission controls can change. Confirm the current OpenAI documentation when connecting a new workspace.