MCP Binance
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.
README
MCP Binance (TypeScript)
A minimal Model Context Protocol (MCP) server exposing tools to fetch Binance data. Tools:
get_ohlcv(spot/futures)get_mark_priceget_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/listto discover the schema, thentools/callwith arguments.
Deployment Options (No Domain Required)
🚀 Option 1: Direct IP Access (Simplest)
# Run without reverse proxy
PORT=8080 AUTH_TOKEN=your-secret npm start
# Access via: http://YOUR_SERVER_IP:8080
# Test: curl http://YOUR_SERVER_IP:8080/healthz
🌐 Option 2: Tunnel Services (Recommended)
Get instant HTTPS domain without buying one:
Ngrok (Free tier available)
# Install ngrok, then:
./deploy/start-with-ngrok.sh
# Gets you: https://random-name.ngrok.io
Cloudflare Tunnel (Free & reliable)
# Install cloudflared, then:
cloudflared tunnel login
cloudflared tunnel create mcp-binance
# Edit deploy/cloudflare-tunnel.yml with your tunnel ID
cloudflared tunnel --config deploy/cloudflare-tunnel.yml run
🆓 Option 3: Free Domain Services
Get a real domain for free:
DuckDNS (Recommended)
- Register at duckdns.org → Get
yourname.duckdns.org - Point domain to your server IP
- Run setup script:
sudo ./deploy/setup-free-domain.sh - Includes free SSL certificate via Let's Encrypt
Other free options:
- No-IP: yourname.ddns.net (dynamic DNS)
- FreeDNS: Various TLD options
- EU.org: Free EU domain (longer approval)
📊 Comparison Table
| Method | Cost | SSL | Stable | Setup |
|---|---|---|---|---|
| Direct IP | Free | ❌ | ✅ | 1 min |
| Ngrok | Free* | ✅ | ⚠️ | 2 min |
| Cloudflare | Free | ✅ | ✅ | 5 min |
| DuckDNS | Free | ✅ | ✅ | 10 min |
*Free tier has limitations
🛠️ Configuration Files
Different deployment scenarios:
deploy/nginx-http-only.conf- Direct IP or behind load balancerdeploy/nginx-free-domain.conf- Free domains with SSLdeploy/ngrok.yml- Ngrok tunnel configurationdeploy/cloudflare-tunnel.yml- Cloudflare tunnel setup
🧪 Local Domain Testing
Test your registered domain locally before deploying to a server:
🚀 One-Click Setup (Recommended)
# Interactive setup with menu
./deploy/setup-local-test.sh
# Choose:
# 1) HTTP mode (quick setup)
# 2) HTTPS mode (full experience with self-signed cert)
📋 Manual Setup
HTTP Testing
# 1. Add to hosts file
echo "127.0.0.1 shukehi.duckdns.org" | sudo tee -a /etc/hosts
# 2. Configure Nginx
sudo cp deploy/nginx-local-test.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/nginx-local-test.conf /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
# 3. Start MCP server
npm run build && npm start
# 4. Test
curl http://shukehi.duckdns.org/healthz
curl http://shukehi.duckdns.org/tools
HTTPS Testing (Self-Signed Certificate)
# 1. Generate SSL certificate
./deploy/generate-local-ssl.sh
# 2. Install certificate
sudo ./ssl/install-commands.sh
# 3. Configure HTTPS Nginx
sudo cp deploy/nginx-local-https.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/nginx-local-https.conf /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
# 4. Test HTTPS (accept security warning)
curl -k https://shukehi.duckdns.org/healthz
🧹 Cleanup
# Remove test setup
./deploy/setup-local-test.sh --cleanup
✅ Benefits of Local Testing
- Validate domain configuration before server deployment
- Test MCP client connections with real domain names
- Debug SSL/TLS issues in controlled environment
- Verify authentication flows with realistic URLs
- Perfect for development and integration testing
Security
- Set
AUTH_TOKENin.envand configure your reverse proxy (Nginx) with TLS. - Keep any exchange API keys read-only and in environment variables.
Traditional Deployment (With Domain)
Systemd unit (example)
See deploy/mcp-binance.service
Nginx reverse proxy (example)
See deploy/nginx.conf
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。