Skip to main content
Glama
traivo-mcp
by traivoxyz

traivo-mcp

A Model Context Protocol server that gives any MCP client (desktop chat apps, code editors, your own agent) Traivo's read-only tools for Ethereum mainnet: tokenized stock prices (Ondo Global Markets tokens on Uniswap V3) against the listed share price, live swap quotes against USDC, public wallet portfolios, Hyperliquid accounts, the public Traivo AI scorecard and position sizing with Ethereum gas.

It is a thin client over the public Traivo API (https://dapp.traivo.xyz/api/*), so it duplicates no chain logic and needs no keys. It never signs or sends a transaction. To trade, it hands back a link to Traivo's trade ticket, prefilled, for the user to review and sign in their own wallet.

Quick start

Requires Node.js 20 or newer. Not on npm yet, so run it from a clone:

git clone <this repo> traivo-mcp && cd traivo-mcp
pnpm install && pnpm build
node dist/cli.js --help

Then point your MCP client at node /absolute/path/to/traivo-mcp/dist/cli.js (stdio). After the npm release the command becomes npx -y traivo-mcp.

Generic MCP client config (JSON)

Most clients read an mcpServers map like this:

{
  "mcpServers": {
    "traivo": {
      "command": "node",
      "args": ["/absolute/path/to/traivo-mcp/dist/cli.js"],
      "env": { "TRAIVO_API_URL": "https://dapp.traivo.xyz" }
    }
  }
}

Desktop apps (Claude Desktop and similar)

Add the block above to the app's MCP config file (in Claude Desktop: Settings → Developer → Edit Config, which opens claude_desktop_config.json), then restart the app. The Traivo tools appear in the tools menu.

Editors and coding agents

  • Claude Code: claude mcp add traivo -- node /absolute/path/to/traivo-mcp/dist/cli.js

  • Cursor: add the same mcpServers block to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global).

  • VS Code: add to .vscode/mcp.json:

    {
      "servers": {
        "traivo": { "type": "stdio", "command": "node", "args": ["/absolute/path/to/traivo-mcp/dist/cli.js"] }
      }
    }

Streamable HTTP (optional)

node dist/cli.js --http --port 3333          # serves POST http://127.0.0.1:3333/mcp

Stateless (no sessions), replies streamed as server-sent events, GET /health for probes. It binds to 127.0.0.1 and has no auth; put it behind your own proxy and access control before exposing it (--host 0.0.0.0 to bind elsewhere).

Related MCP server: Financial Modeling Prep MCP Server

Configuration

Variable

Default

Meaning

TRAIVO_API_URL

https://dapp.traivo.xyz

