> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect OpenAI Codex to ChatSyncs

> Step-by-step: add ChatSyncs to OpenAI Codex from the ChatGPT desktop app (Settings → MCP servers → Add server, Streamable HTTP, Authenticate), the Codex IDE extension, or the CLI (codex mcp add chatsyncs --url https://mcp.chatsyncs.com/mcp, then codex mcp login chatsyncs), pasting your API key on the ChatSyncs page; plus the equivalent ~/.codex/config.toml entry and how to remove it. All three share one config. Use when a customer asks how to use ChatSyncs from Codex, or how to configure Codex's config.toml for the ChatSyncs MCP server.

Use ChatSyncs from OpenAI Codex: in the ChatGPT desktop app, your code editor, or the terminal.

## Before you start

* **Codex installed and signed in**, as the ChatGPT desktop app, the Codex IDE extension, or the
  Codex CLI. Codex works with a ChatGPT plan that includes Codex, or an OpenAI API key.
* **Terminal route only:** to open a terminal, use the **Terminal** app on a Mac (Applications
  → Utilities) or **PowerShell** on Windows (Start menu). `~` means your home folder.
* **Your ChatSyncs API key**, from the
  [API Developer Console](https://platform.chatsyncs.com/api/developer/console).
  [How to find it](/mcp/api-key).

<Info>
  The Codex CLI, the Codex IDE extension and the ChatGPT desktop app **share one settings file**
  (`~/.codex/config.toml`). Set ChatSyncs up once and it's available in all three.
</Info>

## Connect

Pick the way you use Codex. All three end in the same place, because they share one settings
file.

<Tabs>
  <Tab title="ChatGPT desktop app">
    <Steps>
      <Step title="Open MCP settings">
        Open **Settings**, then select **MCP servers**, and click **Add server**.
      </Step>

      <Step title="Enter ChatSyncs">
        Name: `chatsyncs`. Type: **Streamable HTTP**. URL:

        ```
        https://mcp.chatsyncs.com/mcp
        ```

        Save it, then select **Restart**.
      </Step>

      <Step title="Sign in">
        Next to **chatsyncs**, select **Authenticate**. The ChatSyncs connect page opens in your
        browser, naming the app asking to connect. Paste your API key and click the blue
        **Authorize** button.
      </Step>
    </Steps>
  </Tab>

  <Tab title="IDE extension">
    <Steps>
      <Step title="Open MCP settings">
        In the Codex panel, open the gear menu, select **MCP servers**, and click **Add server**.
      </Step>

      <Step title="Enter ChatSyncs">
        Name: `chatsyncs`. Type: **Streamable HTTP**. URL:

        ```
        https://mcp.chatsyncs.com/mcp
        ```

        Save it, then select **Restart extension**.
      </Step>

      <Step title="Sign in">
        Next to **chatsyncs**, select **Authenticate**. Paste your API key on the ChatSyncs page
        that opens, and click **Authorize**.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Terminal (Codex CLI)">
    <Steps>
      <Step title="Add ChatSyncs">
        In a terminal, run:

        ```bash theme={null}
        codex mcp add chatsyncs --url https://mcp.chatsyncs.com/mcp
        ```
      </Step>

      <Step title="Sign in">
        Run:

        ```bash theme={null}
        codex mcp login chatsyncs
        ```

        Your browser opens the ChatSyncs connect page. Paste your API key and click the blue
        **Authorize** button. Close the tab when it says **Connected as *your business name***.
      </Step>

      <Step title="Confirm">
        Run `codex mcp list`. **chatsyncs** is listed. Inside Codex, `/mcp` shows it with its
        tools.
      </Step>
    </Steps>

    These steps are the same as adding this to `~/.codex/config.toml` and then running
    `codex mcp login chatsyncs`:

    ```toml theme={null}
    [mcp_servers.chatsyncs]
    url = "https://mcp.chatsyncs.com/mcp"
    ```
  </Tab>
</Tabs>

## Check it worked

Start Codex and ask:

> **"List my WhatsApp templates."**

Codex asks for approval to call the ChatSyncs tool, then lists your templates.

## Disconnect

```bash theme={null}
codex mcp logout chatsyncs
codex mcp remove chatsyncs
```

To cut off every app that has your key, [regenerate it](/mcp/api-key#revoke-access-regenerate-the-key).

## Frequently asked

<AccordionGroup>
  <Accordion title="Can I use my key instead of the browser sign-in?">
    Yes, but it's for technical users. Codex reads the key from an **environment variable** (a
    named value your computer passes to programs), so the key isn't written into the settings
    file:

    ```bash theme={null}
    codex mcp add chatsyncs --url https://mcp.chatsyncs.com/mcp --bearer-token-env-var CHATSYNCS_API_KEY
    ```

    You then have to make `CHATSYNCS_API_KEY` hold your key wherever Codex starts. Apps opened
    from the Dock or Start menu often don't see variables set in a terminal, so browser sign-in
    is the better choice for most people.
  </Accordion>

  <Accordion title="The browser didn't open, or I'm on a remote computer">
    Run `codex mcp login chatsyncs --no-browser`. Codex prints a link: open it on any device,
    paste your key and click **Authorize**. Your browser then lands on a `localhost` address that
    may show an error page. That's expected: copy that whole address from the address bar and
    paste it back into the terminal when Codex asks.
  </Accordion>

  <Accordion title="I set it up in the terminal. Do I need to repeat it in the app?">
    No. The ChatGPT desktop app, the IDE extension and the CLI read the same
    `~/.codex/config.toml`, so once it's added and signed in, it's in all three.
  </Accordion>
</AccordionGroup>

## Gotchas

<Warning>
  * **Forgot `--url`.** Without it, Codex treats the address as a program to run and fails.
    Remove it and add it again with `--url`.
  * **Listed but every action fails.** You haven't signed in yet. Select **Authenticate** in
    the app, or run `codex mcp login chatsyncs`.
  * **Hand-edited the file and Codex won't start.** A missing quote or bracket breaks the whole
    file. Compare your entry with the example above, character for character.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.