ByteTree MCP
ByteTree MCP is an LLM-native, read-only interface to the same data plane that powers the REST API. It exposes tools that AI agents can call to retrieve assets, prices, metrics, group rollups, and FX data — and ships a glossary resource so the agent can ground its answers in ByteTree’s vocabulary without external lookup.
Mutation tooling (recompute, backfill, pipeline triggers, group aggregation) exists internally but is intentionally out of scope on the public surface.
When to use which surface
| Use case | Surface |
|---|---|
| Programmatic ingest, dashboards, scheduled jobs | REST API |
| Claude Desktop, Claude Code, or other MCP clients | ByteTree MCP |
| Custom agent workflows with tool-calling | ByteTree MCP |
| One-off curl, browser inspection, debugging | REST API |
Both surfaces read the same engine. Choose the MCP when you want the LLM to drive the request loop and need glossary-aware semantics in-band; choose REST when you control the request shape directly.
What’s inside
- 13 read-only tools — asset discovery, price and FX data, latest and time-series metrics, server-side ranking, distributions, regime-transition events, group rollups, dataset summary, and asset comparison. See the Tool Reference.
bytetree://glossaryresource — authoritative definitions for CAPR, ByteTrend, trend regimes,trendAge200w, score-history fields, and universes. Pulled in-band by MCP clients; the human-readable form lives on the Concepts page.- Bearer-token authentication — single shared preview key today; per-customer keys with scoped permissions on the roadmap.
Transport encoding
ByteTree MCP responses use TOON — a compact, token-efficient encoding (lossless JSON in a denser YAML-flavoured form, with CSV-style tabular arrays for uniform-row data). Most clients (Claude Desktop, Claude Code) decode this transparently; you only see the difference if you’re inspecting raw transport or budgeting tokens directly. Read tabular blocks (header line ending in {field1,field2,…}: followed by comma-delimited rows) as arrays of objects with the listed fields in order.
Response-size discipline
The tool layer caps results at ~800 KB. Past the cap, the tool returns an explicit error with narrowing guidance rather than silently truncating — so an agent that retries with a smaller window or a fields projection succeeds on the next call.
Series tools (get_metrics_series, get_prices) default to a 90-day window ending today when neither from nor to is supplied. Widen explicitly when you need history, and use the fields input to project just the metrics you care about (the full metrics blob is ~100 fields × N days; without a projection a multi-year request will hit the cap).
The server publishes these conventions via the MCP instructions field returned during initialization — clients that surface that field will see the same default-window and narrowing-guidance framing alongside the TOON format notes, so a connected agent generally adapts without needing to read this page.
Proprietary concepts
Terms like CAPR (Currency-Adjusted Price Relative), ByteTrend (0–5 composite score in two arcs — Weekly with 200-week / 30-week MAs, Daily with 200-day / 30-day MAs; the wire-format suffixes …200w and …30d map to Weekly and Daily respectively), Local-vs-CAPR variants, and trend regimes (Leading / Emerging / Weakening / Bear / Neutral) are not in any LLM training set. Read the Concepts page or the in-band bytetree://glossary resource before reasoning about these fields. If your client doesn’t expose resources/read, call summarise_dataset first — its response carries an inline concepts block with one-line definitions.
Conventions
- Asset symbols are uppercased internally (case-insensitive on input).
- Dates are ISO
YYYY-MM-DDstrings. - The active asset universe is bounded by a 7-day metric staleness window — assets without a fresh metrics row drop out of bulk surfaces (rankings, distributions, regime scans) rather than appearing with stale values.
Next steps
- Getting Started — endpoints, auth, and client configs.
- Tool Reference — the 13 tools, their inputs, and response shapes.
- Concepts — CAPR, ByteTrend, trend regimes, universes,
trendAge200w.