Guide

Connect Codex and AI assistants through MCP

Preview guide

Paste into an AI assistant to help with integration. Documentation and examples only; no real credentials.

Preview guide

Connect Codex and AI assistants through MCP

Direct answerConnect and authorize, then verify account access. Query documentation when the site makes it available. Confirm each paid call or key change.

Updated · Reviewed

Connect this site's MCP server in Codex

Each customer connects using their own site account. Codex desktop does not require customers to obtain a Client ID, Client Secret, system token or API Key.

Codex desktop: connect in three steps

MCP address: https://YOUR_MCP_HOST/mcp. If YOUR_MCP_HOST is shown, an enabled, valid MCP configuration is unavailable; ask the administrator for the address before connecting.

  1. In Codex desktop settings, add an HTTP MCP server named Tuzi with this URL. Leave the Bearer token environment variable and all additional headers empty, then save.
  2. Click the server's login or authorization action. Sign in on this site, review the account and requested permissions, and approve. The client handles registration, callback and token storage.
  3. After the website confirms authorization, return to Codex, enable Tuzi and open a new conversation. Send the verification prompt below. Paid model calls and key changes still require individual approval on this site.

Enter passwords only on the site's login page. Do not paste system tokens, full API Keys or client secrets into chat or the Bearer environment-variable field. The assistant selects an owned API Key ID; the server retrieves the credential.

Cannot save? Ask Codex to connect

If saving shows “MCP server settings unavailable”, try the CLI alternative below. That message alone does not establish a server outage or mean you need a system token. Confirm the endpoint first; do not run examples showing YOUR_MCP_HOST.

Copy this instruction into a Codex conversation:

Help me connect Tuzi MCP at https://YOUR_MCP_HOST/mcp.
Inspect the MCP configuration used by this Codex first. Reuse an existing entry with the same URL and its actual name; do not duplicate or overwrite other connections.
If none exists, run: codex mcp add tuzi --url 'https://YOUR_MCP_HOST/mcp'
If tuzi is already used for a different URL, choose an unused name and use it consistently in subsequent commands.
If authorization does not start automatically, run: codex mcp login tuzi (using the actual name).
Open the authorization page for me to approve personally. Do not set a system token, Bearer environment variable or extra headers.
Use the same computer, user and configuration directory as the desktop app.
After authorization, remind me to verify account access in a new conversation. Verify documentation separately if the site enables it.
Do not create or change API Keys or make paid calls.

Alternatively, use a local terminal with Codex CLI installed. Run codex mcp list first to check for the same URL. Add it only if absent. If tuzi is already used for a different URL, choose an unused name; reusing it replaces that connection:

codex mcp add tuzi --url 'https://YOUR_MCP_HOST/mcp'

Adding may start authorization automatically. Only if it does not, run the following, replacing tuzi with the actual entry name:

codex mcp login tuzi

If codex is not found, install or update the official Codex CLI and reopen the terminal. CLI and desktop must use the same user and configuration directory; a remote terminal configuration may not affect your local desktop. Customers do not need to enter a Client ID or Client Secret.

Approve personally on the website, return to the desktop app and open a new conversation for the read-only verification below. A successful command, saved configuration or opened consent page is not proof of connectivity. If it still fails, share the error text and client version with support, never credentials.

ChatGPT web: use your workspace app

Entry points and read/write permissions depend on your ChatGPT plan and workspace policies. Not every account can create connections or run paid tools.

  1. Find Tuzi MCP in your workspace’s plugins or apps and connect it. Ordinary members do not need a Client Secret. If the app is missing, an authorized person must create it: Plugins → plus button → Add custom MCP server, or Settings → Apps → Create in the legacy interface.
  2. The person setting it up enters Tuzi, the URL https://YOUR_MCP_HOST/mcp, and OAuth authentication. This site requires a preconfigured trusted application for web clients: obtain a dedicated Client ID / Client Secret from the site administrator, and have them register the exact callback requested by the client. These are not system tokens or model API Keys; do not send them in chat. Review the warning, create, authorize and inspect the discovered tools. Legacy interfaces use Scan Tools before Create. A workspace administrator must test and publish apps intended for members.
  3. Each user signs in and authorizes their own site account. Install or enable the app, start a new conversation, type @ and select Tuzi, then send the prompt below. Select the app again when a follow-up needs new data or another action.

If the creation entry point is missing, contact your workspace administrator. See the official ChatGPT instructions for current availability. Existing manual integrations remain supported; do not reuse desktop callback settings for web clients.

Verify the connection

Send:

Use Tuzi MCP to look up the username and balance of my currently authorized account. Read only: do not generate content or change API Keys.

  • A successful account query verifies the account connection: Tuzi MCP returns your own username and balance, matching the account you signed into on this site.
  • Documentation queries depend on whether the site makes documentation available. When enabled, separately ask for the API overview and a source link. documentation is disabled means the site has disabled document access; it does not invalidate the verified account connection and does not require reauthorization. Contact the administrator if needed.
  • If account queries say unauthorized, account authorization is incomplete; sign in again. If a different account is returned, revoke the connection or authorize again. Successful documentation queries do not verify account access.

These are results you must check, not automatic checks passed by the tutorial. Saving configuration does not prove connectivity. Verification does not generate paid model content; the assistant platform’s own usage charges still follow its rules.

Other clients

The client must support remote HTTP MCP and OAuth. Compatible native loopback registration can sign in directly; fixed callbacks or client secrets require an administrator-configured trusted application. Other clients have not been individually tested; verify their actual query results.

