For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Commands reference

All mm commands accept global flags unless noted.

Global flags

FlagShortDescription
--format-fOutput format: text, json, yaml, toml, or toon
--jsonShorthand for --format=json
--toonShorthand for --format=toon
--verbose-vShow debug logs on standard error

mm doctor

Inspect CLI version, installed skills, environment, and session health. Does not require authentication or initialization.

mm doctor
FieldDescription
authenticatedWhether the CLI session is valid
initializedWhether wallet mode and trading mode are set
recommendedSkillsStatus of metamask-agent-wallet
compatibleWhether installed skills match the CLI version (null if no skills found)
hintsActionable guidance for missing skills, auth, init, or version mismatch

Run before the first wallet operation in a session. Do not run wallet commands until both authenticated and initialized are true.

mm init

Initialize wallet mode and trading mode.

mm init [--wallet server-wallet|byok] [--mode guard|beast]
mm init show
FlagRequiredDescription
--walletNoserver-wallet or byok
--modeNoguard (recommended) or beast (server-wallet only)
--mnemonicNoBring your own wallet only. Prefer the MM_MNEMONIC environment variable

Environment variables: MM_MNEMONIC, MM_PASSWORD (bring your own wallet encryption).

Use mm wallet policy get to view wallet policy YAML. Policy is not included in mm init show output.

mm login

Sign in to MetaMask Agent Wallet.

mm login [qr | browser] [--token <token>] [--timeout <seconds>] [--no-wait]
mm login browser [--no-wait]
mm login qr [--timeout <seconds>]

On a TTY, bare mm login shows a method picker (Dashboard and QR). Use mm login browser for Google or email sign-in through the MetaMask dashboard. QR sign-in (mm login qr) is not available in production (COMING_SOON).

FlagRequiredDescription
--tokenNoPre-minted token as cliToken:cliRefreshToken. Environment variable: MM_CLI_TOKEN
--timeoutNoSeconds to wait for QR or browser callback
--no-waitNoPrint sign-in URL and exit. Use with browser in headless mode. Not supported with QR

After you sign in successfully in server-wallet mode, the CLI syncs existing remote wallets from the server.

mm auth status

Check authentication status. No additional flags beyond global flags.

mm logout

Sign out and revoke the CLI session.

mm reset

Clear local session and wallet state files.

mm chains list

List supported EVM networks. No auth required.

mm wallet

Wallet lifecycle and signing commands.

mm wallet create

mm wallet create [--chain-namespace <namespace>] [--name <name>] [--trading-mode guard|beast]

Returns policyYaml: string | null in structured output.

mm wallet list

mm wallet list [--chain-namespace <namespace>]

mm wallet select

mm wallet select [--chain-namespace <namespace>] [--id <id>] [--address <address>] [--name <name>]

mm wallet show

mm wallet show [--chain-namespace <namespace>] [--id <id>] [--address <address>] [--name <name>]

Returns policyYaml: string | null in structured output.

mm wallet address

mm wallet address [--chain-namespace <namespace>]

mm wallet add-fund

Show a QR code and address to fund the active wallet. In headless mode (--json), outputs the address only.

mm wallet add-fund [--chain-namespace <namespace>]

mm wallet balance

mm wallet balance [--currency <code>] [--chain <chains>] [--token <token>] [--address <address>]

mm wallet trading-mode get

Show the current trading mode and active server-wallet address. Server-wallet mode only.

mm wallet trading-mode get

mm wallet trading-mode set

Set the trading mode for the active server wallet. Prompts for confirmation when switching to Beast mode.

mm wallet trading-mode set <guard|beast>

mm wallet policy get

Show the policy YAML for the active server wallet. Server-wallet mode only.

mm wallet policy get

mm wallet policy set

Set the policy for the active server wallet. Server-wallet mode only.

mm wallet policy set --policy <yaml>

mm wallet policy template

Show the project policy template. Server-wallet mode only.

mm wallet policy template

mm wallet sign-message

mm wallet sign-message --message <text> --chain-id <id> [--wait]

mm wallet sign-typed-data

mm wallet sign-typed-data --chain-id <id> --payload '<JSON>' [--wait]

mm wallet send-transaction

mm wallet send-transaction --chain-id <id> --payload '<JSON>' [--wait]

mm wallet requests list

List pending server-wallet requests. Server-wallet mode only.

mm wallet requests watch

mm wallet requests watch --polling-id <id>

mm wallet password

mm wallet password set --new=<password>
mm wallet password change --current=<old> --new=<new>
mm wallet password remove --current=<password>

mm transfer

Send native currency or ERC-20 tokens on one EVM chain.

