Skip to main content
Glama

MCP Binance

by shukehi

MCP Binance (TypeScript)

A minimal Model Context Protocol (MCP) server exposing tools to fetch Binance data. Tools:

  • get_ohlcv (spot/futures)

  • get_mark_price

  • get_funding_rate (futures)

  • get_open_interest (futures, simple endpoint)

Quick start (VPS)

# 1) Install Node 20+, then: npm i cp .env.example .env # edit .env (PORT, AUTH_TOKEN, TRANSPORT) # 2) Dev run (HTTP transport by default): npm run dev # 3) Build & run npm run build && npm start

HTTP JSON-RPC endpoint

  • POST http://<host>:<port>/rpc

  • Headers: Content-Type: application/json, Authorization: Bearer <AUTH_TOKEN> (if set)

  • Body:

    • {"jsonrpc":"2.0","id":1,"method":"tools/list"}

    • {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_ohlcv","arguments":{...}}}

Register in ChatGPT (custom connector)

  • Add a new MCP connector and point it to your HTTP endpoint (or run with TRANSPORT=stdio for local/desktop hosts).

  • The model will call tools/list to discover the schema, then tools/call with arguments.

Security

  • Set AUTH_TOKEN in .env and configure your reverse proxy (Nginx) with TLS.

  • Keep any exchange API keys read-only and in environment variables.

Systemd unit (example)

See deploy/mcp-binance.service

Nginx reverse proxy (example)

See deploy/nginx.conf

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables users to fetch real-time cryptocurrency market data from Binance including OHLCV prices, mark prices, funding rates, and open interest for both spot and futures markets. Provides easy access to Binance trading data through a simple JSON-RPC interface.

  1. Quick start (VPS)
    1. HTTP JSON-RPC endpoint
    2. Register in ChatGPT (custom connector)
  2. Security
    1. Systemd unit (example)
      1. Nginx reverse proxy (example)

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/shukehi/crypto-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server