Guide / codex
How to Connect Codex to TikTok Ads MCP
Set up Codex for a safe, read-only TikTok Ads MCP workflow and verify the account, tools, and reporting context.
This guide explains the shape of a Codex-to-TikTok Ads MCP setup without assuming a particular provider's configuration syntax. MCP server names, package commands, and permission fields can change, so use the current instructions from the MCP provider for the configuration values.
Before you configure Codex
Have the MCP provider's server configuration, the Codex MCP configuration location, and access to the intended TikTok advertiser account. Decide in advance that the first session will be read-only. Identify the account, time zone, currency, attribution context, and date range used in every report.
Connect the server
- Open the Codex MCP configuration used by your installation.
- Add the TikTok Ads MCP server entry exactly as documented by the provider.
- Keep secrets in the supported environment-variable or credential mechanism; do not paste tokens into prompts or commit them to a repository.
- Start a new Codex session or reload the MCP configuration.
- Check that the server is connected and that its TikTok Ads tools are discoverable.
Do not copy a configuration example from a different client without checking its schema. A valid server command with an invalid client-specific field can look like an authentication failure when it is actually a configuration failure.
Verify with a read-only request
Show the TikTok advertiser accounts available to this session.
Do not create, edit, pause, or delete anything.
After selecting the account, ask for a seven-day summary of spend, impressions, clicks, conversions, CPA, and ROAS. Require Codex to state the account, time zone, currency, filters, and missing fields.
If the connection does not work
- The server does not start: inspect the command, runtime, package, and environment variables.
- The server starts but tools are missing: reload Codex and inspect advertised capabilities.
- Tools are visible but data is denied: check advertiser and Business Center permissions.
- The account list is empty: check identity, account access, and account filters.
- A request times out: reduce the date range and dimensions before changing credentials.
The TikTok Ads MCP troubleshooting guide has the broader diagnostic checklist.
Keep execution separate
Use Codex to prepare findings and a proposed change list first. Budget, bid, targeting, creative, and campaign-status changes should require a separate approval step, with a recorded reason and rollback condition.