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

blofin-mcp

v1.1.2

Published

MCP server for BloFin exchange API - market data, trading, account management

Downloads

433

Readme

BloFin MCP Server

A Model Context Protocol (MCP) server for the BloFin cryptocurrency exchange API. Provides tools for market data, account management, and trading operations.

Features

Public Data (no authentication required)

  • get_instruments - Get available trading instruments and contract specs
  • get_tickers - Get latest prices, bid/ask, 24h volume
  • get_orderbook - Get order book depth
  • get_trades - Get recent trades
  • get_mark_price - Get mark/index prices
  • get_candlesticks - Get OHLCV candlestick data
  • get_funding_rate - Get current funding rates
  • get_funding_rate_history - Get historical funding rates

Account (authentication required)

  • get_balance - Get futures account balance
  • get_positions - Get open positions
  • get_leverage_info / set_leverage - View/set leverage
  • get_margin_mode / set_margin_mode - View/set margin mode
  • get_position_mode / set_position_mode - View/set position mode
  • get_account_config - Get account configuration

Trading (authentication required)

  • place_order - Place a new order (market, limit, post_only, fok, ioc)
  • cancel_order - Cancel an order
  • batch_orders / cancel_batch_orders - Batch order operations
  • close_position - Close a position
  • get_open_orders - Get pending orders
  • get_order_history - Get order history
  • get_order_detail - Get specific order details
  • get_fills_history - Get trade fill history
  • place_tpsl / cancel_tpsl - Take-profit/stop-loss orders
  • get_pending_tpsl / get_tpsl_history - View TP/SL orders
  • place_algo_order / cancel_algo_order - Algo/trigger orders
  • get_pending_algo_orders / get_algo_order_history - View algo orders

Asset Management (authentication required)

  • get_asset_balances - Get balances across account types
  • fund_transfer - Transfer funds between accounts
  • get_fund_transfer_history - Get transfer history
  • get_deposit_history / get_withdrawal_history - Deposit/withdrawal records
  • get_apikey_info - Get API key information

Setup

Environment Variables

| Variable | Required | Description | |---|---|---| | BLOFIN_API_KEY | Yes | Your BloFin API key | | BLOFIN_API_SECRET | Yes | Your BloFin API secret | | BLOFIN_PASSPHRASE | Yes | Your BloFin API passphrase | | BLOFIN_BASE_URL | No | API base URL (defaults to demo trading) | | BLOFIN_BROKER_ID | No | Broker ID provided by BloFin (auto-injected into trading requests) |

Base URLs

  • Demo Trading: https://demo-trading-openapi.blofin.com (default)
  • Production: https://openapi.blofin.com

Install & Build

npm install
npm run build

Claude Desktop

Add to your Claude Desktop config (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "blofin": {
      "command": "npx",
      "args": ["-y", "blofin-mcp"],
      "env": {
        "BLOFIN_API_KEY": "your-api-key",
        "BLOFIN_API_SECRET": "your-api-secret",
        "BLOFIN_PASSPHRASE": "your-passphrase",
        "BLOFIN_BASE_URL": "https://openapi.blofin.com",
        "BLOFIN_BROKER_ID": "your-broker-id"
      }
    }
  }
}

Cursor / Windsurf / Cline

Same configuration format as above. Add to each client's MCP settings.

OpenClaw

Add "mcpServers" to your ~/.openclaw/openclaw.json (top-level field, alongside identity, agent, etc.):

{
  "identity": { "name": "Clawd", "emoji": "🦞" },
  "agent": { "workspace": "~/.openclaw/workspace" },

  // Add this section ↓
  "mcpServers": {
    "blofin": {
      "command": "npx",
      "args": ["-y", "blofin-mcp"],
      "env": {
        "BLOFIN_API_KEY": "your-api-key",
        "BLOFIN_API_SECRET": "your-api-secret",
        "BLOFIN_PASSPHRASE": "your-passphrase",
        "BLOFIN_BASE_URL": "https://openapi.blofin.com",
        "BLOFIN_BROKER_ID": "your-broker-id"
      }
    }
  }
}

If your openclaw.json already has a "mcpServers" section with other servers, just add "blofin": { ... } inside it.

Restart OpenClaw after saving. The agent will automatically discover the 36 BloFin tools.

API Documentation

See BloFin API Docs for full API reference.