Initial capabilities and limits

  • Documentation: overview, search, full parameters and examples, source URLs and revisions.
  • Account: own balance, model catalog and displayed prices, paginated usage logs for a range of up to 31 days.
  • API Keys: new connections request keys:read / keys:write. After website consent, find your own Key settings or prepare creation, partial updates and deletion. Full secrets stay on the server; changes still require individual website approval.
  • Text: non-streaming POST /v1/chat/completions.
  • Images: POST /v1/images/generations, requesting URL output; retrieve asynchronous results by request_id.

The initial release exposes 15 tools by default and excludes video submission and polling. Video API documentation remains searchable. Video tools appear only after the administrator separately enables and validates them. Use the connected server's current tool list.

The model must support the chosen protocol. Account and key permissions, limits, balances and channel availability still apply. Documentation for other protocols is searchable, but not every protocol is an execution tool. Audio, realtime WebSocket, multipart image editing and administrative operations are outside this initial release.

Generate images with your own API Key

After confirming Key read/write permissions on the website, send:

Use Tuzi MCP to read the image generation guide, check the site model allowlist and find my own eligible API Keys. Prepare an image of a rabbit on the moon. Tell me the selected model and Key name, give me the approval link, and execute only after approval.

  1. The assistant calls get_account for the model allowlist and MCP quota limits, reads the image endpoint documentation, and calls list_api_keys to find your Keys. Optional query filters by name. You do not need to copy a Key ID or secret.
  2. Select an enabled, unexpired Key with positive finite quota within the MCP limit, respecting model and group restrictions. Confirm a name when several Keys qualify. If none qualify, agree on a finite quota and separately approve create_api_key; never silently change an existing Key.
  3. Call generate_image with the selected Key ID and a site-allowed model supporting POST /v1/images/generations. Open the returned website approval link and confirm.
  4. Return to the conversation to continue. The assistant calls execute_action, then get_action for the original operation. For asynchronous images, call get_image_result with the same Key ID and returned request_id, then display the result link.

Existing connections retain their grants; permissions are never silently expanded. If Key access is missing, authorize again. If the client retains old scopes or restricted registration, remove its configuration, add it again and confirm website consent. Clients supporting custom scopes can explicitly request:

codex mcp login Tuzi --scopes docs:read,account:read,keys:read,keys:write,inference:write,tasks:read,offline_access

Replace Tuzi with the configured server name. Read-only clients can explicitly request docs:read account:read offline_access. Insufficient permissions do not mean a disconnected server; never provide system tokens or full secrets to bypass authorization. If documentation is disabled, obtain verified model protocols and parameters from the site first; account queries can still verify the connection independently. Unlimited-quota Keys cannot be used directly for MCP paid calls. Actual charges follow the site's billing rules.

Confirm and retrieve results

Each key change or paid call first creates an action awaiting confirmation. Open the site's approval link, inspect the account, model, API Key ID and request parameters, then confirm within 15 minutes. Return to the same conversation and say: “I approved this on the website. Please continue with the original action.” Approval alone does not execute it. Ask the assistant to continue and check the original result.

Model execution initially returns an executing state; use get_action to retrieve the saved result. Repeated calls for the same action do not execute it again. For executing or unknown outcomes, inspect usage logs and task results before taking further action. Do not automatically create an identical paid action. Task acceptance does not mean generation has completed; continue polling with the task ID.

If an output exceeds MCP response limits, inspect it on the website instead of generating again. Account data and operation results are limited to the authorized connection.

Disconnect and troubleshoot

Revoke authorization on the MCP connections page. Account queries should then be rejected; public documents may remain readable. Requests already running may finish and incur charges. Disconnecting does not delete existing API Keys.

For connection issues, check that MCP is enabled, its public HTTPS endpoint is reachable, Codex has completed authorization (manual clients also need an exactly registered callback), and the account and required scopes are valid. Documentation tools respect the site's document access policy, including login requirements.

Security limits and retention

Paid calls require an administrator-approved model and an owned, finite-quota API Key within the site's MCP limit. MCP cannot enable unlimited quota. Text calls accept text-only messages, with an output limit of 8192 tokens. Images are capped at four per call. If the administrator separately enables video tools, videos are capped at twelve seconds and reference-media URLs require an explicitly trusted HTTPS host. Model-specific limits may be stricter.

Only one MCP operation may execute per account at a time. The default limit is 30 executions per UTC day, including key changes, and is configurable by the administrator. Request-size and key-quota limits are not a price quote; the gateway settles actual charges. The account tool exposes the current MCP policy.

Account data and results are sent to the authorized assistant. MCP stores operation content encrypted, stops serving it after seven days, and removes it in background batches. Existing gateway logs, providers and chat platforms follow their own retention rules. Changes to key routing or permissions require a newly reviewed operation.

Use cases

  • Find API integration documentation
  • Approve model calls for your account

API protocols

  • /mcp

FAQ

Should I enter my system token in the Bearer field?

No. Leave it empty in Codex and sign in through OAuth. Customers do not need a Client ID, Client Secret or environment variables.

Should I give the assistant my full API Key?

No. The assistant uses a key ID; full credentials remain on the server.

Why confirm on the website?

Key changes and paid calls affect your account. The page shows the specific action; approval alone does not execute it.

Should I regenerate after a timeout?

Do not create another identical paid action. Check the original action, usage and task results first to avoid duplicate charges.

Official sources

  1. OpenAI MCP authentication Official
  2. Connecting custom MCP servers in ChatGPT Official