# Codex Integration Guide

{% embed url="<https://openai.com/codex/>" %}

## 1. Add Codex to VS Code

* Open **VS Code → Extensions**.
* Search for **“Codex – OpenAI’s coding agent”** (publisher: OpenAI).
* Click **Install**.
* If Codex doesn’t appear immediately, **restart VS Code**.

After install, you’ll see **Codex** in the left sidebar; you can also drag it to the **right sidebar** if you prefer.

## 2. Sign in (connect your account)

After installation, the extension will prompt you to sign in. You can use **ChatGPT account.** \
\
if extension does not show up in your sidebar, hit `CTRL + SHIT + P` and enter `Codex:Open Codex Sidebar` and click. \
\
The Codex chat window will be displayed.&#x20;

## 3. Connect to Humanity Gitbook MCP

1. At the top right side of the Codex chat window click on the **gear icon** and select **MCP Settings** **→ Open MCP Settings.**
2. Under **Custom Server** click **Add Server.**
3. Choose a name and click on **Streamable HTTP.**  Leave all other fields as default.
4. For the **URL** insert [**https://docs.humanity.org/\~gitbook/mcp**](https://docs.humanity.org/~gitbook/mcp) and click **Save.**

<figure><img src="https://383350980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL1EBectYBMnvu9vU5N1M%2Fuploads%2FF9dAzu613PMUOwejK19A%2FScreenshot%20From%202026-02-16%2012-40-56.png?alt=media&#x26;token=8f910744-acd3-4e07-ac08-606937be94eb" alt=""><figcaption></figcaption></figure>

5. Make sure the server is active (switch button is on) and wait for the synchronization to complete.&#x20;

<p align="center"><img src="https://383350980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL1EBectYBMnvu9vU5N1M%2Fuploads%2Fas7Ut4Z5CeVi3BYTCEb3%2FScreenshot%20From%202026-02-16%2012-45-07.png?alt=media&#x26;token=17ee35b7-133e-4162-a424-93a0767b74f7" alt="" data-size="original"><br></p>

<p align="center"></p>

## 4. Scope Codex's output

When prompting Codex, include:

* A reference to the name of the MCP server you use to connect with Gitbook.
* The desired outcome (e.g. OAuth login + preset verification).

Example:

```
Use the <name_of_your_mcp_server> and give me an example on how to connect with the SDK / API
```
