
PERPBRAIN TypeScript SDK、MCP 处理器、示例和超液体收据验证器。仅读和仅仿真。
概览
TypeScript SDK、MCP 处理器、示例和 PERPBRAIN 收据验证器:只读 Hyperliquid 数据、书籍模拟器和 AI 代理的所有者限制。仿真收据经过验证且可复现:任何人都可以从其输入中重新推导收据,并获得相同的哈希值。 该仓库没有主网订单路径,没有交换密钥,也没有发布工作流程。仿真输出标注为模拟。这不是建议。 PERPBRAIN 托管的服务和引擎不在这个仓库里。这个仓库是公共客户端界面。 节点22或更高。这个仓库里的任何东西都不需要API密钥。 @perpbrain/SDK 是 0.1.0-rc1,标记为私密,所以还没在 npm 上。npm run build 会把 ESM 和 CommonJS 构建写入 sdk/dist。 每个示例都离线运行在夹具/中的文件上。 检查收据。VERIFIED意味着从输入重新导出的每个哈希值都匹配。被篡改的夹具打印出不匹配并命名字段。
概述(AI 翻译)
TypeScript SDK、MCP 处理器、示例和 PERPBRAIN 收据验证器:只读 Hyperliquid 数据、书籍模拟器和 AI 代理的所有者限制。仿真收据经过验证且可复现:任何人都可以从其输入中重新推导收据,并获得相同的哈希值。
该仓库没有主网订单路径,没有交换密钥,也没有发布工作流程。模拟输出标记为SIMULATED。这不是建议。
PERPBRAIN 托管的服务和引擎不在这个仓库里。这个仓库是公共客户端界面。
这里有什么
| 路径 | 角色 |
|---|---|
sdk/ |
@perpbrain/sdk:公共信息端点读取、图书模拟器、所有者限制(conservative、standard、pro)、杀开关锁存、执行成本分解、收据验证器和SVG结果卡。 |
ts/mcp-server/ |
MCP JSON-RPC 处理程序和标准 MCP 服务器(perpbrain-mcp),用于读取和仿真工具。它不接受订单工具。 |
server.json |
io.github.PERPBRAIN/perpbrain-sdk的MCP注册表元数据(npm,标准,无秘密)。可选标志路径:docs/assets.md。 |
glama.json |
Glama列表维护文件(声称拥有Glama列表的所有权)。 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
PERPBRAIN SDK
TypeScript SDK, MCP handler, examples, and receipt verifier for PERPBRAIN: read-only Hyperliquid data, a book simulator, and owner limits for AI agents. Simulation receipts are verified and reproducible: anyone can re-derive a receipt from its inputs and get the same hashes.
This repository has no mainnet order path, no exchange keys, and no publish workflow. Simulation output is labelled SIMULATED. It is not advice.
The PERPBRAIN hosted service and engine are not in this repository. This repository is the public client surface.
What is here
| Path | Role |
|---|---|
sdk/ |
@perpbrain/sdk: public info-endpoint reads, the book simulator, owner limits (conservative, standard, pro), the kill-switch latch, execution-cost breakdown, receipt verifier, and the SVG results card. |
ts/mcp-server/ |
MCP JSON-RPC handler and stdio MCP server (perpbrain-mcp) for the read and simulation tools. It does not accept an order tool. |
server.json |
MCP Registry metadata for io.github.PERPBRAIN/perpbrain-sdk (npm, stdio, no secrets). Optional logo path: docs/assets.md. |
glama.json |
Glama listing maintainer file (claim ownership of the Glama listing). |
Dockerfile |
Slim Node image for Glama and other hosts; stdio entrypoint, non-root user. |
examples/ |
Runnable TypeScript examples on recorded public data. |
verify/web/ |
Browser receipt checker (WebCrypto SHA-256), the same check as the PERPBRAIN verify page. |
fixtures/ |
Recorded public info responses and good and tampered receipt fixtures. No keys, no accounts. |
Requirements
Node 22+ is required (check with node -v). On Node 20 or older the examples and tests stop with node: bad option: --experimental-strip-types; upgrade Node to fix it. On Node 22 a harmless ExperimentalWarning: Type Stripping line is printed. No API key or other secret is needed for anything in this repository.
Install the MCP server
From a fresh clone:
git clone https://github.com/PERPBRAIN/perpbrain-sdk.git
cd perpbrain-sdk/ts/mcp-server && npm ci
cd ../..
node bin/perpbrain-mcp.mjs
To smoke-test it, pipe an initialize request followed by tools/list into the launcher; it should list the 12 tools below.
The launcher starts the stdio MCP server. Live reads use the public Hyperliquid /info endpoint (mainnet by default). Optional: set PERPBRAIN_HL_NETWORK=testnet for testnet.
Equivalent from the repository root after npm ci in ts/mcp-server/:
node bin/perpbrain-sdk.mjs mcp
To work on the TypeScript SDK itself (not required for MCP-only use):
(cd sdk && npm ci && npm run build)
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"perpbrain": {
"command": "node",
"args": ["/absolute/path/to/perpbrain-sdk/bin/perpbrain-mcp.mjs"],
"env": {
"PERPBRAIN_HL_NETWORK": "mainnet"
}
}
}
}