---
title: "Codex"
description: "Codex is an AI coding agent from OpenAI that can connect GPT models to the QuantConnect MCP Server."
canonical: https://www.quantconnect.com/docs/v2/ai-assistance/mcp-server/codex
markdown: https://www.quantconnect.com/docs/v2/ai-assistance/mcp-server/codex.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/09%20AI%20Assistance/08%20MCP%20Server/17%20Codex
modified: 2026-11-03
index: https://www.quantconnect.com/llms.txt
---

# Codex

[Documentation](https://www.quantconnect.com/docs/v2.md) > [AI Assistance](https://www.quantconnect.com/docs/v2/ai-assistance.md) > [MCP Server](https://www.quantconnect.com/docs/v2/ai-assistance/mcp-server.md) > Codex

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

Codex is an AI coding application from OpenAI that can connect GPT models to the [QuantConnect MCP Server](https://www.quantconnect.com/docs/v2/ai-assistance/mcp-server/key-concepts.md). This page explains how to set up and use the server with the Codex app.

## Getting Started

To connect Codex to the QC MCP Server, follow these steps:

1. Install and open the [Codex app](https://chatgpt.com/download/).
2. Sign in with your ChatGPT account.
3. In the left navigation bar, click **Plugins**.
   ![Codex Plugins page with an arrow highlighting the Customize icon in the left navigation bar](https://cdn.quantconnect.com/i/tu/codex-mcp-open-plugins.png)
4. On the Plugins page, click **Add > Add custom MCP server**.
   ![Codex Plugins page with an arrow highlighting the Add custom MCP server item in the Add menu](https://cdn.quantconnect.com/i/tu/codex-mcp-add-custom-mcp-server.png)
5. In the Add custom MCP server form, enter a name for the server, enter the MCP server URL (https://www.quantconnect.com/api/v2/mcp), and then click **Create as a plugin**.
   ![Codex Add custom MCP server form with the QC MCP Server details filled in](https://cdn.quantconnect.com/i/tu/codex-mcp-form.png)
6. In the Connect QuantConnect window, click **Connect QuantConnect**.
   ![Codex Connect QuantConnect window with an arrow highlighting the Connect QuantConnect button](https://cdn.quantconnect.com/i/tu/codex-mcp-connect-to-qc.png)
   Codex opens a page in your default browser. If you sign into your QuantConnect account with a different browser, update your computer's default browser application and then repeat this step.
7. In the Authorize MCP Server form, select the organization you want to connect to and then click **Authorize**.
   ![QuantConnect form to Authorize MCP Server connection](https://cdn.quantconnect.com/i/tu/authorize-mcp-server.png)

## Models

Codex supports several GPT models you can use. To change the model, click the model and reasoning control beneath the chat window, and then click the name of the model to use.

![Arrow clicking the model name in the Chat panel of Codex, showing the list of available models.](https://cdn.quantconnect.com/i/tu/codex-change-model.png)

To view all the available models, see [Models](https://learn.chatgpt.com/docs/models) in the Codex documentation.

## Quotas

There are no quotas on the QuantConnect API, but the Codex has some. To view the quotas, see [Pricing](https://learn.chatgpt.com/docs/pricing) in the ChatGPT documentation.

## Troubleshooting

The following sections explain some issues you may encounter and how to resolve them.

### Service Outages

The MCP server relies on the QuantConnect API and the client application. To check the status of the QuantConnect API, see our [Status](https://status.quantconnect.com/) page. To check the status of Codex, see the [OpenAI Status](https://status.openai.com/) page.

## Examples

The following examples demonstrate the MCP server with Codex.

### Example 1: Hello World

To test the server and client are working and connected, enter the following prompt into the Codex chat:

> > Read the open project.

The agent calls the `read_open_project` tool.
