Security
Write Operation Confirmation
Operations that change state, such as placing or canceling orders and transferring funds, are not executed immediately. Where confirmation happens depends on how you use the CLI:
| Usage | Confirmation location |
|---|---|
| Direct terminal execution | The command pauses and shows Confirm / Cancel |
| Agent calls through MCP, and the agent supports confirmation dialogs | The agent shows a system-level confirmation dialog and waits for a click |
| Agent calls through MCP, and the agent does not support confirmation dialogs | The first call does not execute; it returns "confirmation required" with the full request. The agent relays this to the user, and execution happens only after the user agrees and the call is made again |
The terminal confirmation prompt shows the pending operation and parameters. For irreversible operations, the cursor defaults to Cancel; you must move it deliberately to select Confirm. Every confirmation and cancellation is logged and reported to MEXC.
--yes
--yes indicates that a human has already confirmed the operation. With this flag, the confirmation prompt is skipped.
This flag is intended for scripts, not agents. Agents must not add it on their own. The correct sequence is: the agent shows the full pending operation and parameters, the user explicitly agrees, and then the command is run once with --yes.
This is a rule constraint, not a technical block. In agents that do not support confirmation dialogs, a non-compliant agent can still bypass it in theory. The structural safeguard is --read-only.
--read-only
mexc <command> --read-only
When enabled, write operations are excluded from the available list rather than rejected after selection. In MCP configuration, the agent cannot see order-placement operations.
Always include --read-only in agent MCP configuration. The Option 2 examples in AI Agent Integration already include it. If an agent must execute trades, configure a separate entry without this flag and limit it to the modules that are actually needed.
Agent Considerations
Agents fail differently from humans: they may hallucinate, cite stale market data, supply parameters that do not exist, or be misled by web pages, files, or conversation content and issue operations the user did not request. These errors often show no warning signs.
Capability lookup described in Option 1 of AI Agent Integration is not in this category; in that scenario the agent reads local documents that can be verified. Risk concentrates in two places: assembling parameters on its own, and restating data returned by the API.
Create a separate API Key for agent use, grant the minimum permissions, and do not reuse your main account key.
For read-only use, include --read-only in MCP configuration; see --read-only above.
Verify any conclusion involving amounts yourself.