ZebPay MCP Server

io.github.ZebpayRajesh由 GitHub 帳號 ZebpayRajesh 發布v1.0.2更新於 Oct 24, 2026

MCP server for ZebPay crypto exchange — fetch prices, balances, and manage orders

已驗證STDIO僅桌面金融商業與電商

概覽

AI 產生的概覽

讓助理讀取 ZebPay 加密貨幣行情、查詢餘額,並下單或取消現貨與合約訂單。

可以做什麼
這是一個本機 stdio MCP 伺服器,涵蓋 ZebPay 交易所的現貨與合約 API。公開工具可取得行情、訂單簿、成交、K 線、交易所資訊、市場列表與 24 小時行情。私有工具可讀取餘額、未成交訂單、持倉與歷史紀錄,並可下市價單或限價單、取消訂單,以及增加或減少保證金。它也提供 MCP 資源與提示,並具備請求驗證、重試與選用的檔案日誌。
適用情境
當你希望助理監控 ZebPay 現貨或合約行情、查看帳戶餘額、持倉與訂單歷史,或透過對話下單與管理訂單時使用。它面向 Cursor、Claude Desktop 等本機 MCP 用戶端,而非託管或網頁情境。
執行需求
以 npm 套件形式透過 stdio 在本機執行,需要 Node.js 20+ 與 npm 9+。私有工具需要 ZebPay API 金鑰與密鑰,透過環境變數 ZEBPAY_API_KEY 與 ZEBPAY_API_SECRET 提供,並需要連線至 ZebPay API 端點的外送網路。基礎 URL、傳輸方式、日誌層級、逾時與重試次數也透過環境變數設定。
安裝前請注意
此伺服器持有可進行交易的交易所憑證:ZEBPAY_API_KEY 與 ZEBPAY_API_SECRET。交易工具會下真實訂單並取消訂單,可能動用資金,因此權限與 IP 白名單應採最小權限,除非確實需要交易否則應設為唯讀。密鑰僅在建立時顯示一次,切勿提交至版本控制,外洩後應立即輪換。選用的檔案日誌可能記錄操作,應避免納入版本控制並遮蔽密鑰。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

Zebpay MCP Server

[AI Trading Made Simple]

Production-ready TypeScript MCP (Model Context Protocol) server for Zebpay spot and futures APIs, using stdio transport only. Model Context Protocol (MCP) is a standard way for AI assistants to securely call tools and data sources. It is designed for MCP clients like Cursor, Claude Desktop, and MCP Inspector that connect through local process execution. The server provides both market-data and trading workflows with strict validation, safe error handling, and developer-friendly observability.

What This Server Provides

  • Public market data tools (spot + futures)
  • Private trading/account tools (requires API credentials)
  • MCP resources and prompts for agent workflows
  • Request validation via Zod
  • Structured error handling and optional file logging

Features

  • Stdio-only MCP server for secure local integration with MCP clients
  • Spot and futures API coverage for both public and authenticated operations
  • HMAC-based authenticated request flow for private endpoints
  • Input validation and normalized MCP error responses
  • Outbound request retries and timeout controls
  • Optional structured file logging for debugging and auditability

Supported Tools

Spot (Public + Private)

  • Market data: tickers, order book, trades, klines, exchange info, currencies
  • Trading: place market/limit orders, cancel orders, cancel by symbol, cancel all
  • Account: balances, open orders, order history, trade history, exchange fee
  • Example tool names:
    • zebpay_public_getTicker
    • zebpay_public_getOrderBook
    • zebpay_spot_placeMarketOrder
    • zebpay_spot_placeLimitOrder
    • zebpay_spot_getBalance

Futures (Public + Private)

  • Market data: health status, markets, market info, order book, 24h ticker, aggregate trades
  • Trading/account: wallet balance, place order, add/reduce margin, open orders, positions
  • History: order history, linked orders, trade history, transaction history
  • Example tool names:
    • zebpay_futures_public_getMarkets
    • zebpay_futures_public_getOrderBook
    • zebpay_futures_placeOrder
    • zebpay_futures_getWalletBalance
    • zebpay_futures_getPositions

Tech Stack

  • Node.js (ESM)
  • TypeScript
  • @modelcontextprotocol/sdk
  • undici
  • zod

Project Structure

text
src/├── index.ts                  # Stdio MCP server entrypoint├── mcp/                      # Tools, resources, prompts, MCP errors/logging├── private/                  # Authenticated Zebpay clients├── public/                   # Public market-data clients├── security/                 # Credentials + signing helpers├── http/                     # Shared outbound HTTP client to Zebpay APIs├── validation/               # Schemas and validation helpers├── utils/                    # Caching, metrics, formatting, file logging└── types/                    # Shared response types

