QMax for AI agents
QMax finds the best price for a trade on Qubic by comparing the QX order book with the QSwap pool and splitting an order across both. Its API is free. These two downloads put it in an agent's hands: an MCP server for any MCP client, and a TypeScript SDK for your own code. Neither holds anyone's keys, and QMax never trades for you: an agent signs its own trades, inside limits it sets.
Hosted MCP server: nothing to install
Point an MCP client at https://qmax.exchange/api/mcp (MCP over Streamable HTTP). It is free, needs no key and no Node, and has the same read-only tools as the download below except the paid Max plan.
claude mcp add --transport http qmax https://qmax.exchange/api/mcp
Other clients take the address the same way, for example in a JSON config:
{ "mcpServers": { "qmax": { "url": "https://qmax.exchange/api/mcp" } } }
It is stateless (no session to open or lose) and limited per address like the rest of the API. Nothing it does signs or sends a transaction: qmax_build_plan returns unsigned steps for your own wallet. To ask it what a sale would fetch, use qmax_get_quote with side set to sell: the answer has a plain-language summary.
Add QMax to Claude (claude.ai and the Claude apps)
In Claude, open Settings, Connectors, Add custom connector and fill in two fields: Name QMax and MCP server URL
https://qmax.exchange/api/mcp. There is nothing to sign in to: QMax needs no account or key. Then ask, for example, "How much would 50 million QDOGE sell for on QMax?" or
"Who has been selling QDOGE this week, and what did they pay?" Every tool is read-only and none signs or sends a transaction. A quote or a trade plan includes an openInQMax link: it opens QMax with that order filled in, and the person reviews and signs it in their own wallet. What QMax keeps is in the privacy policy.
The connector also offers a prompt, Build a trading bot for Qubic, safely (qmax_build_trading_bot): a step-by-step plan that has the assistant study the market, backtest
the idea on real history, price it at the real size, and write the bot with the SDK, with a dry run, spending limits and a budget before any real trade. The bot runs on your own computer with its own
wallet; the assistant cannot place orders.
MCP server to run yourself
One file, run with Node 22 or newer. It talks to https://qmax.exchange/api unless you set QMAX_API_URL.
curl -O https://qmax.exchange/agents/qmax-mcp.mjs
node qmax-mcp.mjs # speaks MCP on stdio
Add it to an MCP client, for example Claude Desktop (claude_desktop_config.json) or Claude Code:
{ "mcpServers": { "qmax": { "command": "node", "args": ["/path/to/qmax-mcp.mjs"] } } }
It offers tools for: assets, quotes across QX and QSwap, order books, candles, price history, arbitrage checks, pools, asset health, the live trade tape, wallet ledgers, backtests and
unsigned trade plans (qmax_build_plan). Every tool is read-only: none signs or sends anything.
| Setting | What it does |
|---|---|
QMAX_API_URL | Where the QMax API is. Default: https://qmax.exchange/api. |
QMAX_API_KEY | A prepaid QMax key, if you have one. Pays for Max plans from its balance. |
QMAX_AGENT_SEED | Optional. Lets the server buy an x402 session when a call needs paying (a Max plan). This spends real QU from that wallet. |
QMAX_MAX_SPEND_QU | The most QU the server will ever pay for sessions. Default 30,000. |
One tool costs money: qmax_best_position (Max, the best position for a trade) is 100 QU per plan, from a prepaid key's balance or free inside an x402 session. Everything
else is free. If you set QMAX_AGENT_SEED, use a wallet that holds only what the agent may spend, and keep the seed in the environment, never in a file or a chat.
TypeScript SDK
An npm package (types included), served from this site. It is also available as one neutral ES module file, qmax-sdk.js, for any runtime.
npm install https://qmax.exchange/agents/qmax-sdk.tgz
import { QMaxClient } from "@qmax/sdk";
const qmax = new QMaxClient({ baseUrl: "https://qmax.exchange/api" });
const quote = await qmax.quote({ side: "buy", asset: "QDOGE", qty: 1_000_000 });
quote.route; // the cheapest way to fill it across QX and QSwap, each leg with its limits
For an agent that trades, @qmax/sdk/agent (Node only) quotes, checks the plan against limits you set (maxOutlayQu is required), signs with the agent's own
seed and sends each step; it can only call QX and QSwap, and its x402 payer can only pay QPayhub. The package's README has the full example.
Trying a trade, and being told about a price
Every quote is read-only, and so is qmax_build_plan. agentPlan in @qmax/sdk/agent is a dry run of the whole trade: the same quote, the same checks against your
limits and the same steps as agentTrade, and whether the wallet could cover it, with nothing signed or sent. There is no paper-trading account or test network. A quote is a snapshot, not a
reservation, so it has no ID to sign against: the transactions are built from the quote on your side and checked against what you asked for.
Price, arbitrage and big-trade alerts are a feature of the QMax Discord bot (/alerts); what they cost is in Plans. The HTTP API has no webhooks or push: an agent
that must react to a price polls /v1/quote, and the rate-limit headers say how often.
Check what you downloaded
curl -O https://qmax.exchange/agents/SHA256SUMS
curl -O https://qmax.exchange/agents/SHA256SUMS.minisig
minisign -V -P RWRMUiy37f8/2tR95zGd1GrgIuOk9ichS/Ohe99rlJrq7Xtd3d+Dfu3c -m SHA256SUMS
shasum -a 256 -c SHA256SUMS
SHA256SUMS lists the hash of each file here, and SHA256SUMS.minisig is its signature, made with the maintainer's own minisign key, which is never on this server. The first check proves the list came from that key; the second checks each file against the list. Run a file you downloaded only if both pass. This page is part of what is being checked, so compare the key above with the one in the README at github.com/profitphil/qmax: that copy is the one to trust.
How the payment works
QMax follows Q+Pay's x402 format (network qubic:mainnet, settled through QPayhub). A request that needs paying is answered with a 402 that names the price and the exact
payment; a client pays and repeats the request. The offer is public. QPayhub keeps at least 100 QU of every payment, so a payment per call is not offered: prepay a key
(a top-up of 10,000 QU buys 100 Max plans) or buy a session. The details, with the live prices, are in /llms.txt.