@bskts/mcp

中文文档
0.5.3发布于 2026/11/03MITTypeScriptES Module构建来源已验证近 30 天下载 1775

MCP server for bskts: read tokenized index baskets on Robinhood Chain and build unsigned buys, sells and orders. stdio and Streamable HTTP.

原始使用文档
文档目录6 节
  1. Tools
  2. Local (stdio)
  3. Remote (Streamable HTTP)
  4. Limits
  5. Autonomous account path
  6. Delegated limit orders

@bskts/mcp

The bskts API as tools for Claude, ChatGPT, Cursor and any other MCP client: read tokenized index baskets on Robinhood Chain, check an account, and build buys, sells and orders.

Unsigned only. Build tools return the transactions (approval, then tx) for the user's own wallet to sign. The server holds no key and sends nothing. Built on the official MCP TypeScript SDK and @bskts/sdk.

Tools

ToolWhat it does
bskts_marketsevery basket: NAV, 24h change, buy cost
bskts_basketone basket: constituents, risk note, fees; optional NAV summary over N days
bskts_accountan address's ETH / USDG, gasOk, positions with PnL, open orders
bskts_buyunsigned buy for USDG, with the API's dry run
bskts_sellunsigned sale for USDG (shares: "max" by default, or exact wei; optional fraction)
bskts_orderunsigned limit buy, stop-loss / take-profit, or cancel (pass the order's escrow)
bskts_guidethe full trading guide, on demand

All tools are annotated read-only: even the build tools only return data. The rules an agent needs (units, approval order, never send a failed dry run) are in the descriptions and the server instructions.

Local (stdio)

Claude Code:

claude mcp add bskts -e BSKTS_MAX_USD_PER_TRADE=100 -- npx -y @bskts/mcp

Claude Desktop, Cursor and other clients (mcpServers in their config):

{
  "mcpServers": {
    "bskts": {
      "command": "npx",
      "args": ["-y", "@bskts/mcp"],
      "env": { "BSKTS_MAX_USD_PER_TRADE": "100" }
    }
  }
}

Remote (Streamable HTTP)

createBsktsMcpHandler() is a stateless (Request) => Response handler for any fetch-style runtime:

import { createBsktsMcpHandler } from "@bskts/mcp";

const mcp = createBsktsMcpHandler({ policy: { maxUsdPerTrade: 100 } });
export default {
  fetch: (req: Request) =>
    new URL(req.url).pathname === "/mcp" ? mcp(req) : new Response("not found", { status: 404 }),
};

Limits

The user's own guard rails, checked before anything is built (environment variables for the CLI, policy for the handler):

VariableEffect
BSKTS_MAX_USD_PER_TRADElargest buy, limit buy or sale, in USD
BSKTS_ALLOWED_TICKERScomma-separated baskets the agent may trade
BSKTS_MAX_BUY_COST_BPSrefuse buys whose live buy cost is above this, or unknown
BSKTS_MAX_SLIPPAGE_BPScap on the slippage an agent may ask for
BSKTS_API_URLa different API (default https://api.bskts.xyz)

The buy-cost cap applies to market and limit buys through both wallet and delegated tools. A limit's current buy cost is checked when placing the order; its on-chain slippage floor governs the later fill. Sells, exits and cancellations do not require a buy-cost estimate.

MIT

Autonomous account path

Four additional unsigned tools expose delegated accounts:

ToolPurpose
bskts_agent_sessionResolve the owner's account and read a public agent key's active status, USDG, daily remaining turnover, slippage and expiry. Returns owner approval and relayer URLs.
bskts_agent_tradeBuild a buy/sell Action with EIP-712 typedData inside the owner's live limits. The host's matching session signer signs and submits it.
bskts_coverWeekend Cover reads: the weeks a session may buy, a basket's offers by range with payout history and a quote, an account's cover and payouts.
bskts_agent_coverBuild a cover purchase (take offers, request cover, or cancel the account's listing) with typedData under the cover module's own domain. Never underwrites.

Create the signing key in your agent host wallet/secure signer; share only its public address. The owner connects that address in Portfolio once, reviews limits and signs. Suggested defaults: 10% available USDG (at least $10) capped $100/day, 0.5% all-in slippage and seven days, fixed dollars until the owner approves a change. A funded bskts account is required; owner/agent ETH is not.

This MCP server stays unsigned. It does not generate/store private keys, grant permissions, sign, submit trades or withdraw. Autonomous execution requires a host signer/submitter; @bskts/sdk provides executeSession and sessionRelayer for that host. Revocation blocks new requests after confirmation; existing orders/schedules require separate cancellation. Reconnect with a fresh key. On a 402 fee quote preserve nonce and trade terms, re-sign only the fee within the host's explicit fee cap. Never automatically replace an ambiguous submission with a new nonce.

Persist the unsigned plan before the host signs or submits it. On restart, reconcile that original nonce and stop while it is unresolved. SDK 0.5.0 hosts can use executeSessionOnce with a durable store and sessionActionState; Node hosts can import fileSessionStore from @bskts/sdk/node. Keep completed records so restarting an operation cannot repeat its trade. MCP continues to return unsigned plans; persistence, signing and reconciliation belong to the host.

Agent keys authorise account trading, including Weekend Cover when it is enabled. Cover spending is counted separately against the same daily limit; underwriting additionally requires the account owner’s allowance. Individual key revocation leaves existing Cover listings open: withdraw them in My cover. The API’s moduleEnabled/coverEnabled fields report the current account setup.

Delegated limit orders

Available since 0.4.2 (the hosted MCP serves it too).

bskts_agent_order builds unsigned session Actions for kind: "limit" (owner, key, ticker, amountUsdg, positive triggerNav, slippageBps, optional expiryDays) and kind: "cancel" (owner, key, orderId). Read the session first, then use bskts_account with its bskts account address to list orders. Creation escrows the whole budget against today's turnover; cancellation returns it to the account without restoring turnover. slippageBps is required for a limit: 50-1000 bps, at most the session's maxSlippageBps and at least the basket's limitMinSlippageBps from bskts_basket (the bskts app uses 300). Expiry cannot exceed the session expiry. The escrow needs at least 50 bps of slippage permission. Revocation leaves existing orders in place. The MCP reconstructs typed data locally and never signs or sends. A host signer should use executeSessionOnce with a durable ID; a placement receipt confirms creation, not a fill.

Since 0.5.0 it also builds kind: "exit" (owner, key, ticker, shares as "max" or walletSharesWei, stopNav and/or tpNav, slippageBps at least the basket's exitMinSlippageBps, optional expiryDays), kind: "cancel-exit" (owner, key, orderId of an exit), and buy-above limits (triggerBelow: false). Every result leads with previewText and preview: the NAV now, each trigger's distance from it, an exit's return against the account's average entry before and after costs, a limit's most per share, each at the trigger (not a bound: after a gap a stop sells lower and a buy-above pays more). Triggers are on NAV (price returns, not net profit): show the preview to the user before anything is signed.

版本与发布记录

@bskts/mcp 共发布 15 个版本,首次发布于 2026/09/30;过去 12 个月发布了 15 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.5.3latest2026/11/036 天前
0.5.22026/10/2713 天前
0.5.12026/10/2713 天前
0.5.02026/10/2614 天前
0.4.22026/10/2416 天前
0.4.12026/10/2416 天前

关于 @bskts/mcp 的常见问题

@bskts/mcp 是什么?

MCP server for bskts: read tokenized index baskets on Robinhood Chain and build unsigned buys, sells and orders. stdio and Streamable HTTP.

如何安装 @bskts/mcp?

在项目目录运行 npm install @bskts/mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bskts-mcp,可以用 npx bskts-mcp 直接运行。

@bskts/mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bskts/mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bskts/mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.19。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bskts/mcp 可以商用吗?

@bskts/mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bskts/mcp 的下载量有多少?

根据 npm 官方下载统计,@bskts/mcp 在 2026/10/09 – 2026/11/07 这 30 天内被下载 1,775 次,日均约 59 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bskts/mcp 还在维护吗?

最新版本 0.5.3 发布于 2026/11/03(6 天前);至今共发布 15 个版本,其中过去 12 个月发布了 15 个;首次发布于 2026/09/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。