npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bitunix-mcp

v0.1.0

Published

Secure MCP server for the Bitunix exchange (Spot + Futures). Read-only by default; trading tools are opt-in. No withdrawal or transfer capability by design.

Readme

bitunix-mcp

CI

A security-first MCP server for the Bitunix exchange, covering both Spot and USDT-M Futures APIs.

Built for use with Claude Desktop, Claude Code, and any other MCP-compatible client.

Security model

This server is designed so that the worst-case blast radius is as small as possible:

| Layer | Protection | |---|---| | No withdrawals — ever | Withdrawal, transfer, and deposit-address endpoints are not implemented at all. There is no flag to enable them. | | Read-only by default | Trading tools (place_order, cancel_orders) are only registered when you explicitly set BITUNIX_ENABLE_TRADING=true. Without it, the AI cannot see or call them. | | Credentials via env only | API keys are read from environment variables, never accepted as tool arguments, never returned in output, and redacted from all error messages. | | Pinned endpoints | Base URLs (fapi.bitunix.com, openapi.bitunix.com) are hardcoded constants. Redirects are refused. No user or model input can change where requests go. | | Strict input validation | Every tool argument is validated with zod (symbol format, decimal strings, enums, bounds) before it touches a request. | | Hardened HTTP | 15s request timeout, 5 MB response cap, HTTPS only. | | Secure signing | Bitunix's double SHA-256 scheme with a crypto.randomBytes nonce per request. Secrets never leave the process. |

Recommended API key settings on Bitunix

When creating your API key in the Bitunix dashboard:

  1. Disable withdrawal permission — this server never needs it.
  2. Grant read-only permission unless you intend to trade.
  3. Bind your IP address to the key (IP whitelist).
  4. Use a dedicated sub-account with limited funds if you enable trading.

Installation

npm install
npm run build

Configuration

Configure via environment variables (see .env.example):

| Variable | Required | Description | |---|---|---| | BITUNIX_API_KEY | No | API key. Omit for public market data only. | | BITUNIX_SECRET_KEY | No | Secret key. Must be set together with the API key. | | BITUNIX_ENABLE_TRADING | No | Set to true to register order placement/cancel tools. Default: off. |

Claude Desktop / Claude Code

{
  "mcpServers": {
    "bitunix": {
      "command": "node",
      "args": ["/path/to/bitunix-mcp/dist/index.js"],
      "env": {
        "BITUNIX_API_KEY": "your-api-key",
        "BITUNIX_SECRET_KEY": "your-secret-key"
      }
    }
  }
}

Add "BITUNIX_ENABLE_TRADING": "true" only if you want the AI to be able to place and cancel orders.

With Claude Code:

claude mcp add bitunix -e BITUNIX_API_KEY=... -e BITUNIX_SECRET_KEY=... -- node /path/to/bitunix-mcp/dist/index.js

Tools

Futures — public market data (no credentials needed)

| Tool | Description | |---|---| | futures_get_tickers | 24h tickers, optionally filtered by symbols | | futures_get_depth | Order book bids/asks | | futures_get_kline | Candlestick data (1m…1M intervals) | | futures_get_funding_rate | Current funding rate | | futures_get_trading_pairs | Contract specifications |

Futures — account (requires credentials, read-only)

| Tool | Description | |---|---| | futures_get_account | Balance and margin info | | futures_get_positions | Open positions | | futures_get_history_positions | Closed positions | | futures_get_pending_orders | Open orders | | futures_get_history_orders | Order history |

Spot — public market data

| Tool | Description | |---|---| | spot_get_last_price | Latest price for a pair | | spot_get_depth | Order book bids/asks | | spot_get_kline | Historical candlesticks | | spot_get_trading_pairs | All spot pairs |

Spot — account (requires credentials, read-only)

| Tool | Description | |---|---| | spot_get_account | Balances | | spot_get_pending_orders | Open orders | | spot_get_order_history | Order history (paginated) | | spot_get_order_detail | Single order detail |

Trading tools (only with BITUNIX_ENABLE_TRADING=true)

| Tool | Description | |---|---| | futures_place_order | Place a futures order (limit/market, TP/SL supported) | | futures_cancel_orders | Cancel futures orders | | spot_place_order | Place a spot order | | spot_cancel_orders | Cancel spot orders |

Development

npm run dev    # run from source
npm test       # run tests
npm run build  # compile to dist/

Disclaimer

This is an unofficial, community-built integration. Trading cryptocurrency derivatives carries substantial risk. Nothing here is financial advice, and you are solely responsible for any orders placed through this software. See SECURITY.md for the threat model and reporting process.

License

MIT