Docs · For builders
MCP server
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
| Tool | Arguments | What it returns |
|---|---|---|
get_market_stats | none | Tokens, graduations, and 24 hour volume, trades and traders. From /api/v1/market/stats |
list_tokens | sort, stage, limit | Tokens from connected launchpads. sort: new, volume, progress, mcap, active. stage: curve, graduating, graduated, external |
search_tokens | q | Tokens by name, symbol or address |
get_token | address | One token with price, market cap, curve progress, holders and 24 hour figures |
get_token_trades | address, limit | Its recent trades |
get_wallet | address | Holdings with cost, recent trades and tokens it launched |
quote_buy | address, zro, an amount of ZRO ("50") | Tokens out at the best venue, after fees, read from the router on chain |
quote_sell | address, tokens ("1000") | ZRO out at the best venue, after fees, read from the router on chain |
vault_status | none | With a vault set: its ZRO, the owner's limits, what is left to spend today, and its holdings |
vault_buy | address, zro, slippage (percent) | With a vault set: buys with the vault's ZRO, minimum from a fresh quote |
vault_sell | address, tokens or "all", slippage | With 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
npm.cmd install
npm.cmd run build --workspace=mcpnpm install
npm run build --workspace=mcp| Variable | Default | What |
|---|---|---|
TERMINAL_API | http://localhost:3001 | The API to read from. Set it to the public one below to skip running an indexer |
RPC_URL | http://127.0.0.1:8546 | The node the quotes are read from. Set it to Zero's, https://testnet.zero.layerzero.network |
AGENT_VAULT | none | An agent vault to trade through. With AGENT_KEY, turns on the three vault tools |
AGENT_KEY | none | The 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:
{
"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
| Ask | Tools 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.
Source: mcp/src/index.ts.