> ## Documentation Index
> Fetch the complete documentation index at: https://f82cc46-productmetrics.manicule.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://f82cc46-productmetrics.manicule.dev/docs/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://f82cc46-productmetrics.manicule.dev/docs/api/mcp.
> Every agent surface: https://f82cc46-productmetrics.manicule.dev/docs/.well-known/llms-manifest.json

# Product Metrics in ChatGPT and Codex (/docs/integrations/chatgpt)

<!-- agent-signals: reading_time_min: 4 · est_tokens: 1618 · updated: 2026-11-16 -->
Related: [Product Metrics in Claude and Claude Code](/docs/integrations/claude-code.md), [Product Metrics in Claude Desktop and Cowork](/docs/integrations/claude-desktop.md), [Product Metrics in Cursor](/docs/integrations/cursor.md), [Quickstart](/docs/quickstart.md)

> Add the Product Metrics MCP server to ChatGPT as a developer-mode app or to the Codex CLI, sign in through your browser, and ask about your store and Google Ads.

Give ChatGPT or Codex your stores, products and Google Ads account, and let it run Product Metrics setup for you. Set up the app you use; you don't need both.

| Setting         | Value                                                                     |
| --------------- | ------------------------------------------------------------------------- |
| **Server name** | `Product Metrics` in ChatGPT, `product-metrics` in Codex                  |
| **Server URL**  | `https://www.productmetrics.io/mcp`                                       |
| **Sign-in**     | Browser sign-in to Product Metrics (OAuth), then **Connect**. No API key. |

`https://www.productmetrics.io/mcp` is a client setting, not a page to open in a browser.

## ChatGPT

### 1. Turn on developer mode

In ChatGPT, open **Settings → Apps**, then **Advanced settings**, and turn on **Developer mode**.

### 2. Create the app

Click **Create app** and fill in:

| Field              | Value                               |
| ------------------ | ----------------------------------- |
| **Name**           | `Product Metrics`                   |
| **MCP server URL** | `https://www.productmetrics.io/mcp` |
| **Authentication** | **OAuth**                           |

Click **Create**. `productmetrics mcp-config --client chatgpt` prints the same steps.

### 3. Sign in and approve

ChatGPT opens a Product Metrics page that names ChatGPT and lists what it **Can read** and **Can change**. Signed out, click **Continue with Google** (it creates an account if you have none) or **Sign in** under the card. Then click **Connect ChatGPT**.

### 4. Use it in a chat

In a new chat, add **Product Metrics** from the tools menu, then try:

```text
Where is my Product Metrics setup, and what is the next step?
```

## Codex

### 1. Add the server

Run this in your terminal:

```bash
codex mcp add product-metrics --url https://www.productmetrics.io/mcp
```



**Prefer to edit config.toml?** Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.product-metrics]
url = "https://www.productmetrics.io/mcp"
```

### 2. Sign in and verify

```bash
codex mcp login product-metrics
```

Your browser opens the Product Metrics consent page: click **Connect Codex**. Restart Codex, then try:

```text
Which Product Metrics stores can I open, and what is left to set up?
```

### 3. Optional: skills and the CLI

Skills give Codex the exact steps for tasks such as setting up tracking. The `productmetrics` CLI gives it the same API as commands with JSON output.

```bash
npx skills add https://www.productmetrics.io/docs --skill '*' --agent codex -y
npm install -g @productmetrics/cli
```

Run `productmetrics login` in your own terminal, not through Codex, and set `PM_AGENT=1` so `productmetrics` never prompts. Details: [For agents](/docs/mcp/for-agents) and [CLI for agents](/docs/cli/for-agents).

## What you can ask

```text
"Where is my Product Metrics setup, and what is the next step?"
→ execute (GET /setup/status)

"Connect my WooCommerce store to Product Metrics."
→ execute (POST /companies/:companyId/stores); the setup token shows in
  the Product Metrics app, not in the chat

"Create the Product Metrics conversion actions in Google Ads."
→ execute (POST /properties/:propertyId/google-ads/conversion-actions)

"Which products spend without returning anything?"
→ list_properties, then get_google_ads_report (level: product,
  only_without_conversions: true)

"Why did my Google Ads conversion value drop since Monday?"
→ list_properties, then explain_google_ads_change
```

Analysis tools only read: they never change Google Ads or your store. Operations that delete something run only after you confirm, and steps that need you in a browser (Google consent, a store install) come back as a link. Every tool: [MCP tools](/docs/mcp/tools).

To give ChatGPT or Codex one store only, use `https://www.productmetrics.io/mcp?selectedAccountPropertyId=<propertyId>` as the URL.

## Troubleshooting

| Problem                                                                           | Fix                                                                                                                                                |
| --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Create app** is missing in ChatGPT                                              | Turn on **Developer mode** first.                                                                                                                  |
| Codex says the server needs sign-in                                               | Run `codex mcp login product-metrics` and finish the sign-in in the browser.                                                                       |
| "This connection expired or was removed; connect Product Metrics again."          | Sign in again: from the app's settings in ChatGPT, or `codex mcp login product-metrics`. If that fails, remove the app or server and add it again. |
| "This connection only has MCP access, so it cannot call the Product Metrics API." | Remove the app or server, add it again and allow everything the consent page shows.                                                                |
| "The MCP server is not enabled for this account yet."                             | Ask Product Metrics support to turn it on for your account.                                                                                        |
| "This property needs a Product Metrics Pro subscription for the MCP server."      | Upgrade that store to Pro, or ask about another store.                                                                                             |
| `productmetrics` can't reach the API from Codex                                   | Codex's sandbox may block network access for commands. Allow it for this session, or run `productmetrics` outside the sandbox.                     |

## More

* [Get started](/docs/mcp/overview) with Product Metrics MCP in other clients.
* [For humans](/docs/mcp/connect): the consent page and browser sign-in in detail.
* [MCP tools](/docs/mcp/tools): what each tool does, with its arguments.