Traivo API base URL (e.g. a local dapp at http://localhost:8787)

TRAIVO_APP_URL

TRAIVO_API_URL

Base URL used in trade links

TRAIVO_TIMEOUT_MS

15000

Per-request timeout

TRAIVO_DEBUG

unset

1 = log every tool call (to stderr)

Logs always go to stderr; stdout carries only the MCP protocol (a test enforces this).

Tools

All tools are read-only (readOnlyHint: true). Outputs are compact JSON (floats rounded to 6 significant digits).

Tool

API

What it returns

get_stock_board

GET /api/stocks

Ondo tokenized stocks on Ethereum: Uniswap V3 bid / ask / mid in USDC, spread, listed share price and its age, premium vs the share (bps), venue, ETH price. Filter symbols.

get_onchain_tokens

GET /api/onchain

Tokens with a real Uniswap V3 route against USDC on Ethereum, route (via: USDC or WETH), pool fee, on-chain price. symbol, priced_only, limit.

get_crypto_markets

GET /api/crypto

Major perp markets from Hyperliquid: mid, 24h change, volume, funding APR, open interest, max leverage. symbols, limit.

get_trade_quote

GET /api/quote

Live quote vs USDC at the current Ethereum block: amount out, average price, impact vs a small trade, premium vs reference, impact ladder, pool fee. Gas excluded.

get_portfolio

GET /api/portfolio/:address[?net=testnet]

Public Ethereum holdings of any address with price source and USD value, total, unpriced symbols. network: mainnet (default) or testnet (Sepolia).

get_hyperliquid_account

GET /api/integrations/hyperliquid/:address

Hyperliquid account value, margin, perp positions (PnL, ROE, liquidation distance), spot balances.

get_scorecard

GET /api/scorecard

Every Traivo AI call with entry, stop, target, block and its grade (win / loss / open), plus the summary. status, symbol, limit.

get_chain_status

GET /api/chain

Ethereum mainnet (chain id 1) head block, gas price, RPC latency.

size_position

— (local math)

Quantity from a max loss and a stop (risk_usd, or account_usd + risk_pct), optional costs, Ethereum gas per swap (gas_usd), notional cap, target → R multiple.

prepare_trade_link

— (local)

https://dapp.traivo.xyz/trade?s=<SYMBOL>&side=<buy|sell>&amount=<n> for the user to open, review and sign. Never signs.

amount means USDC to spend for a buy and tokens to sell for a sell, in both get_trade_quote and prepare_trade_link.

Example

User: Is $5,000 of tokenized NVDA expensive on-chain right now?
→ get_stock_board { "symbols": ["NVDA"] }               premium vs the share price, spread, price age
→ get_trade_quote { "symbol": "NVDA", "side": "buy", "amount": 5000 }   impact at that size
→ get_chain_status                                       gas price, to estimate gas_usd
→ size_position   { "entry": 239.4, "stop": 232.2, "risk_usd": 100, "target": 254, "gas_usd": 2 }
→ prepare_trade_link { "symbol": "NVDA", "side": "buy", "amount": 2000 }

Library use

import { TraivoClient, createTraivoServer, sizePosition } from "traivo-mcp";

const server = createTraivoServer({ client: new TraivoClient({ baseUrl: "https://dapp.traivo.xyz" }) });
// connect `server` to any MCP transport

How Traivo uses it

The same public API backs the Traivo app and Traivo AI's tools. This server exposes those reads to agents you run yourself, so they can check prices, quotes and the scorecard directly instead of trusting a summary. The scorecard tool returns misses as well as wins; see it live at https://dapp.traivo.xyz.

Limitations

  • No paper trading or orders in v0.1. Those endpoints need a signed-in wallet session (a browser cookie from wallet sign-in); Traivo has no API-token model yet. paper_trade / get_paper_account will come once it does.

  • No live trading, ever, from this server. It returns a deep link; signing happens in the user's wallet.

  • Quotes are a snapshot at one block. Prices move between the quote and the signature.

  • Tokenized stocks trade around the clock, but the reference share price only moves while its exchange is open; outside US market hours a large referenceAgeSec is normal and the premium includes that gap. Tokens with no listed share (e.g. a private company) have a null reference.

  • Quotes exclude Ethereum gas. Gas is a flat cost per swap, so on small trades it can outweigh the price impact; pass gas_usd to size_position to count it.

  • Tokens in get_onchain_tokens are discovered on-chain and not reviewed by Traivo.

  • Traivo and this server are not affiliated with the issuers of the tokenized stocks it reads.

  • On-chain prices can be null when the upstream RPC read fails or a pool has no quote; treat null as unknown, not zero.

  • The streamable HTTP mode has no authentication of its own.

  • Rate limits and caching follow the public API (its answers are cached for seconds).

Development

pnpm install
pnpm lint        # prettier --check
pnpm typecheck
pnpm test        # mocked fetch, schema validation, stdio/HTTP transport tests
pnpm build
TRAIVO_LIVE=1 pnpm test:live   # optional: read-only smoke test against the real API

Traivo $TRVO — The AI trading copilot for Ethereum Chain: it reads your wallet, watches the market, and prepares every trade for you to approve.

License

MIT © Traivo

Available Tools

10 tools
get_chain_statusEthereum statusA
Read-onlyIdempotent

Ethereum mainnet (chain id 1) head block, gas price (gwei) and RPC latency as seen by Traivo. Useful to timestamp other reads and to estimate gas for size_position.

Inputs: no named parameters.

get_crypto_marketsCrypto perp marketsA
Read-onlyIdempotent

Major crypto perpetual markets from Hyperliquid, sorted by 24h volume as Traivo shows them: mid price, 24h change %, 24h volume (USD), annualised funding % and open interest (USD), max leverage. Reference data for majors; these are not Ethereum swaps.

Inputs: limit, symbols.

get_hyperliquid_accountHyperliquid accountA
Read-onlyIdempotent

Read-only summary of a Hyperliquid account by address: account value, withdrawable, margin used, total notional, open perp positions (side, size, entry, mark, PnL, ROE, liquidation price and distance %, leverage) and spot balances. Public data; no keys.

Inputs: address (required).

get_onchain_tokensOn-chain crypto tokensA
Read-onlyIdempotent

Tokens with a real Uniswap V3 route against USDC on Ethereum mainnet (ETH plus tokens Traivo discovered on-chain), with the on-chain USD price when a quote is available. via is the route (direct USDC pool, or USDC → WETH → token); fee is the pool fee tier in hundredths of a bip. Discovered tokens are not reviewed by Traivo — check liquidity with get_trade_quote before sizing up.

Inputs: limit, symbol, priced_only.

get_portfolioWallet portfolioA
Read-onlyIdempotent

Public token holdings of any address on Ethereum mainnet: ETH, USDC, Ondo tokenized stocks and discovered tokens, each with balance, USD price, price source (dex, peg or chainlink) and value, plus the total. Symbols listed in unpriced are held but have no price. Use network=testnet for Sepolia (ETH and test USDC only).

Inputs: address (required), network.

get_scorecardTraivo AI scorecardA
Read-onlyIdempotent

Traivo AI's public scorecard: every trade call it made (symbol, side, entry, stop, target, block), graded against live prices — target first = win, stop first = loss, expiry = sign of the return. Misses are included. Returns the summary over the latest calls and the matching calls, newest first.

Inputs: limit, status, symbol.

get_stock_boardStock token boardA
Read-onlyIdempotent

Live board of tokenized stocks on Ethereum mainnet (Ondo Global Markets tokens, traded on Uniswap V3 against USDC). Per token: on-chain bid (USDC for selling 1 token), ask (USDC per token when buying with $1,000), mid, spread, the listed share's last price as the reference with its age in seconds, and the premium of the on-chain mid vs that share price in bps. Also returns ethUsd, the ETH price. Null prices mean the pool is not quoted; a null reference means there is no listed share to compare against. The tokens trade around the clock but the share price only moves while its exchange is open, so a large referenceAgeSec outside US market hours is normal.

Inputs: symbols.

get_trade_quoteTrade quoteA
Read-onlyIdempotent

Live pre-trade quote for swapping a token against USDC on Uniswap V3 on Ethereum mainnet, read from the chain at the current block. Returns amount in/out, average price at this size, price impact vs a small trade, premium vs the reference (the listed share price for tokenized stocks, Chainlink ETH/USD for ETH, the Hyperliquid mid for other crypto it lists), an impact ladder at larger sizes and the pool fee. Ethereum gas is not included. Read-only: nothing is signed or sent.

Inputs: side (required), amount (required), symbol (required).

size_positionPosition sizeA
Read-onlyIdempotent

Pure local math, no network: size a position from a max loss and a stop. quantity = risk budget / loss per unit at the stop (plus optional per-side costs and flat Ethereum gas per swap). Give risk_usd, or account_usd with risk_pct. Direction is inferred from the stop (stop below entry = buy). Optional target returns the R multiple and reward; optional max_notional_usd caps the size.

Inputs: stop (required), entry (required), side, target, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools target clearly distinct resources: markets reference data, stock board, token list, swap quote, portfolio, Hyperliquid account, scorecard, local sizing math, and link generation. The market-data cluster (get_crypto_markets, get_stock_board, get_onchain_tokens, get_trade_quote) overlaps in theme, but descriptions draw explicit boundaries (e.g. 'reference data for majors; these are not Ethereum swaps', 'check liquidity with get_trade_quote before sizing up'). Only minor residual risk of an agent picking get_onchain_tokens when it wanted a quote.

    Naming Consistency5/5

    All names are snake_case verb_noun: get_crypto_markets, get_chain_status, get_stock_board, get_onchain_tokens, get_trade_quote, get_portfolio, get_hyperliquid_account, get_scorecard, size_position, prepare_trade_link. The get_ prefix consistently marks reads while the two action tools use their own verb, which is still predictable.

    Tool Count5/5

    10 tools is well within the ideal 3-15 range and each one maps to a distinct capability in a read-only trading assistant: market data, sizing, gas/chain status, quoting, portfolio, account, track record, and link handoff. Nothing appears redundant or padded.

    Completeness4/5

    The surface covers the advisory lifecycle well: reference prices, on-chain quotes, position sizing, portfolio/account state, and a safe handoff to the user's wallet, deliberately excluding signing. Gaps exist but are workable: no historical price/candle data, no Hyperliquid perp quote or orderbook tool despite perp market data being exposed, and no explicit symbol search/lookup beyond the token list.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Provides AI agents read-only, keyless access to Hyperliquid market data, funding rates, account risk, and HyperEVM token transfers through MCP tools, with caching and rate limiting to protect upstream APIs.
      12
      85 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights through a standardized MCP interface. It provides 250+ tools across categories such as financial statements, quotes, technical indicators, ETFs, crypto, forex, commodities, economics, and SEC filings.
      558 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to research, trade and move money across crypto spot and perpetuals, stocks, commodities, forex, prediction markets, onchain swaps and bridging, and memecoins through a single remote MCP connection with no installation or hosting required. It also supports wallet management, fiat on-ramps and token launches, with every write action asking the user for approval first.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to query US stock market and financial data across SEC filings, fundamentals, institutional holdings, insider and congressional trades, earnings transcripts, options, live quotes, IPOs, short interest, macro indicators, and portfolio tracking through MCP tools.
      7
      MIT