MCP quickstart — Claude Desktop
Five minutes from clone to "what's BTC trading at?" in Claude Desktop.
1. Build the bin
Until we publish to npm, vendor the bin from the monorepo:
git clone https://github.com/TriaHQ/tria-monorepo
cd tria-monorepo
yarn install
yarn workspace @tria-sdk/api-trading-mcp build
The bin lands at packages/trade-mcp/dist/bin.js — a self-contained CJS bundle with no runtime deps to install.
2. Get an SDK env
The server signs orders with an HL agent wallet and/or a Decibel delegate keypair — not your main wallet. Mint them from Settings → API Keys or npx tria-trade-provision (see Credentials) and save them outside the repo:
# ~/.config/tria/sdk.env
export TRIA_TRADE_NETWORK=mainnet
export TRIA_TRADE_HL_AGENT_KEY=0x...
export TRIA_TRADE_HL_ACCOUNT_ADDRESS=0x...
# Optional — only if you also want Decibel:
export TRIA_TRADE_DECIBEL_DELEGATE_KEY=0x...
export TRIA_TRADE_DECIBEL_APTOS_OWNER_ADDRESS=0x...
export TRIA_TRADE_DECIBEL_NODE_API_KEY=...
3. Wire it into Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Create it if it doesn't exist:
{
"mcpServers": {
"tria-trade": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/tria-monorepo/packages/trade-mcp/dist/bin.js"],
"env": {
"TRIA_TRADE_NETWORK": "mainnet",
"TRIA_TRADE_HL_AGENT_KEY": "0x...",
"TRIA_TRADE_HL_ACCOUNT_ADDRESS": "0x..."
}
}
}
}
Use absolute paths in args — Claude Desktop's working directory isn't predictable. After we publish to npm this becomes "command": "npx", "args": ["-y", "@tria-sdk/api-trading-mcp"].
4. Restart + verify
Restart Claude Desktop completely (Quit, not just close the window). Click the 🔌 icon — you should see tria-trade with 25 tools. Then ask:
What's the current BTC ticker on Hyperliquid?
If Claude responds with live mark/mid/oracle prices, you're set.
Other clients
{
"mcp.servers": {
"tria-trade": {
"command": "node",
"args": ["/path/to/tria-monorepo/packages/trade-mcp/dist/bin.js"],
"env": { "TRIA_TRADE_HL_AGENT_KEY": "0x...", "...": "..." }
}
}
}
Troubleshooting
- Not appearing in Claude Desktop — verify the config path, valid JSON (no trailing commas), an absolute
commandpath, and a full restart. Run the bin manually (node /path/to/dist/bin.jswith env vars) — it should wait silently on stdin. - "at least one venue must be configured" — set a complete venue: HL needs
TRIA_TRADE_HL_AGENT_KEY+TRIA_TRADE_HL_ACCOUNT_ADDRESS; Decibel needs the delegate key + owner address + node API key. - "User or API Wallet 0x… does not exist" (HL) — the agent isn't approved or expired. Mint a fresh one from Settings → API Keys.
- Debug logging — set
DEBUG=mcp:*in theenvblock; logs go to stderr (Claude Desktop'smcp-server-tria-trade.log).