blofin-mcp
Provides 40 tools for BloFin cryptocurrency exchange, enabling market data, account management, and trading operations via MCP.
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 specsget_tickers- Get latest prices, bid/ask, 24h volumeget_orderbook- Get order book depthget_trades- Get recent tradesget_mark_price- Get mark/index pricesget_candlesticks- Get OHLCV candlestick dataget_funding_rate- Get current funding ratesget_funding_rate_history- Get historical funding rates
Account (authentication required)
get_balance- Get futures account balanceget_positions- Get open positionsget_leverage_info- Get leverage info for an instrumentset_leverage- Set leverage for an instrumentget_margin_mode- Get current margin mode for an instrumentset_margin_mode- Set margin mode for an instrumentget_position_mode- Get current position modeset_position_mode- Set position modeget_account_config- Get account configuration
Trading (authentication required)
place_order- Place a new order (market, limit, post_only, fok, ioc)cancel_order- Cancel an orderbatch_orders- Place multiple orders at oncecancel_batch_orders- Cancel multiple orders at onceclose_position- Close a positionget_open_orders- Get pending ordersget_order_history- Get order historyget_order_detail- Get specific order detailsget_fills_history- Get trade fill historyplace_tpsl- Place take-profit/stop-loss ordercancel_tpsl- Cancel a take-profit/stop-loss orderget_pending_tpsl- Get pending TP/SL ordersget_tpsl_history- Get TP/SL order historyplace_algo_order- Place an algo order (trigger/conditional)cancel_algo_order- Cancel algo ordersget_pending_algo_orders- Get pending algo ordersget_algo_order_history- Get algo order history
Asset Management (authentication required)
get_asset_balances- Get balances across account typesfund_transfer- Transfer funds between accountsget_fund_transfer_history- Get transfer historyget_deposit_history- Get deposit historyget_withdrawal_history- Get withdrawal historyget_apikey_info- Get API key information
Important Risk Notice
- Trading tools can place and cancel real orders.
- Use demo environment first, then switch to production only when ready.
- Create API keys with least privilege and restrict by IP whenever possible.
- Never share your API key, secret, or passphrase.
Tool Coverage
Current implementation registers 40 tools in total:
- Public Market Data: 8 tools
- Account: 9 tools
- Trading: 17 tools
- Asset Management: 6 tools
Getting Your API Key
- Go to blofin.com and log in (or create an account)
- Navigate to APIs page
- Click Create API Key and select BloFin MCP as the API type
- Set your permissions (read-only for market data, or enable trading as needed)
- Save your API Key, Secret Key, and Passphrase — you'll need them for configuration below
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) |
Base URLs
- Demo Trading:
https://demo-trading-openapi.blofin.com(default) - Production:
https://openapi.blofin.com
Install and Build
npm install
npm run typecheck
npm run build
Installation
Claude Desktop (Extension)
Download the latest blofin-mcp.mcpb from GitHub Releases and double-click to install. Claude Desktop will prompt you to enter your API Key, API Secret, and Passphrase.
Claude Desktop (Manual)
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"
}
}
}
}
Claude Code
claude mcp add blofin -- npx -y blofin-mcp
Then set environment variables in your shell profile or .env file:
export BLOFIN_API_KEY="your-api-key"
export BLOFIN_API_SECRET="your-api-secret"
export BLOFIN_PASSPHRASE="your-passphrase"
export BLOFIN_BASE_URL="https://openapi.blofin.com"
Cursor
Add to .cursor/mcp.json in your project root (or global config at ~/.cursor/mcp.json):
{
"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"
}
}
}
}
Windsurf
Add to your Windsurf MCP config (~/.codeium/windsurf/mcp_config.json):
{
"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"
}
}
}
}
Cline (VS Code)
Open Cline MCP settings (Cline → MCP Servers → Configure) and add:
{
"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"
}
}
}
}
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"
}
}
}
}
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 40 BloFin tools.
Open Source Project Files
- License:
LICENSE - Contributing guide:
CONTRIBUTING.md - Security policy:
SECURITY.md - Community behavior policy:
CODE_OF_CONDUCT.md - Change history:
CHANGELOG.md
Reporting and Support
- Bug reports and feature requests: GitHub Issues
- Security issues: follow
SECURITY.md - API reference: BloFin API Docs
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。