> For the complete documentation index, see [llms.txt](https://docs.gradient.works/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gradient.works/kb/mcp/setup_chatgpt.md).

# Setup: ChatGPT or Codex

## ChatGPT Web

{% hint style="info" %}
ChatGPT requires Developer Mode to add custom MCP servers.
{% endhint %}

1. Go to **Settings > Apps > Advanced Settings**.
2. Enable **Developer Mode**.

<figure><img src="/files/bOGtrn4iGVJzG8Yq0zEZ" alt=""><figcaption></figcaption></figure>

3. Click **Create app**.

<figure><img src="/files/6F9XUXiITUeIZOnqslSA" alt=""><figcaption></figcaption></figure>

4. Fill in the app details:
   * **Name:** Gradient Works
   * **MCP Server URL:** `https://agents.gradient.works/mcp`
5. Acknowledge the developer mode warning and continue.
6. Sign into Gradient Works with your Gradient Works credentials.

***

## Codex Desktop (API Key)

{% hint style="info" %}
Codex Desktop without command-line access supports API Keys only.
{% endhint %}

### Get a Gradient Works API Key

1. In Gradient Works, go to **Settings > Security > API Keys**.

<figure><img src="/files/32URXMGbK9Qc8sGmQukk" alt=""><figcaption></figcaption></figure>

2. Click **Create API Key**, optionally give your key a name and set the access level, then click **Generate Key**.

<figure><img src="/files/Cz8B5m8JSG49Lw4oLLr7" alt=""><figcaption></figcaption></figure>

3. Copy and store your API key securely — it will only be shown once.

<figure><img src="/files/ZeRA5J5qP0qiQRob82j7" alt=""><figcaption></figcaption></figure>

### Add the MCP server

1. Go to **Settings > MCP servers**.

<figure><img src="/files/JBVfjnLQFHixscW1sArH" alt=""><figcaption></figcaption></figure>

2. Add a new server with the following settings:
   * **Name:** Gradient Works
   * **Type:** Streamable HTTP
   * **URL:** `https://agents.gradient.works/mcp`
   * **Bearer token env var**: Your GW API key (*gw\_live\_XYZ*)

<figure><img src="/files/ka57Hd2CIqLnY6kSX5vt" alt=""><figcaption></figcaption></figure>
