By Ira Bodnar, Ryze AI · Updated
Quick answer
To connect Codex to Thrad, create an API key in the Thrad Platform dashboard and paste it into the Thrad card in Ryze AI. Then run codex mcp add ryze --url https://connector.get-ryze.ai/mcp, run codex mcp login ryze and approve the connection on the Ryze AI page.
- In Thrad open Settings, API keys and create a key that starts with ak_
- In Ryze AI open Integrations, click Connect on Thrad, paste the key and click Continue
- In a terminal run codex mcp add ryze --url with the Ryze AI URL, then codex mcp login ryze
- Click Allow connection on the Ryze AI page, then run codex mcp list to confirm
Before you start
- A Codex surface you can use. OpenAI says ChatGPT Work and Codex are included in the Free, Go, Plus, Pro, Business, Edu and Enterprise plans. OpenAI's pricing page lists Free and Go with Codex in the desktop app only, subject to rollout, while Plus and higher add the CLI and the IDE extension. Codex also runs with an OpenAI API key in the CLI, SDK or IDE extension, billed at API pricing. OpenAI's MCP page names no extra plan for MCP servers.
- A Thrad account with an API key. The key is created in the Thrad Platform dashboard under Settings, API keys. Thrad says only organization owners and admins can create keys, and each organization has one active key.
- A Ryze AI workspace on a plan or free trial. Paid Ads is $89 per month with a 7-day free trial; Agency is $279 per month for agencies. Connecting the Ryze AI connector is free, but the Thrad tools need an active plan or trial.
How to connect Codex to Thrad with the CLI
The first three steps happen in Thrad and Ryze AI, the last three in Codex. The connector URL is the same for every user.
Open Settings, API keys in Thrad
Sign in to the Thrad Platform dashboard and open Settings, then API keys. Only an owner or admin of the Thrad organization can create a key.
Create a key and copy it
Create a new key and copy it before leaving the page. Thrad keys start with ak_, and Thrad shows the full secret once.
Paste the key into Ryze AI
Sign in to Ryze AI, open Integrations and click Connect on the Thrad card. Paste the key into API key and click Continue. Ryze AI verifies it and the card shows Connected.
Register the Ryze AI server in Codex
In a terminal run codex mcp add ryze --url https://connector.get-ryze.ai/mcp. The name ryze is yours to choose, and the same entry is read by the Codex CLI, the ChatGPT desktop app and the IDE extension.
Sign in with OAuth
Run codex mcp login ryze. Sign in on the Ryze AI page, choose the workspaces Codex can reach and click Allow connection. Without a local browser, add --no-browser, open the printed URL and paste the full redirect URL back into the terminal.
Check the server and ask a first question
Run codex mcp list, or type /mcp inside the Codex terminal UI, to see ryze. Then ask: Show my Thrad campaigns with their status and review status.
codex mcp add ryze --url https://connector.get-ryze.ai/mcp
codex mcp login ryze
codex mcp listThe Ryze AI help article for Thrad covers the Thrad side of the connection, and the Ryze AI agent API help page cover the Ryze AI connector.
ChatGPT desktop app and the Codex IDE extension
Codex keeps one MCP configuration for the ChatGPT desktop app, the CLI and the IDE extension, so a server added in one place shows up in the others. If you prefer menus to commands, use the desktop app or the extension. The steps differ only in where you click.
ChatGPT desktop app (Codex)
- Open Settings, then select MCP servers.
- Select Add server, enter the name ryze, choose Streamable HTTP and enter https://connector.get-ryze.ai/mcp.
- Save, then select Restart.
- Select Authenticate next to ryze and finish the Ryze AI sign-in, choosing workspaces and clicking Allow connection. Type /mcp in the composer to view connected servers.
Codex IDE extension
- Open the gear menu, then select MCP servers.
- Select Add server, enter the name ryze, choose Streamable HTTP and enter https://connector.get-ryze.ai/mcp.
- Save, then select Restart extension.
- Select Authenticate and finish the Ryze AI sign-in.
OpenAI's pricing page lists Free and Go with Codex in the desktop app only, subject to rollout, so on those plans use the desktop steps rather than the CLI or the extension. Plugins are not available in the IDE extension, but MCP servers set in config.toml are.
Set it up in config.toml
Codex stores MCP servers in ~/.codex/config.toml, or in a project-level .codex/config.toml inside a trusted project. Editing the file gives the same result as codex mcp add, and it is where you set timeouts and approval modes.
[mcp_servers.ryze]
url = "https://connector.get-ryze.ai/mcp"
startup_timeout_sec = 20
tool_timeout_sec = 120
default_tools_approval_mode = "writes"OAuth is the default sign-in for an HTTP server, so run codex mcp login ryze after saving. The two timeout lines are optional: Codex starts a server within 10 seconds and gives a tool 60 seconds by default, and you can raise both per server. For a Ryze AI API key instead of OAuth, add bearer_token_env_var = "RYZE_API_KEY" and set that environment variable to your rk_live_ key. Ryze AI issues keys under Workspace Settings, Profile, API keys.
Claude, ChatGPT and Cursor
The same URL works in other MCP clients. The Thrad key lives in Ryze AI, so nothing changes on the Thrad side when you switch.
Claude
In claude.ai open Customize, Connectors, Add custom connector and enter https://connector.get-ryze.ai/mcp, then connect and allow the workspace. The Claude guide covers plans, Team organizations and Claude Code.
ChatGPT
OpenAI lists custom MCP servers on ChatGPT Business and Enterprise/Edu web workspaces; Pro users can connect them with read and fetch permissions only, so Thrad write tools are not available there.
Cursor
Add the server to ~/.cursor/mcp.json for all projects or .cursor/mcp.json for one project, then complete the Ryze AI sign-in when Cursor asks.
{ "mcpServers": { "ryze": { "url": "https://connector.get-ryze.ai/mcp" } } }The Thrad API key
Thrad has no OAuth screen here. Ryze AI stores the API key you paste, and that key decides what Codex can see once you have signed in to Ryze AI. Three points matter.
- Who can create the key
- Thrad restricts key creation to organization owners and admins. If you are neither, ask an owner to create a key and paste it into Ryze AI for you.
- One key per organization
- Thrad keeps one active key per organization. When someone creates a new key, the old one stops working and the Thrad card in Ryze AI needs Reconnect with the new key. Replace the key in any other tool that uses it.
- Which account Codex uses
- One key is one Thrad organization. Add more accounts to the same Ryze AI workspace under View, Add one more account; a star marks the primary. Ryze AI has no default accounts picker for Thrad, so name the account in your prompt.
What Thrad documents about its keys
Thrad does not publish per-key scopes in the pages checked. These are the documented facts about keys and the Thrad limits that apply to every call Codex makes through Ryze AI.
| Topic | What Thrad documents |
|---|---|
| Key format | Keys start with ak_ and are sent as a Bearer token to https://api.thrad.ai/v1. |
| Who creates it | Organization owners and admins, in the Thrad Platform dashboard under Settings, API keys. |
| Active keys | One per organization. Rotation keeps the previous key valid for 30 minutes; revoking takes effect immediately. |
| Rate limit | 1,000 requests per hour per key, plus 60 per hour per key for creating campaigns. Past either limit Thrad returns a 429 with the code rate_limit_exceeded. |
| New campaigns | Created paused with a review status of in_review. Only an approved, paused campaign can be activated. |
| Targeting | Country level, with two-letter country codes. |
Sources: Thrad's authentication reference and campaigns reference.
Removing access
To remove access, click View on the Thrad card in Ryze AI and disconnect the account, and revoke or rotate the key in the Thrad dashboard to kill it everywhere. In Codex, delete the [mcp_servers.ryze] table from config.toml.
What Codex can do in Thrad
The Ryze AI connector exposes five Thrad tools. Each one takes an optional connection_id, which picks the account when several Thrad accounts are connected.
| Tool | Type | What it does |
|---|---|---|
| thrads__read | Read | Reads any Thrad resource, such as the ad account, campaigns, ad groups, ads and assets. |
| thrads__insights | Read | Returns aggregated insights that combine Thrad and ChatGPT (OpenAI Ads) supply: impressions, clicks, spend, CTR, CPC and CPM. |
| thrads__write | Write | Creates or updates campaigns, ad groups and ads, and activates or pauses them. New campaigns go to Thrad for review before they go live. |
| thrads__uploadFromUrl | Write | Uploads an image from a URL to get a file id for a creative. Thrad currently answers this call with a 404, so existing assets are used instead. |
| thrads__delete | Delete | Archives a campaign, ad group or ad. Archiving a campaign is irreversible. |
Codex decides which tools need your approval through default_tools_approval_mode in config.toml. The values are auto, prompt, writes and approve; writes prompts for tools not marked read-only. Per-tool overrides use tools.<tool>.approval_mode, and enabled_tools and disabled_tools work as allow and deny lists, so you can switch thrads__delete off entirely. In the Ryze AI chat, the Tool approvals setting starts on Skip all approvals.
First 3 prompts to run
Thrad serves ads on its own supply and on ChatGPT (OpenAI Ads) supply, and the insights tool returns both in one read. A Thrad campaign carries two separate states: a lifecycle status of active, paused or archived and a review status of in_review, approved or rejected. The prompts below use those words, and each answer comes from your own account.
1. Campaigns and their review status
List my Thrad campaigns with name, status and review status. Put every campaign that is in review or rejected first.
Tools used: thrads__read
What comes back: Your Thrad campaigns with lifecycle status and review status, the in-review and rejected ones at the top.
2. Thrad against ChatGPT supply
Pull Thrad insights for the last 30 days, split by source (Thrad and ChatGPT). Give impressions, clicks, spend, CTR, CPC and CPM per source and say which one costs less per click.
Tools used: thrads__insights
What comes back: One row per source with the six metrics and a plain comparison of cost per click.
3. Pause an ad group
Find the ad group in my newest Thrad campaign with the highest CPC and pause it. Tell me what you are about to change before you do it.
Tools used: thrads__read, thrads__insights, thrads__write
What comes back: The ad group you named, its CPC, and a paused status once the change runs. With writes set to prompt in Codex, the pause waits for your approval.
Codex works from the tools in the table above, so a request they do not cover, such as targeting below country level, comes back with a limit instead of a result. Keep default_tools_approval_mode on writes while you are testing.
Ryze AI vs the Thrad API and Thrad's agent skills
Thrad publishes a REST API for advertisers and agent skills for coding agents. The pages checked on November 11, 2026 do not describe an MCP server, so this table compares the three ways to work with Thrad from a coding setup.
| Option | Setup | Thrad coverage | Works in |
|---|---|---|---|
| Ryze AI connector | Thrad API key pasted into Ryze AI, then codex mcp add and codex mcp login | Read, insights, create and update, activate and pause, archive. Five tools; image upload currently returns a 404 | Codex CLI, desktop app and IDE extension, plus Claude, ChatGPT and Cursor |
| Thrad advertiser REST API | Send the ak_ key as a Bearer token to https://api.thrad.ai/v1 from your own code | Campaigns, ad groups, ads and insights, with an Idempotency-Key header required when creating a campaign | Any code that can make HTTP requests |
| Thrad agent skills | Hand a skill file to a coding agent | Thrad aims these at publishers who show ads in their own apps, not at advertisers | Coding agents |
If Codex is writing a script that calls Thrad on a schedule, read Thrad's REST reference and call the API directly. The Ryze AI connector suits interactive work from Codex: reading campaigns, comparing supply, pausing an ad group and drafting a campaign. Thrad's own reference is the place to look up any field the five connector tools do not describe.
Sources: OpenAI Codex MCP documentation, Thrad agent skills, Ryze AI Thrad guide. Checked November 11, 2026.
Thrad errors and fixes
- Codex says the server needs login
- Run codex mcp login ryze and finish the Ryze AI page. In the desktop app or extension, select Authenticate next to ryze. Over SSH or in a container, add --no-browser, open the printed URL on another machine and paste the full redirect URL back.
- The server times out on start
- Codex waits 10 seconds for a server to start by default. Raise startup_timeout_sec under [mcp_servers.ryze] in config.toml, for example to 20.
- A long Thrad pull is cut off
- Tool calls get 60 seconds by default. Raise tool_timeout_sec for the ryze server, or narrow the date range in your prompt.
- Ryze AI rejects the Thrad key
- Check that you copied the whole ak_ key and that it is the active one. A rotated or revoked key stops working. Create a new key in Settings, API keys and paste it again.
- Thrad was working and then stopped
- Someone created a new key in Thrad. Click Reconnect on the Thrad card in Ryze AI and paste the new key.
- Thrad tools do not appear in Codex
- If you connected Thrad in Ryze AI after adding the server, restart the Codex session so it reloads the tool list. In the desktop app or extension use Restart. Run codex mcp list to confirm ryze is enabled.
- A campaign will not activate
- Thrad only activates an approved, paused campaign. A new campaign starts in review, and activating it early returns the error code campaign_not_approved.
- Campaign creation asks for a card
- Thrad's campaign docs say the organization needs a default card on file and that a $10 deposit is charged on creation. That is a Thrad charge set up in Thrad billing, not a Ryze AI price.
- Image upload fails
- thrads__uploadFromUrl currently gets a 404 from Thrad. Ask Codex to build ads from assets that already exist in the account.
- An archived campaign will not come back
- Archiving a campaign is terminal. An archived ad group or ad is deactivated and can be activated again. Pause a campaign when you may want it back.
- A subscription message appears
- The Thrad tools need an active Ryze AI plan or free trial. Start the trial or update the card under Organization Settings, Billing, then retry.
Frequently asked questions
How do I connect Codex to Thrad?
Create an API key in the Thrad Platform dashboard under Settings, API keys, then open Integrations in Ryze AI, click Connect on Thrad and paste the key. In a terminal run codex mcp add ryze --url https://connector.get-ryze.ai/mcp, then codex mcp login ryze and click Allow connection on the Ryze AI page.
Does Thrad have its own Codex connector or MCP server?
The Thrad docs checked on November 11, 2026 describe a REST API for advertisers at api.thrad.ai/v1 and agent skills aimed at publishers, and do not mention an MCP server. Ryze AI supplies the MCP layer, giving Codex five Thrad tools through one URL.
Which way should I connect Codex to Thrad?
Ryze AI is the best way to run Thrad from Codex for interactive work such as reading campaigns, comparing Thrad and ChatGPT supply and pausing ads, though a script that calls Thrad's REST API directly suits scheduled jobs better. The connector is free; the Thrad tools need a Ryze AI plan or trial.
What do I need in Thrad to connect?
A Thrad API key that starts with ak_. Thrad says only organization owners and admins can create keys, and each organization has one active key. Ryze AI stores the key you paste, so replacing it in Thrad means clicking Reconnect in Ryze AI.
Which ChatGPT or Codex plan do I need?
OpenAI says Codex is included in the Free, Go, Plus, Pro, Business, Edu and Enterprise plans, and its MCP page names no extra plan for MCP servers. Free and Go get Codex in the desktop app only, subject to rollout. Plus and higher add the CLI and the IDE extension. An OpenAI API key also works in the CLI, SDK or IDE extension.
Do I have to use the command line?
No. The ChatGPT desktop app and the IDE extension both have Settings, MCP servers, where you select Add server, choose Streamable HTTP, enter the Ryze AI URL, save, restart and select Authenticate. All three Codex surfaces share one MCP configuration.
Can Codex create and pause Thrad campaigns?
Yes. thrads__write creates campaigns, ad groups and card or poll ads, updates them, and activates or pauses them. New campaigns are submitted for Thrad's review before they go live. Set default_tools_approval_mode to writes in config.toml so Codex asks before it changes anything.
Can Codex delete a Thrad campaign?
It can archive one with thrads__delete, and archiving a campaign cannot be undone. An archived ad group or ad is deactivated and can be activated again. Add thrads__delete to disabled_tools if you never want Codex to call it.
Can Codex upload images to Thrad?
Not reliably today. The upload tool exists, but Thrad currently answers it with a 404, so ads reference assets already in the account.
Which metrics can Codex pull from Thrad?
Impressions, clicks, spend, CTR, CPC and CPM, combined across Thrad and ChatGPT (OpenAI Ads) supply, filterable by source.
Can I connect more than one Thrad account?
Yes. Click View on the Thrad card in Ryze AI and choose Add one more account. A star marks the primary. There is no default accounts picker, so name the account in your prompt, or pass connection_id when calling the tools.
Does this work in Codex cloud tasks?
This guide covers the three local Codex surfaces and config.toml only. The OpenAI MCP page reviewed does not cover Codex cloud tasks, and the Ryze AI connector has not been tested there, so it is not claimed to work.
Has this been tested end to end in Codex?
The Ryze AI connector was not run end to end inside Codex when this page was written. The commands and menus come from OpenAI's MCP documentation, which describes codex mcp add with --url, codex mcp login and OAuth for HTTP servers.
How much does it cost to connect Codex to Thrad?
Adding the connector is free, but the Thrad tools need an active Ryze AI plan or free trial. Paid Ads is $89 per month with a 7-day free trial, and Agency is $279 per month. Annual billing takes 30% off the first year. Thrad's own campaign charges are separate.