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 分

    请在仓库或注册中心条目中声明许可证。