Codex
Connect Sync GTM to Codex, OpenAI’s coding agent CLI.
Why connect Codex to Sync GTM?
Sync GTM gives Codex live B2B data it can act on while building automation tasks from your terminal:
- Enrich contacts as part of agentic tasks — Codex can look up emails, mobile numbers, and LinkedIn profiles mid-execution
- Research companies inline — pull tech stack, headcount, funding, and job openings without leaving the terminal
- Build data pipelines with real GTM data — generate lead lists, verify emails, filter by signals — all orchestrated by Codex
- Automate prospecting workflows — find people within a company, check job changes, validate WhatsApp numbers in one agentic run
- Prototype faster — test enrichment calls interactively while developing the integration that will use them
Best for automation-first teams and developers who want Codex to handle both the code and the GTM data layer.
Install
- Open
~/.codex/config.tomland add the Sync GTM server. Theexperimental_use_rmcp_clientfeature enables streamable-HTTP MCP servers:
[features]
experimental_use_rmcp_client = true
[mcp_servers.syncgtm]
url = "https://api.syncgtm.com/mcp"- Start the browser sign-in:
codex mcp login syncgtm- Your default browser opens the Sync GTM authorization page. Sign in and approve.
- Codex stores the session and connects on each run.
Select the correct organization. The authorization screen opens with an Organization dropdown at the top. Whichever organization is selected when you click Approve is the one this connection reads data from and spends credits from. In more than one organization? Open the dropdown and pick the right one before approving. To change it later, connect again and pick a different one — see Managing more than one organization.
No
bearer_token_env_varis needed — Sync GTM uses browser OAuth, not a static token.
Managing more than one organization
Agencies and consultants often sit in several Sync GTM organizations — their own plus each client’s. The connection uses the organization you picked on the authorization screen, and spends that organization’s credits. Choosing a different organization in the Sync GTM app does not move an existing connection across, so Codex keeps using the one you approved until you connect again.
To work in a client’s account:
- Run
codex mcp login syncgtmagain. - On the Sync GTM authorization screen, open the Organization dropdown and pick the client’s organization, then click Approve.
- Run
check_credits(free) to confirm which organization the connection is now pointing at.
Full detail in Working in a client’s organization.
Next steps
- Browse the available tools.
- See usage examples on the MCP overview.
Keep learning
Connected? These two courses turn the tool list into workflows you actually run.
