Codex CLI Setup

Last updated February 24, 2026Published February 24, 2026

Use InsightfulPipe with OpenAI's Codex CLI to query your marketing data from the terminal.

Requirements

  • Node.js installed on your machine.
  • At least one active connector inside InsightfulPipe.

Setup Steps

  1. **Install Codex CLI**:

```

npm install -g @openai/codex

```

  1. **Add the MCP server** — OAuth starts automatically when you run:

```

codex mcp add google-ads-mcp --url https://google-ads.insightfulmcp.com/

```

  1. **Authorize access** — a browser window opens. Log in and click **Authorize access** to complete the connection.

Start a new Codex session and ask questions about your data.

Tips

  • The server name (e.g., `google-ads-mcp`) is how Codex CLI identifies the connection. Keep it short and descriptive.
  • Add multiple servers for different platforms — one command per server.
  • If authentication expires, remove and re-add the server.

Unified MCP Server

Instead of adding individual servers, you can add the unified endpoint that gives access to all your connected platforms at once:

codex mcp add insightfulpipe-mcp --url https://main.insightfulmcp.com/

Example Prompts

  • "Use Google Ads to show my top 5 campaigns by spend this month."
  • "What's my Instagram follower growth over the past 30 days?"
  • "Compare TikTok Ads and Facebook Ads CPA for Brand A."