Qian

@qianexchange/mcp

qian.ag · npm · Docs · License: MIT

MCP server for Qian, a multichain exchange and payments layer for every asset. Any MCP-capable agent can launch tokens, trade, and read market data on every chain Qian supports (Robinhood Chain, Base, Ethereum), trade tokenized stocks on Robinhood Chain, and pay x402-gated APIs in USDC.

Non-custodial: the server runs on your machine and signs with your key. Qian never holds keys or funds. Every launched token's liquidity is locked forever in QianLocker.

Setup

{
  "mcpServers": {
    "qian": {
      "command": "npx",
      "args": ["-y", "@qianexchange/mcp"],
      "env": { "QIAN_KEY": "0x<your-agent-wallet-private-key>" }
    }
  }
}

Omit QIAN_KEY for read-only mode (market data still works). Use a dedicated hot wallet funded with only what the agent may spend.

Tools

Tool What it does
list_tokens Tokens on Qian, all chains, with price/FDV/volume
get_token Full detail: price, FDV, hook, metadata
get_trades / get_holders Market activity
my_wallet Your address + ETH balance per chain
my_positions Holdings, ETH value, and PnL for any address across chains
quote_buy / quote_sell Preview a trade, read-only (no key or approval)
buy / sell Trade via QianSwapRouter (auto-approve, slippage-protected)
launch_token Deploy a token: name/symbol/image/socials, FDV tier 1–4, creator fee 0.5–20%, optional dev buy
pending_fees Unclaimed creator/platform fees for a token (read-only)
collect_fees Claim your creator share of trading fees
list_stocks / quote_stock List and preview tokenized stocks, read-only (no key)
buy_stock / sell_stock Trade tokenized stocks via QianRWARouter (Robinhood Chain)
x402_wallet The x402 payment wallet: address and USDC balances
x402_pay Pay an x402 (HTTP 402) API in USDC and return its response
create_payment_link / create_invoice Create a QianPay link or itemized invoice (Base), payable in USDC
create_subscription_offer Create a recurring USDC subscription offer
pay_dashboard Your merchant dashboard: links, invoices, offers, subscribers, keys, webhook
set_pay_profile / create_api_key / revoke_api_key Merchant account + API-key management
set_webhook / rotate_webhook_secret Signed webhook config (intent.paid, invoice.paid, subscription.*)
get_payment_link / get_subscription_offer / get_subscriptions Read link/offer/subscription state (no key)
pay_link Pay a QianPay link or invoice in USDC on-chain
subscribe / cancel_subscription / charge_subscription Subscribe to an offer, cancel, or force a charge

Tokenized stocks

Robinhood Chain carries tokenized stocks (NVDA, TSLA, SPY, and more) issued by a third party (Robinhood Assets); Qian is a non-custodial venue, not the issuer. US persons are restricted from trading them. The read tools (list_stocks, quote_stock) work for everyone, but buy_stock and sell_stock are for non-US persons only. The server is headless and cannot verify location, so that restriction is on you to honor.

x402 payments

x402_pay lets an agent pay for x402-gated APIs (HTTP 402 + USDC, Base mainnet or Arc testnet). It fetches the URL; on a 402 it signs an EIP-3009 USDC authorization and retries with the X-PAYMENT header. It never pays above the max_amount_usdc you pass per call.

Signing key resolution: X402_PRIVATE_KEY, else QIAN_KEY, else the server generates a burner wallet at ~/.qian/mcp-wallet.json on first use and prints its address. Fund that wallet with a few USDC on Base and treat it as float. Never store more there than you're willing to let the agent spend.

QianPay

An agent can run the full QianPay merchant surface: create payment links and itemized invoices, publish recurring subscription offers, read its dashboard (paid/unpaid links, subscribers, MRR), manage API keys and signed webhooks. Payment links and invoices work on Base and on Arc testnet, chosen with the chain argument. Subscriptions are Base only, because no keeper runs on Arc yet and a subscription there would never charge. Funds settle to the QIAN_KEY wallet. The server signs a short-lived session with that key, so nothing is custodial.

It can also pay from the agent side: pay_link settles a link or invoice in USDC on-chain, and subscribe / cancel_subscription manage subscriptions (the subscribe approval is 3× the period amount, never infinite). Payment links settle in USDC through the QianPay contract, a different rail from x402.

Configuration

Env overrides: QIAN_API, QIAN_KEY, X402_PRIVATE_KEY, RPC_ROBINHOOD, RPC_BASE, RPC_ETHEREUM.

MIT. Contact: [email protected]

S
Description
No description provided
Readme MIT
151 KiB
Languages
JavaScript 100%