stray.fi

Docs · Use with AI

Ask Stray through an AI agent

Updated 26 November 2026 · Builder week: your first 30 days of Builder are free until 31 December 2026

What it does

Stray's MCP server gives an AI agent the record as 18 read-only tools. You ask in plain words; the agent picks a tool, calls the Stray API with your key, and answers with what the record says and the time of each number. It works with Claude Code, Claude Desktop, Cursor and any client that speaks MCP.

The tools read the record and the live book. They can't place orders, sign anything or move funds, and nothing they return is a prediction. Stray describes what a market has done.

Before you start

  • Node.js 20 or later. The server runs with npx; check with node -v.
  • An MCP client: Claude Code, Claude Desktop, Cursor or another.
  • An Ethereum wallet in your browser, to sign in to the console. Signing in is a signed message: no transaction, no gas.

1 · Get a key

  1. Open the console and sign in with your wallet.
  2. Choose Start your free month of Builder: 30 days, 100,000 calls, 60 a minute. Any account that hasn't had a plan can start one until 31 December 2026.
  3. Choose Create key and copy it. It's shown once; Stray keeps only a hash of it.

Treat the key like a password. It belongs in your client's config or an environment variable, not in a chat, a repo or a URL. If it leaks, Roll or Revoke it in the console.

2 · Connect your client

Claude Code

claude mcp add stray -e STRAY_API_KEY=stray_… -- npx -y stray-mcp

Claude Desktop

Add this to claude_desktop_config.json: ~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows. Then quit Claude Desktop completely and open it again.

{
  "mcpServers": {
    "stray": {
      "command": "npx",
      "args": ["-y", "stray-mcp"],
      "env": { "STRAY_API_KEY": "stray_…" }
    }
  }
}

Cursor

The same block in ~/.cursor/mcp.json, or .cursor/mcp.json inside a project.

Any other MCP client

The server speaks MCP over stdio. Command npx, arguments -y stray-mcp, environment variable STRAY_API_KEY.

3 · Check it works

Ask: "What markets does Stray cover?" The agent should call stray_markets and list the eight core markets (BTC, ETH, HYPE, SOL, XRP, DOGE, BNB, SUI), the HIP-3 markets Stray records, and when recording began: 10 November 2026. If it answers from memory instead, tell it to use the Stray tools.

The 18 tools

ToolWhat it answersAsk it
stray_marketsThe markets Stray covers and when recording began."What can you see on Stray?"
stray_drawThe Draw: how tense a market is now against its own history, 0 to 100, with each component and its inputs."What's the Draw on BTC, and what's driving it?"
stray_rangesHow far a market moved over every past window of the same length, and where the current move sits."Is HYPE's 7-day move unusual?"
stray_depthDollars resting within ±0.5%, ±1% and ±2% of mid on the live Hyperliquid book."How deep is ETH's book right now?"
stray_profileThe typical hour of the day (UTC): median depth, spread and volume."Is BTC's book thinner than usual for this hour?"
stray_liquidityTop of book in ten-minute medians: spread, and dollars in the top 5 and top 20 levels."Has SOL's spread widened today?"
stray_crowdingOpen interest per dollar of book within ±1%."Is DOGE more crowded than usual?"
stray_fundingFunding on Hyperliquid, Binance or Bybit, the latest rate ranked against its history."Where does HYPE's funding rank?"
stray_conditionalToday's funding band (ten bands, every day since 2023) and the spread of moves over the next 1 to 30 days after past days in that band, beside all days. Past, not a forecast."HYPE funding is low. What followed days like this?"
stray_venuesThe same market on Hyperliquid, Binance, Bybit and OKX side by side."Compare HYPE depth across venues."
stray_flowHyperliquid volume by aggressor side, the largest trade, and liquidations on Binance."Who's been pushing ETH in the last hour?"
stray_positioningBinance open interest, long and short account shares, and taker volume."How are Binance traders positioned on BTC?"
stray_whalesPositions of the top 1,500 Hyperliquid accounts, totalled per coin."Are the largest accounts net long SOL?"
stray_liqmapWhere those accounts' positions liquidate, by distance from the mark."Where are ETH's big liquidation levels?"
stray_impliedDeribit implied volatility beside realized volatility (BTC and ETH)."Is BTC's implied vol above realized?"
stray_basisHYPE's perp against spot on Hyperliquid, in basis points."Is HYPE's perp above spot?"
stray_correlationCorrelation of daily returns between the core markets over 30, 90 or 180 days."How tied is SOL to BTC over 90 days?"
stray_historyStray's own minute record: mark, oracle, hourly funding, open interest and the dollars resting near mid."Show BTC's ±1% depth over the last 6 hours."

Worked questions

"Is BTC's book thinner than usual for this hour?"

The agent reads stray_depth for the live book and stray_profile for the median at this hour of the day. A good answer gives both numbers, the ratio between them and the time of the reading: thin means thin against something.

"Where are ETH's big liquidation levels, and how much book sits in front of them?"

stray_liqmap gives the levels by distance from the mark and the dollars of positions at each; stray_depth gives the dollars resting within ±1%. Side by side, they show whether a level is small next to the book or larger than it.

"HYPE funding is low. What happened after past days like this?"

stray_funding places today's rate in its history; stray_conditional puts today in one of ten funding bands and shows the spread of moves over the next 1, 3, 7, 14 or 30 days after past days in that band, beside all days. It's a record of what happened, not a call on what will.

"What's the Draw on the whole market, and which part is pulling it?"

stray_draw returns the reading, its band, each component's score and the raw inputs behind it, so the agent can say which component moved and by how much.

Good habits

  • Ask for times. Every number Stray returns is timestamped; a good answer says when.
  • Ask for the comparison. The same hour on other days, the last 30 days, another venue.
  • Expect history, not calls. If an agent turns Stray's data into a price target, that part is the agent's.
  • Mind the meter. Each tool call is one API call: Builder allows 60 a minute and 100,000 a month. Long series come back trimmed to the newest 200 rows; ask for a larger step to cover a longer span.

When it fails

What you seeWhat to do
STRAY_API_KEY is not setThe key isn't in the server's environment. Add it to the config and restart the client.
Stray API 401The key is missing, mistyped or revoked. Create a new one in the console.
Stray API 402The account has no active plan. Start the free month of Builder in the console.
Stray API 404An unknown market. Have the agent call stray_markets first; HIP-3 markets take their full name, such as xyz:NVDA.
Stray API 429Over 60 a minute or the monthly limit. The message says how many seconds to wait.
Stray API 502Hyperliquid or the record didn't answer in time. Try again shortly.
No Stray tools in the clientCheck node -v is 20 or later and the config is valid JSON, then quit the client completely and reopen it.

The source

The server is open source (MIT) in the Stray cookbook and on npm as stray-mcp, beside quickstarts in curl, Python and TypeScript, four worked examples and an OpenAPI spec. Every endpoint the tools call is in the API reference.