# How do I connect a ChatGPT or Codex app?

Check the current product's MCP configuration and organization policy for a supported remote HTTP connection and credential-header option. Do not assume the web and desktop forms expose identical authentication fields or that a field named environment variable expects the token itself.

The [Connect an AI Agent](https://docs.closemagnet.com/connect-an-agent) guide includes source-checked Codex configuration examples and the fixed CloseMagnet requirements. Use current official product instructions for your specific app. An OAuth-only form is not compatible with this endpoint's fixed credential-header setup as shown.

Read online: https://docs.closemagnet.com/articles/questions/how-do-i-connect-the-chatgpt-desktop-app
