Blackforge

so.blackforge由 blackforge.so 發布v0.4.2更新於 Oct 31, 2026

Crypto market data: order book depth, liquidity lifetimes and taker flow on the major spot venues

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

BlackForge MCP 讓助理取得九家現貨交易所的即時加密市場資料,包括訂單簿深度、流動性、價差與吃單流。

可以做什麼
  • 查詢涵蓋的交易所、指標定義與交易對清單
  • 讀取某交易所某交易對的最新資料桶或單一指標時間序列
  • 查看 API 金鑰的請求用量與每月剩餘列數配額
  • 驗證、儲存、列出、刪除並短暫串流讀取即時公式
  • 為已儲存的公式建立、列出與刪除門檻通知
  • 讀取即時訂單簿、依訂單簿估算市價單成本,並跨交易所比較最佳買賣價
適用情境
適合需要量化加密微觀結構資料(深度、價差、掛單存活時間、吃單流)進行分析或監控的情境,也適合需要即時公式串流與門檻通知的使用者。
執行需求
透過 npx 以 stdio 在本機執行(需 Node.js;即時公式串流需 Node 22 或更新版本)。需在 BLACKFORGE_API_KEY 提供 BlackForge API 金鑰,可於 BlackForge 應用程式取得;僅目錄工具不需金鑰。可選用 BLACKFORGE_BASE_URL 與 BLACKFORGE_REALTIME_URL 覆寫預設位址。需能連線至 BlackForge 的 API 與即時主機。可用的交易所、指標、間隔與即時功能由方案權限決定。
安裝前請注意
API 金鑰屬機密,透過 x-api-key 標頭傳送,請勿寫入共用設定。資料存取依每月列數配額計費,即時訂單簿讀取、價差圖與公式串流都會消耗列數,大量抓取或長時間串流可能耗盡方案額度。刪除公式與通知無法復原,刪除公式會一併刪除其通知。通知可寄送電子郵件並呼叫帶簽章的 webhook 網址,其密鑰僅顯示一次。市場資料與查詢會傳送至 BlackForge 的伺服器。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Blackforge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@blackforge-so/mcp

A Model Context Protocol stdio server that puts BlackForge market data in your agent's hands: real time crypto market data from the major exchanges (binance, bitget, bybit, coinbase, gate, kraken, kucoin, mexc, okx), 150+ metrics for 14,000+ pairs, per pair per closed minute (1m on Ultra and PAYG; 5m, 1h and 1d rollups for every plan).

Every column is a measurement with a definition: order book depth and shape, resting liquidity lifetimes, trade-explained vs book-implied volume, spreads and market-wide context, returned in context so an agent can read the raw microstructure directly. It is a thin client over the public BlackForge /v1 API; it stores nothing and re-shapes nothing.

Quickstart

Add the server to your MCP client and paste an API key. Claude Desktop (claude_desktop_config.json) or Claude Code (.mcp.json):

json
{  "mcpServers": {    "blackforge": {      "command": "npx",      "args": ["-y", "@blackforge-so/mcp"],      "env": { "BLACKFORGE_API_KEY": "bf_live_your_key" }    }  }}

No install step: npx -y @blackforge-so/mcp fetches and runs the server on demand.

Where to get a key

Mint a key at app.blackforge.so → API. The server never creates keys; it reads BLACKFORGE_API_KEY from its environment. The blackforge_catalog tool works without a key, so you can verify the install before pasting one.

Tools

ToolReturns
blackforge_catalogEvery venue and every column definition, with metricCount the live column count. Keyless. Call this first to learn valid exchange and metric identifiers.
blackforge_symbolsThe trading pairs a venue lists, e.g. ["BTCUSDT", …].
blackforge_latestThe latest completed bucket for one (exchange, symbol) at the plan's interval (1 minute on Ultra and PAYG, 5 minutes otherwise): a values object of column → number, with epoch-ms ts. Pass columns to narrow it.
blackforge_seriesA time series for one column over a range: ascending { ts, value } points at 1m (Ultra and PAYG), 5m, 1h, or 1d. Capped at 50,000 points, newest kept, truncated: true when cut. One-minute rows start at the switch to one-minute rows (availableFrom in the catalog); 5m covers all history.
blackforge_usageThe key's recent request counts and remaining monthly row quota.

