Prerequisites
OpenAI Codex
Install Codex CLI
Service Account Token
Create a service account with appropriate permissions
For the latest MCP configuration options, refer to the official OpenAI Codex documentation.
Configuration
Step 1: Set the Environment Variable
Add your service account token as an environment variable:- macOS/Linux
- Windows
~/.bashrc, ~/.zshrc, or your shell configuration file, then reload your shell or run source ~/.zshrc.Step 2: Add the MCP Server
Use thecodex mcp add command to register the Control Plane MCP Server:
Step 3: Verify the Connection
List your configured MCP servers to confirm the setup:cpln in the list of configured servers.
Managing MCP Servers
Example Usage
1
Set Context
2
Deploy a Workload
3
Get the Endpoint
Troubleshooting
Authentication errors
Authentication errors
- Ensure the
CPLN_TOKENenvironment variable is set in your shell. - Check that your service account token is valid.
- Ensure the token is entered without extra spaces or quotes.
- Verify the token has appropriate permissions (see Service Account Permissions).
- Check for typos in the org name you’re using for context, this is a common cause of authentication failures.