Set up Argorant in Codex

MCP where available, REST or CLI everywhere else.

Codex is a coding agent, so it reaches Argorant the same way it reaches any other service: through the MCP server if the runtime supports MCP, otherwise through the REST API or the CLI.

MCP path

Add https://mcp.argorant.com/mcp as an MCP server in your Codex configuration and complete the OAuth sign-in when prompted. Codex then sees counts, previews, list management, reveals and exports as separate tools.

Key path

Put the key in the environment rather than in a prompt or a committed file:

export ARGORANT_API_KEY=ag_live_...
npx argorant whoami --json

whoami prints the account, the key's scopes and the daily quota, which is the fastest way to confirm the wiring before you let the agent loop.

The steps for adding the Argorant MCP server to Codex
The steps for adding the Argorant MCP server to Codex

Rules to give it

  • Counts, searches and previews are free and unlimited. Explore first, always.
  • reveal and export spend credits. In a non-interactive session there is no confirmation prompt at all.
  • Check -n before any spending command. A limit is a budget.
  • Branch on exit codes rather than parsing text: 0 ok, 2 auth, 3 scope, 4 rate limit, 5 upgrade required.

Codex works against the same account as your web app, so anything it exports shows up under Exports for you to download again.

Still stuck? support@argorant.com