Prerequisites

  • Node.js 20+
  • npm 9+
  • Zebpay API credentials (for private tools)
  • Create your API key/secret from the official ZebPay API portal: https://api.zebpay.com/

Creating a ZebPay API Key

Use the steps below to generate API credentials for this MCP server:

  1. Open the ZebPay API portal: https://api.zebpay.com/
  2. Sign in to your ZebPay account.
  3. Go to API Trading and click Create New API Key.
  4. Enter key details:
    • key name (for example: zebpay-mcp-local)
    • required permissions (read-only for market/account checks, trading permissions only if needed)
    • optional IP whitelist (recommended for better security)
  5. Complete OTP verification.
  6. Copy and save:
    • API Key
    • Secret Key (shown once)

Then add them to your local .env file:

env
ZEBPAY_API_KEY=your_api_keyZEBPAY_API_SECRET=your_api_secret

Security notes:

  • Never commit API keys/secrets to git.
  • Prefer least-privilege API permissions.
  • Rotate keys immediately if exposed.

Setup

bash
git clone <your-repo-url>cd zebpay-mcp-servernpm installcp env.example .env

Update .env (all values are read from environment; there are no fallback defaults in code):

env
ZEBPAY_API_KEY=your_api_key    # Use the API key from the step aboveZEBPAY_API_SECRET=your_api_secret    # Use the Secret key from the step aboveZEBPAY_SPOT_BASE_URL=https://sapi.zebpay.com/api/v2ZEBPAY_FUTURES_BASE_URL=https://futuresbe.zebpay.com/api/v1ZEBPAY_MARKET_BASE_URL=https://www.zebapi.com/api/v1/marketMCP_TRANSPORTS=stdioLOG_LEVEL=infoHTTP_TIMEOUT_MS=15000HTTP_RETRY_COUNT=2

Build and Run

bash
npm run buildnpm start

Optional logging to file:

bash
npm run start:log

MCP Client Configuration (Stdio)

Example MCP client config:

json
{  "mcpServers": {    "zebpay": {      "command": "node",      "args": [          "/absolute/path/to/zebpay-mcp-server/dist/index.js"        ],      "env": {        "ZEBPAY_API_KEY": "YOUR_API_KEY_HERE",        "ZEBPAY_API_SECRET": "YOUR_API_SECRET_HERE",        "LOG_LEVEL": "info"      }    }  }}

[Install in Cursor]

Also see: mcp-config.json.example.

Environment Variables

VariableRequiredDescriptionExample value
ZEBPAY_API_KEYYesZebpay API key (required for private tools)YOUR_API_KEY_HERE
ZEBPAY_API_SECRETYesZebpay API secret (required for private tools)YOUR_API_SECRET_HERE
MCP_TRANSPORTSYesMust be stdiostdio
ZEBPAY_SPOT_BASE_URLYesSpot API base URLhttps://www.zebapi.com/api/v2
ZEBPAY_FUTURES_BASE_URLYesFutures API base URLhttps://futures-api.zebpay.com/api/v1
ZEBPAY_MARKET_BASE_URLYesMarket API base URLhttps://www.zebapi.com/api/v1/market
LOG_LEVELYesdebug, info, warn, errorinfo
LOG_FILENoFile path for logslogs/mcp-server.log
HTTP_TIMEOUT_MSYesOutbound request timeout (ms)15000
HTTP_RETRY_COUNTYesRetry count for outbound requests2

Developer Commands

bash
npm run buildnpm testnpm run test:watchnpm run logsnpm run logs:watchnpm run logs:errorsnpm run logs:statsnpm run logs:clear

Logging

  • Log tools and examples: scripts/README.md
  • Full logging docs: docs/LOGGING.md
  • Keep logs out of git (logs/ is ignored)

Issues

Found a bug or want to request a feature?

  • Create an issue from the GitHub Issues tab for this repository.
  • You can also use direct links after replacing <your-org> and <your-repo>:
    • Bug report: https://github.com/<your-org>/<your-repo>/issues/new?template=bug_report.md
    • Feature request: https://github.com/<your-org>/<your-repo>/issues/new?template=feature_request.md
  • Include these details for faster triage:
    • MCP client used (Cursor/Claude Desktop/other)
    • Node.js version and OS
    • Minimal reproduction steps
    • Relevant logs (redact secrets)

License

MIT

來源:README.md,提交 c5c6f67

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。