Z3RO
Docs · MCP server

Docs · For builders

MCP server

A Model Context Protocol server in mcp/ that gives an AI agent Z3RO's market data and real on-chain quotes. On its own it only reads and holds no keys. Given an agent vault and its agent key, it can also trade, but only through that vault and inside its limits.

Tools

ToolArgumentsWhat it returns
get_market_statsnoneTokens, graduations, and 24 hour volume, trades and traders. From /api/v1/market/stats
list_tokenssort, stage, limitTokens from connected launchpads. sort: new, volume, progress, mcap, active. stage: curve, graduating, graduated, external
search_tokensqTokens by name, symbol or address
get_tokenaddressOne token with price, market cap, curve progress, holders and 24 hour figures
get_token_tradesaddress, limitIts recent trades
get_walletaddressHoldings with cost, recent trades and tokens it launched
quote_buyaddress, zro, an amount of ZRO ("50")Tokens out at the best venue, after fees, read from the router on chain
quote_selladdress, tokens ("1000")ZRO out at the best venue, after fees, read from the router on chain
vault_statusnoneWith a vault set: its ZRO, the owner's limits, what is left to spend today, and its holdings
vault_buyaddress, zro, slippage (percent)With a vault set: buys with the vault's ZRO, minimum from a fresh quote
vault_selladdress, tokens or "all", slippageWith a vault set: sells the vault's tokens, the ZRO back to the vault

Every answer is JSON as text. The quote tools ask the router, so they match what a trade would get at that moment, and say route: none when no venue can trade the token.

Install

Windows PowerShell, from the repository
npm.cmd install
npm.cmd run build --workspace=mcp
macOS or Linux
npm install
npm run build --workspace=mcp
VariableDefaultWhat
TERMINAL_APIhttp://localhost:3001The API to read from. Set it to the public one below to skip running an indexer
RPC_URLhttp://127.0.0.1:8546The node the quotes are read from. Set it to Zero's, https://testnet.zero.layerzero.network
AGENT_VAULTnoneAn agent vault to trade through. With AGENT_KEY, turns on the three vault tools
AGENT_KEYnoneThe vault's agent key. It can trade inside the vault and nothing else

The public API is at <Z3RO API URL>. That address and Zero's RPC are filled in at launch. The server finds the router's address from the API's /health, so it follows a redeploy on its own.

Connect a client

It talks over standard input and output. In a client that takes a JSON config, such as Claude Desktop:

json
{
  "mcpServers": {
    "z3ro": {
      "command": "node",
      "args": ["/path/to/z3ro/mcp/dist/index.js"],
      "env": {
        "TERMINAL_API": "<Z3RO API URL>",
        "RPC_URL": "https://testnet.zero.layerzero.network"
      }
    }
  }
}

On Windows, write the path with forward slashes or doubled backslashes, for example D:/z3ro/mcp/dist/index.js.

What to ask

AskTools it uses
Which tokens are closest to moving to a pool?list_tokens with sort progress and stage curve
What would 200 ZRO of this token get me, and what would it sell back for?quote_buy, then quote_sell
What does this wallet hold, and is it up?get_wallet
Is anyone selling this token hard right now?get_token_trades

Letting an agent trade

Without a vault the server can't trade, on purpose. The safe way to let an agent trade is an agent vault: you own it, the agent's key only trades inside it, within your limits, and only you can take anything out. Set AGENT_VAULT and AGENT_KEY and the server offers vault_buy and vault_sell, which quote first and never ask for a looser minimum than the vault allows. An agent can also trade from its own wallet with the calls on Launch and trade from code, but then it holds everything in that wallet.

Agents read the same numbers as people. The public API has far more routes than these tools: holder labels, risk, Pulse, Radar and the live stream. An agent can call them directly over HTTP.

Source: mcp/src/index.ts.