Connect Codex CLI to your store
OpenAI Codex CLI is an agentic terminal that combines Claude/ChatGPT-like reasoning with a live shell. Add Shopigent's MCP tools and your store becomes accessible from any terminal session.
Prerequisite: You've installed Shopigent and generated a connection key on the dashboard. The button is Generate connection key, or Regenerate connection key when one already exists. See Getting Started.
1. Configure Codex CLI
Codex reads MCP servers from ~/.codex/mcp.json:
{
"mcpServers": {
"shopigent": {
"url": "https://mcp.shopigent.greeknous.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Start Codex:
codex
2. Prompts for Codex
Codex is built for engineering workflows. Try:
Use shopigent to export all my product titles, prices, and inventory
counts to a CSV file called inventory-export.csv.
Find every product whose description mentions "cotton" and replace
it with "organic cotton". Preview with dryRun first.
3. Bulk operations
Run a dry-run discount: create a 15% off code called FALL15 for all
products in the "Fall Collection" collection. If it looks right,
confirm it.
List products where compareAtPrice < price (sale is inverted).
Fix each one.
Troubleshooting
- Config not found — ensure
~/.codex/mcp.jsonhas valid JSON. - Tool calls return 401 — the key expired. Generate a new one.
- Rate-limited — Free plan: 25 calls/day. Upgrade to Growth or Pro for higher limits.