Plan entitlements (which venues, columns, and intervals a key may read) are enforced by the API. When a column is dropped because your plan does not include it, the tool result reports it in columnsOmitted so the agent understands why a key is absent. Venue- or interval-level restrictions come back as a clear tool error carrying the HTTP status and the server's message (including the upgrade URL, verbatim).

Live formulas and the live order book

Beyond the stored history, the server reaches BlackForge's realtime host. Write your own measure from order book and trade data across the major venues, stream it every second, and get notified when it crosses a value you choose.

ToolDoesPlan
blackforge_formula_validateChecks a formula without saving it. Free. A refusal comes back as data: a stable code, the location with a pointer under the source, and suggestions (e.g. the venue's real pair spelling), so an agent can fix it and check again.Ultra
blackforge_formula_createSaves a formula (name, expr, interval 1 to 60 s).Ultra
blackforge_formula_listSaved formulas, your limits and current usage.Ultra
blackforge_formula_deleteDeletes a formula and the notifications on it.Ultra
blackforge_formula_watchStreams a saved formula (formulaId) or a one-off expr for up to 60 s (default 20) and returns first, last, min, max, the flags seen and the full series.Ultra
blackforge_alert_createNotifies you when a formula crosses a value you set (above, below, cross), by email and optionally a signed webhookUrl. The webhook secret is shown once.Ultra
blackforge_alert_list / blackforge_alert_deleteList or delete notifications.Ultra
blackforge_bookThe live order book for one pair, up to 200 levels a side.Max, Ultra
blackforge_fillPrices a market order against the live book (usd or size); bps is null unless the visible book fills it all.Max, Ultra
blackforge_spread_mapBest bid and ask for one base/quote on every venue that lists it, read in the same moment.Max, Ultra

A formula looks like mid(binance:BTCUSDT) - mid(okx:BTC-USDT) or buyVol(binance:SOLUSDT, 60s) / max(sellVol(binance:SOLUSDT, 60s), 1). Pairs are spelled exactly as blackforge_symbols lists them. The full function list is in the blackforge_formula_validate tool description. Streaming and notifications are charged one row per referenced pair per evaluation; live book reads by levels returned or walked, against the same monthly quota as everything else. Every streamed value carries flags (for example WARMING while a windowed term has not filled its window yet) and null means there was no number, never zero.

The stream uses Node's built-in WebSocket, so blackforge_formula_watch needs Node 22 or newer; every other tool runs on Node 20. Your key travels in the x-api-key header, never in a URL.

Charts

blackforge_series also ships an interactive chart. A host that implements the MCP Apps extension (io.modelcontextprotocol/ui) renders the result as a line chart with flagged buckets drawn in the same convention the BlackForge console uses; every other host sees exactly the JSON it saw before.

Nothing about the tool contract changes. The chart payload travels in the result's _meta, which is protocol metadata and reaches no model, so content[0].text is byte-identical whether or not your host renders widgets, so the token cost of a series is the same either way. That is deliberate: structuredContent would have been the obvious home for it, but core MCP treats that field as server-produced result data, and a host without Apps support may hand it to the model, doubling the cost of a large series.

The chart is one self-contained HTML file with uPlot and all CSS inlined, because MCP Apps render under a deny-by-default CSP where an external <script> would simply never load. It is read-only and never calls back into the server: it draws the points it was given and cannot spend your row quota behind your back. Series longer than 2,000 points are decimated for the chart only (the tool still returns every point), and the payload says so rather than quietly thinning the line.

Data quality

When the API reports a row's measurement quality, blackforge_latest carries it through as a quality object (flags naming what went wrong in the window, contaminates listing which figures it flags) plus a plain-English qualityNote. blackforge_series aggregates it into one qualitySummary ({ flaggedBuckets, of, flags }) rather than repeating it on every point. Both keys are omitted entirely when nothing is flagged, and a quality.raw of 32768 means the row predates the quality rail and was never assessed: unknown, not bad. The flag decode table lives on the qualityFlags metric in blackforge_catalog, as a bits array; this server reads it from there and never carries a copy of its own.

Configuration

Env varDefaultPurpose
BLACKFORGE_API_KEY(none)Your key. Required for every tool except blackforge_catalog.
BLACKFORGE_BASE_URLhttps://api.blackforge.soAPI base. Paths are appended as /v1/.... Override for a self-hosted or local dev API (e.g. http://localhost:3001/api).
BLACKFORGE_REALTIME_URLhttps://realtime.blackforge.soRealtime host for the live formula stream and the live order book reads.

Local development

bash
npm installnpm run build     # → dist/index.js (ESM, executable) + dist/widget/chart.htmlnpm test          # client unit tests + a stdio integration test

build runs tsup first and the widget's vite build second, and the order is load-bearing: tsup's clean wipes the whole of dist/, so reversing them deletes the widget and leaves the server serving a resource that is not there.

The integration test spawns the built server over stdio and drives it with the MCP client. Its data assertions need a local BlackForge API at http://localhost:3001/api; without one, those assertions are skipped and the tool-listing checks still run.

License

MIT

來源:README.md,提交 5142f6e

工具

16

blackforge_catalog

BlackForge catalog

List every venue BlackForge covers (9 spot exchanges) and every column it measures (one wide row per (exchange, symbol) per minute, served at 1m, 5m, 1h and 1d: order-book depth and shape, resting-liquidity lifetimes, trade-explained vs book-implied volume, spreads, and market-wide context). `metricCount` is the exact number of columns available now. Each metric carries a precise measurement definition, unit, family, and the minimum plan that includes it, the `intervals` it is served at, and, where the 5m/1h/1d value is a rollup of minute values rather than a re-measurement, a one-sentence `rollupNote`. `availableFrom["1m"]` is when the one-minute rows start (null before). `availableFrom.bookOnBoundary` maps each venue to the first window end whose order book was read as it stood at that instant (such rows have `bookObservedAt` equal to `ts`, so venues line up), null before; the order book columns carry a one-sentence `bookTimingNote` on it. The `qualityFlags` metric also carries the `bits` table that decodes the per-row quality mask. This route needs no API key. CALL THIS FIRST to learn the exact `exchange` and `metric` identifiers the other tools accept.

無需輸入參數。

blackforge_symbols

BlackForge symbols

List the trading pairs (symbols) a given venue trades, as an array of symbol strings. Use these values as the `symbol` argument to blackforge_latest and blackforge_series. Valid `exchange` values come from blackforge_catalog (e.g. binance, bybit, coinbase, kraken, okx). A venue outside the caller's plan returns HTTP 403 with the plan and an upgrade URL.

輸入參數exchange必填

blackforge_latest

BlackForge latest bucket

Return the latest completed bucket for one (exchange, symbol), at the key plan's interval (1 minute on Ultra and PAYG, 5 minutes otherwise): a `values` object mapping each column key to its measured number (or null when not observed), plus the window END timestamp `ts` in epoch milliseconds. Omit `columns` to get every column your plan includes; pass a subset of column keys (from blackforge_catalog) to narrow the payload. Columns your plan does not cover are dropped and reported in `columnsOmitted` so you can see why a key is absent. WHEN PRESENT, a `quality` object reports the row's measurement quality: `flags` names what went wrong during the window and `contaminates` lists which figures it flags, with a plain-English `qualityNote` beside it. Read it before trusting an unusual value. A `quality.raw` of 32768 means the row predates the quality rail and was never assessed; that is unknown, not bad. When the key is absent, the row carries no quality assessment at all.

輸入參數symbol必填columnsexchange必填

blackforge_series

BlackForge time series

Return a time series for one column of one (exchange, symbol): `points` is an ascending array of { ts, value } where `ts` is epoch milliseconds and `value` is the measured number (or null). `from`/`to` are ISO-8601 datetimes; `interval` is one of 1m, 5m, 1h, 1d. 1m is on Ultra and PAYG (PAYG bills a 1m row at five times a 5m row); Max and below go down to 5m, and a finer interval than the plan allows is a 403. 1m rows exist only from the switch to one-minute rows on (see blackforge_catalog `availableFrom`); for earlier ranges use 5m, which covers all history. The server caps a response at 50,000 points (about 34 days at 1m) and keeps the NEWEST; `truncated: true` says the range was cut, so narrow it or use a coarser interval. If the requested `metric` is above your plan, `points` comes back empty and the column is listed in `columnsOmitted`, which is why it is empty. WHEN ANY BUCKET IS FLAGGED, a `qualitySummary` object reports how many of the buckets carry a quality flag and which flags they are (`{ flaggedBuckets, of, flags }`); per-bucket quality is deliberately not repeated on every point. No `qualitySummary` means no bucket in the range was flagged.

輸入參數to必填from必填metric必填symbol必填exchange必填interval必填

blackforge_usage

BlackForge usage

Report the calling key's recent usage: `days` is a per-day breakdown of request counts and the last request time, and `rowsRemaining` is the monthly row quota still available (omitted for usage-based plans that have no monthly ceiling). Use this to check headroom before a large pull.

無需輸入參數。

blackforge_formula_validate

Check a live formula

Check a live formula without saving it. Free and unmetered, so iterate on it freely. On success returns { ok: true, normalised, pairs, primitives, horizonSeconds, cost: { rowsPerEvaluation, rowsPer30Days } }. On a refusal returns { ok: false, error } where error carries a stable code, a message, the location (at, pointer under the source) and suggestions such as the correct pair spelling: apply them and check again. A formula is an arithmetic expression over live order book and trade data, evaluated server-side every interval (default 1 s). Pairs are written venue:SYMBOL exactly as blackforge_symbols spells them (binance:BTCUSDT, okx:BTC-USDT, coinbase:BTC-USD), and one formula may combine pairs on different venues. Durations are 1s to 60s, or 1m. Book state, read now: bid ask bidQty askQty mid spread spreadBps bidLevels askLevels quoteUsd last lastAge, each (pair). Book walk: bidDepth askDepth imbalance (pair, bps) with bps an integer 1 to 200 written as a number; buyCost sellCost (pair, usd) with usd 100 to 1000000, result in bps. Trades over a window: buyVol sellVol vol buyUsd sellUsd volUsd buyCount sellCount tradeCount netFlow buyShare vwap high low open close maxBuy maxSell (pair, duration); buyUsdAbove sellUsdAbove buyCountAbove sellCountAbove (pair, duration, usd) with usd one of 100, 1000, 10000, 100000. Book changes over a window: bidAdded askAdded bidRemoved askRemoved bidAddedNear askAddedNear bidRemovedNear askRemovedNear bookChanges (pair, duration). Scalar: abs sign sqrt ln log10 exp pow min max clamp round floor ceil if coalesce. Windows over any expression: avgOver minOver maxOver stdOver change pctChange (expr, duration). Operators + - * / ^, comparisons, and, or, not. A missing input gives null, never a made-up number. The sum of windows on any path (the horizon) is at most 60 s. Examples: mid(binance:BTCUSDT) - mid(okx:BTC-USDT); imbalance(binance:ETHUSDT, 50); buyVol(binance:SOLUSDT, 60s) / max(sellVol(binance:SOLUSDT, 60s), 1); avgOver(spreadBp

輸入參數expr必填interval

blackforge_formula_create

Save a live formula

Save a live formula to the account so it can be streamed (blackforge_formula_watch) and carry notifications (blackforge_alert_create). Returns { formula: { id, name, expr, interval, pairs, horizonSeconds, ... } }. A refused formula comes back as an error with the same located, coded detail blackforge_formula_validate gives; validate first. Saving is free; a formula is charged one row per referenced pair per evaluation only while it is streamed or watched by a notification. Live formulas and notifications are part of the Ultra plan.

輸入參數expr必填name必填intervalephemeral

blackforge_formula_list

List live formulas

List the account's saved live formulas, with the plan's limits and current usage ({ formulas, limits, usage: { live, stored, connections } }). Live formulas and notifications are part of the Ultra plan.

無需輸入參數。

blackforge_formula_delete

Delete a live formula

Delete a saved live formula. Its notifications are deleted with it and listed in deletedAlerts. Cannot be undone.

輸入參數formulaId必填

blackforge_formula_watch

Watch a live formula

Stream a live formula for a few seconds and return what arrived: first, last, min, max, the number of samples, which value flags appeared (with a plain note for each), and the full series of { ts, value, flags? } with ts in epoch milliseconds. Pass formulaId for a saved formula, or expr to watch a formula once (it is saved as a one-hour formula first). seconds is 1 to 60, default 20. A value flagged WARMING is computed over less than its full window, because the formula is younger than its horizon; it settles by warmUntil. null means there was no number (for example no print in a trade window), never zero. Charged one row per referenced pair per evaluation. Live formulas and notifications are part of the Ultra plan.

輸入參數exprsecondsintervalformulaId

blackforge_alert_create

Notify when a formula crosses a value

Get notified when a saved live formula crosses a value you set. It is evaluated server-side every interval, whether or not anything is connected. direction: above (goes from at or below the threshold to above it), below (the reverse), or cross (either). After it fires it waits until the value is back on the other side by at least hysteresis and cooldownSeconds (60 to 86400, default 900) have passed. If the condition is already true when created, it starts disarmed and arms once the value is back across. It never fires on null or on a WARMING or stale value. Email goes to the account's verified address (default on); webhookUrl (https) optionally receives a signed POST. The response carries webhookSecret ONCE: store it to verify the x-blackforge-signature header (t=<unix>,v1=<hex HMAC-SHA256 of t.body>). Live formulas and notifications are part of the Ultra plan.

輸入參數emaildirection必填formulaId必填threshold必填hysteresiswebhookUrlcooldownSeconds

blackforge_alert_list

List formula notifications

List the account's formula notifications ({ alerts, limits }). Each carries its formula, direction, threshold, status (active, paused, quota, plan), whether it is armed, and when it last fired. Live formulas and notifications are part of the Ultra plan.

無需輸入參數。

blackforge_alert_delete

Delete a formula notification

Delete a formula notification. The formula itself is kept. Cannot be undone.

輸入參數alertId必填

blackforge_book

Live order book

Read the live order book for one pair right now: the top levels on both sides as [price, quantity] pairs, when it was read (observedAtMs), whether the book is synced or crossed, and level counts. levels is 1 to 200, default 20. Charged 2 rows per level returned. Live order book reads need the Max or Ultra plan and are charged against the monthly row quota.

輸入參數levelssymbol必填exchange必填

blackforge_fill

Simulate a market order

Walk the live order book to price a market order of a given size right now, without placing anything. Give usd (notional in USD) or size (base quantity). Returns { complete, bps, partialBps, levelsWalked, vwap, depthLimited, bookExhausted }: bps is the cost against the mid in basis points and is null unless the visible book could fill the whole order (then see partialBps, and do not quote it as the cost). Charged one row per level walked. Live order book reads need the Max or Ultra plan and are charged against the monthly row quota.

輸入參數usdside必填sizesymbol必填exchange必填

blackforge_spread_map

Live spread across venues

Best bid and best ask for one base/quote pair on every venue that lists it, all read within the same moment, so a difference between venues is a real difference rather than a timing artefact. Charged 2 rows per venue. Live order book reads need the Max or Ultra plan and are charged against the monthly row quota.

輸入參數base必填quote必填

版本歷史

6
  1. v0.4.2最新Oct 30, 2026
  2. v0.4.1Oct 30, 2026
  3. v0.4.0Oct 14, 2026
  4. v0.3.0Oct 14, 2026
  5. v0.2.2Oct 10, 2026
  6. v0.2.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分