# Setup: ChatGPT

***

## 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 > 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 to **Read-only**.

<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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gradient.works/kb/mcp/setup_chatgpt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
