Claude Code, Codex and the realytix CLIPro+AI
Use Realytix from the terminal: add the MCP server to Claude Code or Codex, or install the realytix CLI for coding agents and your own scripts.
Two ways in
- Claude Code or Codex as an MCP client: the agent talks to the Realytix server directly. Nothing to install.
- The
realytixCLI: a command you (or a coding agent) run in the terminal. It prints JSON, so it works in scripts, pipes and any agent that can run shell commands. The CLI is itself an MCP client of the same server: same tools, same allowances, same account.
Both need a Realytix account on the Pro+AI plan. realytix mcp-config prints every snippet on
this page with the current server address.
Claude Code
- In a terminal, add the server:
claude mcp add --transport http realytix https://mcp.realytix.io/mcp
Add --scope user to make it available in every project instead of the current one.
- Start
claude, type/mcp, select realytix and choose Authenticate. Your browser opens realytix.io. - Sign in to Realytix if asked, review what Claude Code can access, and click Allow. Back in the terminal, the server shows as connected.
- Ask away: "Pull the last 12 months of price and rank history for the ASINs in
asins.txtand write a CSV." Claude Code asks you before it runs a tool that writes to your workspace or spends your AI allowance.
To remove it: claude mcp remove realytix, then Disconnect under Account › Connections ›
Connected apps in the web app.
Codex
- Add the server to
~/.codex/config.toml:
[mcp_servers.realytix]
url = "https://mcp.realytix.io/mcp"
- Start Codex. On the first call to a Realytix tool it opens your browser to sign in; click Allow on realytix.io.
If your Codex version does not support remote MCP servers with sign-in, use the CLI below instead: it is the recommended path for coding agents.
The realytix CLI
Install and sign in
Requires Node.js 22 or later. The package is published as @realytix/cli:
npm install -g @realytix/cli
realytix login
realytix login opens realytix.io in your browser. Sign in if asked, review what the CLI can
access and click Allow; the browser tab says the CLI is signed in and the terminal prints
"Signed in as --no-browser). The session is stored under
~/.config/realytix (files readable by you only) and refreshed automatically.
realytix whoami: the signed-in account, plan, AI allowance, credits and marketplaces.realytix logout: revokes the connection on the server and deletes the local session.
Call a tool
Every tool of the MCP tools reference is a subcommand, written with
hyphens (get-product; the underscore form get_product also works). Parameters are flags named
after the tool parameters (--asin, --list-id, --days 90). Lists of values are comma-separated
or repeated flags. Objects, such as the products to add to a list, take a -json flag with a JSON
value (--products-json, --context-json, --content-json).
realytix get-product --asin B0XXXXXXXX --marketplace de --json
realytix get-product-history --asin B0XXXXXXXX --days 365 --metrics price,rank --json
realytix compare-products --asins B0XXXXXXXX,B0YYYYYYYY --json
realytix get-keyword-volume --keywords "garlic press,garlic crusher" --json
realytix list-lists --json
realytix add-to-list --list-id <id> --stage market_check --products-json '[{"asin":"B0XXXXXXXX"},{"asin":"B0YYYYYYYY"}]' --json
realytix ask-realytix-ai --message "Is this niche worth entering?" --context-json '{"report_id":"<id>"}' --json
With --json, the output is the tool result exactly as the server returns it, for example
{"asin": "B0XXXXXXXX", "marketplace": "de", "title": "…", "price": 19.99, …} for a product.
--jsonprints the tool result as JSON on standard output, nothing else, so you can pipe it intojqor a file. Without it, the CLI prints a readable summary.--quietprints nothing and lets you rely on the exit code.realytix toolslists the tools by group, before you sign in too (--jsonfor a machine-readable catalog);realytix tool <name>prints one tool's description, options and input schema, andrealytix <command> --helpits flags.realytix call <tool> --input-json '{...}'calls any tool with a whole JSON input, and--input-file -reads it from standard input. Explicit flags override the JSON keys.--server <url>or theREALYTIX_MCP_URLvariable point the CLI at another server address;REALYTIX_CONFIG_DIRmoves the session files.
The CLI does not ask for confirmation: a command runs as soon as you invoke it. Tools marked with
* in realytix tools write to your workspace or spend allowance or credit (ask-realytix-ai,
run-launch-tool, expand-keywords), so keep them out of unattended loops unless that is what you
want. A missing required flag is refused before any request is sent (exit code 2).
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | The tool returned an error, including plan_required when the account is not on Pro+AI |
| 2 | Usage error: unknown command, missing or invalid option, invalid JSON or value |
| 3 | Not signed in, or the session expired: run realytix login |
Errors go to standard error as code: message plus a hint when useful; with --json, the same
error is also printed there as a JSON object with code, message, details and tool. Standard
output carries results only, so a pipe never receives a half result. Error codes you may see:
plan_required, not_found, invalid_input, limit_reached, no_ai_credit,
no_research_credit, daily_cap_reached, rate_limited, marketplace_unsupported,
temporarily_unavailable, and extension_offline for scan-market and run-market-intel
when Chrome is not open with the Realytix extension signed in.
With Claude Code or Codex
Run realytix login yourself first: the sign-in needs your browser. Then tell the agent about the
CLI, for example in your project's CLAUDE.md or AGENTS.md:
Use the
realytixCLI (Pro+AI account already signed in).realytix tools --jsonlists the tools,realytix <command> --helptheir options. Always pass--jsonand read the result. Exit code 3 means runrealytix login; exit code 1 printscode: messageon standard error. Tools marked as writes or with a cost change my workspace or spend allowance: ask before running them.
The agent then calls the CLI like any shell command and reads the JSON.
If something does not work
realytix loginnever finishes: the request expired. Run the command again.- "Realytix MCP and CLI are included in the Pro+AI plan" on standard error: the account is not on Pro+AI. See Plans.
- Exit code 3: run
realytix login. - A tool answers with another error: run
realytix whoami; it explains your plan, your allowance and the marketplaces you can read.