mm transfer --to <address> --amount <value> --chain-id <id> --token <symbol-or-address> [--wait]
FlagRequiredDescription
--toYesRecipient hex address. ENS not supported
--amountYesHuman-readable amount
--chain-idYesEVM chain ID
--tokenYesnative, symbol, or ERC-20 address
--waitNoBlock until complete (server-wallet)

mm swap

mm swap quote

mm swap quote --from <token> --to <token> --amount <amount> --from-chain <chain-id> [--to-chain <chain-id>] [--to-address <address>] [--slippage <percent>] [--refuel]
FlagRequiredDescription
--to-chainNoDestination chain ID. The default is --from-chain for same-chain swaps
--to-addressNoRecipient for bridged output tokens. Cross-chain only. The default is signer
--slippageNoMaximum slippage as a percentage, 0–100 (default 0.5)
--refuelNoBundle destination native-gas top-up into a cross-chain quote. Cross-chain only

--refuel is opt-in and cross-chain only. Do not use it when the destination token is the destination chain's native gas asset; the backend returns NO_QUOTES.

mm swap execute

mm swap execute --quote-id <id>
mm swap execute --from <token> --to <token> --amount <amount> --from-chain <chain-id> [--to-chain <chain-id>] [--to-address <address>] [--slippage <percent>] [--refuel]

When executing by --quote-id, the persisted quote retains --to-address and --refuel settings from the quote step.

mm swap status

mm swap status --quote-id <id> [--tx-hash <hash>]

mm tx history

List recent transactions for the active wallet or specific addresses.

mm tx history [--addresses <addrs>] [--chain <chains>] [--type <filter>] [--limit <n>]
FlagRequiredDescription
--addressesNoComma-separated EVM addresses. The default is all EVM wallets for account
--chainNoComma-separated chain filters (for example, 1,137)
--typeNoFilter by direction (in, out, self) or transaction category
--limitNoMaximum transactions to return (1–500, default 50)

mm perps

Hyperliquid perpetuals commands. Most commands require --venue hyperliquid.

CommandUsage summary
mm perps list-venuesList supported venues
mm perps dexs--venue <venue>: list HIP-3 DEX identifiers (Hyperliquid)
mm perps markets--venue <venue> [--symbol <symbol>]
mm perps balance--venue <venue>
mm perps positions--venue <venue>
mm perps orders--venue <venue>
mm perps quoteQuote before open
mm perps open--venue <venue> --symbol <symbol> --side long|short --size <size> --leverage <n>
mm perps closeClose a position
mm perps modifyModify leverage or TP/SL
mm perps cancel--venue <venue> --order-id <id>
mm perps deposit--venue <venue> --amount <amount>
mm perps withdrawWithdraw from venue
mm perps transferTransfer between spot and perpetual accounts

mm predict

Polymarket prediction market commands.

CommandDescription
mm predict setupOne-time predict setup
mm predict depositFund predict deposit wallet
mm predict balanceCheck predict balance
mm predict modeSet mainnet or testnet
mm predict authRefresh predict credentials
mm predict approveRepair approvals
mm predict statusBackend status
mm predict portfolioSnapshot of pUSD balance, positions, redeemable winnings
mm predict redeem listList redeemable winning positions
mm predict redeemRedeem one or all winning positions
mm predict markets searchSearch markets
mm predict markets listList markets with filters
mm predict markets getInspect a market (slug, ID, or condition ID)
mm predict events listList Polymarket events with filters
mm predict events getRetrieve a single event by ID or slug
mm predict series listList event series
mm predict series getRetrieve a single event series
mm predict tags listList Polymarket tags
mm predict tags getRetrieve a tag by ID or slug
mm predict quotePreview order cost
mm predict placePlace an order
mm predict cancelCancel orders
mm predict ordersList open orders
mm predict positionsView positions
mm predict withdrawWithdraw pUSD from deposit wallet
mm predict bookOrder book for a token
mm predict watchWatch a predict job
mm predict geoblockCheck Polymarket geoblock for your IP

Run mm predict <command> --help for command-specific flags.

mm decode

Decode hex-encoded EVM calldata into a function name, parameters, and a plain-language summary. Use before signing unfamiliar raw transactions.

mm decode --payload <0x-calldata>
mm decode <0x-calldata>
FlagRequiredDescription
--payloadYesHex-encoded calldata (also positional)

mm price

CommandUsage
mm price spot--asset-ids <ids> [--vs <currency>] [--market-data]
mm price historyHistorical prices
mm price currenciesSupported quote currencies
mm price networksSupported price networks

mm token

CommandUsage
mm token assets--asset-ids <ids>
mm token networksList token networks
mm token list popular--chain <chain>
mm token list trending--chain <chain>
mm token list search--query <query> [--chain <chains>]
mm token list top-gainer--chain <chain>

Help

Every command supports --help:

mm transfer --help
mm perps open --help