> 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

Connect Gradient Works to ChatGPT Web or Codex Desktop

## 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-ff099ba0041eb05e559fa370f0b881aef93c30cc%2Fmcp-chatgpt-developer-mode.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click **Create app**.

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-a66ea596fd48413deabe3bd82fc7d71d49f8e52b%2Fmcp-chatgpt-create-app.png?alt=media" 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

### Set up with the Gradient Works plugin

The Gradient Works plugin configures the MCP and installs the included Gradient Works skills.

#### Ask your agent to set it up

Paste the following text into your agent:

```
Can you help me set up Gradient Works by following this guide?
https://github.com/Gradient-Works/agent-plugins/blob/main/GETTING_STARTED.md
```

#### Install it yourself

From the Codex CLI, run:

```shell
codex plugin marketplace add Gradient-Works/agent-plugins
codex plugin add gradient-works@gradient-works-plugins
codex mcp login gradient-works
```

The login command opens browser authentication. For installation through the Codex app, see the [agent-plugins README](https://github.com/Gradient-Works/agent-plugins/blob/main/README.md).

### Set up the MCP directly with an 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-b860256fe1dbd4debe2c2108c6b6e5ea46a35164%2Fsettings-api-keys.png?alt=media" 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-ccb068b8464cc7b6cd4acb8a1c0f35cb230929a3%2Fcreate-api-key-chatgpt.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-ebeb8e5328ae42dd2b6ade5235be1dcc70fe5a24%2Fapi-key-created.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Add the MCP server

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

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-826f771c49b58201592c85096e9be8ad29e88007%2Fmcp-codex-mcp-servers.png?alt=media" 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-263b4b7e4930d3a01e29c01b15b56dad1918f0ef%2Fmcp-codex-server-form.png?alt=media" alt=""><figcaption></figcaption></figure>
