Codex CLI MCP Setup
Connect Codex CLI to Plushcap with a Bearer token or OAuth.
Codex CLI
Codex CLI supports Bearer-token and OAuth authentication for Streamable HTTP MCP servers. A Bearer token avoids periodic interactive OAuth login.
Recommended: Bearer token
Create or copy your Plushcap API key from your account, make it
available in the environment that launches Codex, and configure
~/.codex/config.toml:
export PLUSHCAP_API_KEY="your-api-key-here"
[mcp_servers.plushcap]
url = "https://mcp.plushcap.com/mcp"
bearer_token_env_var = "PLUSHCAP_API_KEY"
Restart Codex after updating the environment or configuration. The TOML file contains only the environment-variable name. The key remains valid until it is regenerated, deleted, or explicitly expired.
OAuth quick start
codex mcp add plushcap --url https://mcp.plushcap.com/mcp
codex mcp login plushcap
Complete authorization in the browser. Plushcap issues one-hour access tokens and rotating refresh tokens with a 90-day lifetime, but Codex may ask you to authenticate again if its stored refresh credential expires or is unavailable.
Always use --url. Without it, Codex can interpret the URL as a local stdio
command instead of a remote HTTP server.
Verify
codex mcp list
In the Codex TUI, use /mcp, then try:
Use Plushcap to compare companies in the latest competitive-space report.
For 401 Unauthorized, verify that PLUSHCAP_API_KEY is set in the environment
that launched Codex and that the key is active.
Official documentation
Last verified: July 29, 2026.