Skip to content

MCP 與 Skill 整合 ​

除了直接呼叫 HTTP API,MemePerp 亦提供原生 Remote MCP(Model Context Protocol,Streamable HTTP) 與 Agent Skill,讓 Claude Code、Cursor、Windsurf、Codex 等 AI 工具直接呼叫全部 48 個介面。


1. Claude Code(推薦) ​

先依 快速開始 申請你的 API Key,再執行一行指令掛載:

bash
claude mcp add --transport http memeperp https://devapi.ours.meme/api/mcp \
  --header "X-API-Key: <YOUR_API_KEY>"

同時可安裝官方 Skill,讓 Agent 自動理解 MemePerp 的交易規則與安全護欄:

bash
npx -y skills add https://ours.meme

2. Cursor / Windsurf / 其他 MCP 客戶端 ​

將以下設定合併進專案的 .cursor/mcp.json 或全域 ~/.cursor/mcp.json(保留既有的其他 mcpServers):

json
{
  "mcpServers": {
    "memeperp": {
      "url": "https://devapi.ours.meme/api/mcp",
      "headers": {
        "X-API-Key": "<YOUR_API_KEY>"
      }
    }
  }
}

3. Binance Agentic Wallet(baw)獨立通道 ​

如果你使用幣安官方無私鑰 MPC 錢包 @binance/agentic-wallet(baw CLI),請掛載專屬通道:

bash
claude mcp add --transport http memeperp-baw https://devapi.ours.meme/api/baw/mcp \
  --header "X-API-Key: <YOUR_API_KEY>"

該通道額外提供 baw_get_setup(自動偵測 USDT → BNB/USDC 兌換缺口與官方白名單合約)與 baw_build_approve(拒絕 maxUint256 無限授權,嚴格依精確預算產生 baw contract-call preview/execute 指令)。


4. MCP 批次呼叫與限流說明 ​

  • 單次 JSON-RPC Batch 最多支援 10 筆請求,每筆 tools/call 均依實際呼叫次數(或二期積分)計入對應錢包 API Key 的每分鐘與每日配額。
  • 觸發限流時,MCP 工具回傳 isError: true 且 structuredContent 包含 { rateLimited: true, reason, retryAfterSec, limit, used, resetAt },Agent 可據此自動退避重試。

BNB Chain 上的非託管永續合約與 AI Agent 基礎設施。