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

sarrafa-mcp

v0.1.0

Published

MCP server for AI agents to interact with Binance — trading, transfers, and market data

Readme

sarrafa-mcp

npm version License: MIT

MCP server for AI agents to interact with Binance -- trading, transfers, and market data.

Sarrafa (Arabic: صرّافة) means "exchange" or "money changer."

Quick Start

claude mcp add sarrafa-mcp -e BINANCE_API_KEY=your_key -e BINANCE_API_SECRET=your_secret -- npx -y sarrafa-mcp

Or add manually to your MCP client configuration:

{
  "mcpServers": {
    "sarrafa-mcp": {
      "command": "npx",
      "args": ["-y", "sarrafa-mcp"],
      "env": {
        "BINANCE_API_KEY": "your_key",
        "BINANCE_API_SECRET": "your_secret"
      }
    }
  }
}

Configuration

| Variable | Required | Description | |----------|----------|-------------| | BINANCE_API_KEY | Yes | Your Binance API key | | BINANCE_API_SECRET | Yes | Your Binance API secret |

Available Tools

Account (Read)

| Tool | Description | |------|-------------| | get_account_info | Account balances, permissions, and commission rates | | get_account_status | Account status (normal/locked) | | get_api_permissions | Current API key permissions | | get_trade_fee | Trading fee rates for symbol(s) |

Market Data (Read)

| Tool | Description | |------|-------------| | get_ticker_price | Latest price for one or all symbols | | get_ticker_24hr | 24hr price change statistics | | get_order_book | Order book depth (bids/asks) | | get_klines | Candlestick/kline data | | get_recent_trades | Recent trades for a symbol | | get_exchange_info | Trading rules, symbol info, filters | | get_avg_price | Current average price | | get_book_ticker | Best bid/ask price and quantity |

Order Queries (Read)

| Tool | Description | |------|-------------| | get_order | Query a specific order | | get_open_orders | All open orders | | get_all_orders | All orders for a symbol | | get_my_trades | Trade history for a symbol |

Asset Info (Read)

| Tool | Description | |------|-------------| | get_deposit_history | Deposit history | | get_withdraw_history | Withdrawal history | | get_asset_detail | Asset details (fees, limits) | | get_all_coins_info | All coin network info |

Margin Account (Read)

| Tool | Description | |------|-------------| | get_margin_account | Cross margin account details | | get_margin_all_assets | All margin assets | | get_margin_all_pairs | All margin trading pairs | | get_margin_price_index | Margin price index | | get_isolated_margin_account | Isolated margin account info | | get_margin_open_orders | Open margin orders | | get_margin_all_orders | All margin orders for a symbol | | get_margin_my_trades | Margin trade history |

Transfer Queries (Read)

| Tool | Description | |------|-------------| | get_transfer_history | Universal transfer history |

Spot Trading (Destructive)

| Tool | Description | |------|-------------| | place_order | Place a spot order (market, limit, stop-loss, etc.) | | cancel_order | Cancel an active order | | cancel_all_orders | Cancel all open orders for a symbol | | cancel_replace_order | Atomically cancel and replace an order | | place_oco_order | Place an OCO order | | place_oto_order | Place an OTO order | | place_otoco_order | Place an OTOCO order |

Margin Trading (Destructive)

| Tool | Description | |------|-------------| | margin_borrow | Borrow assets on margin | | margin_repay | Repay margin loan | | place_margin_order | Place a margin trade order | | cancel_margin_order | Cancel a margin order | | cancel_all_margin_orders | Cancel all open margin orders | | isolated_margin_transfer | Transfer between spot and isolated margin |

Universal Transfer (Destructive)

| Tool | Description | |------|-------------| | universal_transfer | Transfer assets between any wallets |

Usage Examples

Check your portfolio:

"What's my current USDT balance?"

The agent calls get_account_info and returns your balances.

Place a market order:

"Buy 0.001 BTC at market price"

The agent calls place_order with { symbol: "BTCUSDT", side: "BUY", type: "MARKET", quantity: 0.001 }. You'll see a confirmation prompt before execution.

Transfer between wallets:

"Move 500 USDT from my spot wallet to margin"

The agent calls universal_transfer with { type: "MAIN_MARGIN", asset: "USDT", amount: 500 }.

Security

  • API keys are passed via environment variables and never logged or stored
  • All trading and transfer operations are marked as destructive in MCP annotations, which triggers a confirmation prompt in Claude before execution
  • No withdrawal support is included -- only trading and transfers between your own wallets
  • This server connects to production Binance API only

Development

# Install dependencies
bun install

# Run in development
bun run dev

# Run tests
bun test

# Build for publishing
bun run build

License

MIT