---
title: "Codex MCP Setup (codex mcp add)"
description: "Add the 3D AI Studio MCP server to OpenAI Codex with codex mcp add, sign in once, and generate 3D models and images from the Codex CLI, IDE extension or app."
source: https://docs.3daistudio.com/mcp/setup/codex
---

# Codex MCP Setup

Add the 3D AI Studio MCP server to OpenAI Codex with codex mcp add, sign in once, and generate 3D models and images from the Codex CLI, IDE extension or app.

Codex can generate 3D models, images and materials while it works on your code. The **Codex CLI, the IDE extension and the Codex app share one configuration**, so you set up 3D AI Studio once and it works in all three.

New to 3D AI Studio? See the [3D model generation MCP](https://www.3daistudio.com/MCP) for what it can do and example results.

> [!NOTE]
> Want Codex to do the setup itself? Paste the brief from [Set Up With Your Agent](https://docs.3daistudio.com/mcp/agent-setup).

## What you need

- A **3D AI Studio account on a paid plan**.
- **Codex**, updated to a recent version (remote MCP servers with sign in need a current release).
- A browser on the same machine for the sign in.

> [!NOTE]
> **Commands not working?** Codex changes its MCP commands from time to time, so the steps below can go out of date. The quickest fix is to let Codex do it. Paste this into a session:

```text
Add the 3D AI Studio MCP server for me: https://mcp.3daistudio.com/mcp
(remote server, Streamable HTTP, OAuth sign in, no API key).
Follow https://docs.3daistudio.com/mcp-setup.md, and if your version works differently, use the current way to add a remote MCP server.
```

## Setup

### Add the server

Run:

```bash
codex mcp add 3daistudio --url https://mcp.3daistudio.com/mcp
```

If you prefer editing the configuration file, add this to `~/.codex/config.toml` instead:

```toml
[mcp_servers.3daistudio]
url = "https://mcp.3daistudio.com/mcp"
```

### Sign in

Codex opens a 3D AI Studio sign in page in your browser. If it does not, run:

```bash
codex mcp login 3daistudio
```

On the 3D AI Studio page:

1. Sign in with your 3D AI Studio account.
2. Under **Use credits from**, keep **Personal** or choose a team.
3. Click **Authorize**.

### Try it

Start a new Codex session and ask:

> "Use 3D AI Studio to make a low poly fox and give me the GLB link."

## Check that it worked

- Run `codex mcp list`. `3daistudio` should be listed.
- In a new session, ask: **"What's my 3D AI Studio credit balance?"**

## Keep the sign in healthy

Codex can run several sessions (terminals, editor windows, the app) on the same sign in. A few habits avoid sign in trouble:

- **If you are ever signed out**, run `codex mcp login 3daistudio` and authorize again.
- **If 3D AI Studio shows "Restart needed"** in [Settings → AI Assistants (MCP)](https://www.3daistudio.com/Dashboard?settings=mcp), one of your Codex sessions is still using an old sign in. Close all running Codex sessions and start a new one. Your connection itself is fine.
- **Update Codex** regularly. Newer versions handle sign ins across several sessions more reliably.

## Working with results

- Codex shows finished models and images as **links**. Open them in the browser or in your [dashboard](https://www.3daistudio.com/Dashboard), or ask Codex to download them into your project.
- To use a local image, Codex gives you a **link to an upload page**. See [Images & Uploads](https://docs.3daistudio.com/mcp/images-and-uploads).

## Codex specific fixes

| Problem | Fix |
| --- | --- |
| Codex keeps saying the server needs authentication | Run `codex mcp login 3daistudio`. If it keeps happening, close all Codex sessions, update Codex, and log in again |
| `codex mcp add` does not accept `--url` | Your Codex version is too old for remote servers. Update Codex |
| The tools do not appear in a session | Start a new session after adding the server. Check `codex mcp list` |
| You used another server name | Replace `3daistudio` in the commands with your name, for example `codex mcp login my-3d-server` |

More fixes are on the [Troubleshooting](https://docs.3daistudio.com/mcp/troubleshooting) page.

## Frequently Asked Questions

### Do the Codex CLI, IDE extension and app need separate setups?

No. They share the same Codex configuration, so adding 3D AI Studio once makes it available in all of them.

### Do I need an API key?

No. Codex signs in through your browser. Do not put tokens into `config.toml`.

---

> Documentation index for AI agents: https://docs.3daistudio.com/llms.txt
