Trade on BloFin with AI | BloFin MCP Server
BloFin MCP
AI-Native. Trade-Ready.
An open-source MCP server for BloFin. Built for AI agents and LLM-powered apps — 40 tools across market data, trading, account, and asset management.
npm v1.2.0
Why BloFin MCP?
40 tools covering the full BloFin API, from market data to advanced trading strategies.
Demo Trading Ready
Test with BloFin's demo trading environment before going live. No real funds at risk.
Real-time Market Data
Access tickers, order books, trades, candlesticks, funding rates and more — all in real time.
Full Trading Support
Place orders, set TP/SL, manage algo orders, and close positions with natural language commands.
Secure Authentication
HMAC-SHA256 signed requests. Your API keys stay local and are never sent to third parties.
Account Management
Check balances, positions, leverage, margin mode, and account configuration.
Asset Operations
Transfer funds, view deposit/withdrawal history, and manage your assets across accounts.
Quick Setup
Get up and running in under a minute. Works with Claude Desktop, Cursor, and any MCP-compatible client.
Get your BloFin API credentials
Create an API key at blofin.com with the permissions you need (read, trade, or both). Save your MCP API Key, Secret, and Passphrase.
Install the BloFin API package
npm install -g blofin-mcp
Configure your BloFin MCP client
{
"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"
}
}
}
}All 40 MCP Trading Tools
Complete coverage of the BloFin API. Click each category to explore the available tools.
get_
Get available trading instruments and contract specs
get_
Get latest prices, bid/ask, 24h volume
get_
Get order book depth
get_
Get recent trades
get_
Get mark/index prices
get_
Get OHLCV candlestick data
get_
Get current funding rates
get_
Get historical funding rates
get_
Get futures account balance
get_
Get open positions
get_
View leverage settings
set_
Set leverage for an instrument
get_
View margin mode (cross/isolated)
set_
Set margin mode
get_
View position mode (one-way/hedge)
set_
Set position mode
get_
Get account configuration
place_
Place a new order (market, limit, post_only, fok, ioc)
cancel_
Cancel an order by ID
batch_
Place multiple orders at once
cancel_
Cancel multiple orders at once
close_
Close an open position
get_
Get pending orders
get_
Get historical orders
get_
Get specific order details
get_
Get trade fill history
place_
Place take-profit / stop-loss order
cancel_
Cancel a TP/SL order
get_
Get pending TP/SL orders
get_
Get TP/SL order history
place_
Place an algo/trigger order
cancel_
Cancel an algo order
get_
Get pending algo orders
get_
Get algo order history
get_
Get balances across account types
fund_
Transfer funds between accounts
get_
Get transfer history
get_
Get deposit records
get_
Get withdrawal records
get_
Get API key information and permissions
BloFin MCP Environment Variables
Variable
Required
Description
BLOFIN_
Yes
Your BloFin API key
BLOFIN_
Yes
Your BloFin API secret
BLOFIN_
Yes
Your BloFin API passphrase
BLOFIN_
No
API base URL (defaults to demo trading)
Frequently Asked Questions
What is BloFin MCP?
BloFin MCP is a Model Context Protocol (MCP) server that enables AI agents and assistants to communicate with the BloFin trading platform using a standardized interface. By implementing the MCP open standard — a protocol designed to connect large language models (LLMs) with external systems — BloFin MCP translates natural-language commands into real trading actions, market queries, and portfolio management operations. It lets users execute trades, fetch real-time market data, and manage their accounts through AI-driven conversational workflows with reduced integration overhead.
How do I connect my AI assistant to BloFin?
To connect, install and run the BloFin MCP server and configure it with your BloFin API credentials from BloFin website. Then add the MCP server details to your AI assistant’s MCP configuration so the assistant can access BloFin tools.
Is demo trading available on BloFin MCP?
Yes — BloFin MCP supports demo trading, letting you test strategies and interactions with simulated funds before going live. Simply use your demo API credentials and demo endpoint when configuring your MCP setup.
Is BloFin MCP free to use?
Yes — the BloFin MCP server is free to use. There are no subscription fees to run it. Standard BloFin trading fees and commissions still apply when real trades are executed.
What trading tools are available through BloFin MCP?
BloFin MCP exposes the full BloFin API toolset, including market data (tickers, order books, candlesticks), account info (balances, positions), and trading operations (place, cancel orders) along with other account-related actions.

