> ## Documentation Index
> Fetch the complete documentation index at: https://docs.9pic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Add the 9Pic AI MCP server to the OpenAI Codex CLI or IDE extension.

## Overview

Developers using **OpenAI Codex** can add the 9Pic AI MCP server to the Codex CLI or IDE extension. Codex then has the same tools as the [ChatGPT plugin](https://docs.9pic.ai/integrations/ai-assistants/chatgpt.md) and signs you in through your browser.

> [!NOTE]
>
> You need a 9Pic account. The server works on every 9Pic plan, including Trial, and only reaches the organisations and events your dashboard role allows.

## Add 9Pic AI to Codex

> [tab] Codex CLI
>
> Add the server, then sign in:
>
> ```bash theme={null}
> codex mcp add 9pic-ai --url https://mcp.9pic.ai/mcp
> codex mcp login 9pic-ai
> ```
>
> Your browser opens the 9Pic sign-in page. After you approve, run `codex mcp list` to check that `9pic-ai` is connected.
>
> You can also add the server to `~/.codex/config.toml`:
>
> ```toml theme={null}
> [mcp_servers.9pic-ai]
> url = "https://mcp.9pic.ai/mcp"
> ```

> [tab] Codex IDE extension
>
> 1. Open the gear menu and choose **MCP servers**.
> 2. Choose **Add server**, enter the name `9pic-ai`, select **Streamable HTTP** and enter `https://mcp.9pic.ai/mcp`.
> 3. Save, then choose **Restart extension**.
> 4. Choose **Authenticate** and sign in with your 9Pic account.

## Try It

Ask Codex *"List my 9Pic AI organisations."* If you see your organisations, the server is connected. See [Tools and Safeguards](https://docs.9pic.ai/integrations/ai-assistants/tools.md) for everything it can do.

## Disconnect

Run `codex mcp logout 9pic-ai` to sign out, or `codex mcp remove 9pic-ai` to remove the server completely.

## Next Steps

> [card] [Tools and Safeguards](https://docs.9pic.ai/integrations/ai-assistants/tools.md)
>
> What Codex can do in your account and when it asks first.

> [card] [Fix Connection Issues](https://docs.9pic.ai/integrations/ai-assistants/troubleshooting.md)
>
> Sign-in, expired connections and permission errors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.