aiowhitebit-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@aiowhitebit-mcp Get the order book for BTC_USDT"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
aiowhitebit-mcp
Message Control Protocol (MCP) server and client implementation for WhiteBit cryptocurrency exchange API. Built on top of aiowhitebit library and fastmcp.
Features
MCP server for WhiteBit API with public endpoints
Support for multiple transport protocols (stdio, SSE, WebSocket)
Easy-to-use client for interacting with the MCP server
Command-line interface for running the server
Integration with Claude Desktop
Real-time market data via WebSocket
Comprehensive test coverage and type checking
Modern development tools (ruff, pyright, pre-commit)
Caching with disk persistence
Rate limiting and circuit breaker patterns
New in aiowhitebit 0.3.0 Integration
BookTicker WebSocket Streams: Real-time best bid/ask price updates
Funding History for Futures: Access historical funding rates for futures markets
Enhanced WebSocket Events: All WebSocket events now include optional metadata (event_time, update_id)
Related MCP server: Bybit MCP Server
Quick Start
# Install the package
pip install aiowhitebit-mcp
# Run the server (stdio transport for Claude Desktop)
aiowhitebit-mcp --transport stdio
# Or run with SSE transport
aiowhitebit-mcp --transport sse --host 127.0.0.1 --port 8000Basic Usage
Client with Network Transport
import asyncio
import os
from aiowhitebit_mcp.client import WhiteBitMCPClient
async def main():
# Set the server URL (or use environment variable)
server_url = "http://localhost:8000/sse"
os.environ["WHITEBIT_MCP_URL"] = server_url
async with WhiteBitMCPClient() as client:
# Get market info
btc_usdt = await client.get_market_resource("BTC_USDT")
print("BTC/USDT Market Info:", btc_usdt)
# Get real-time price via WebSocket
price = await client.get_last_price("BTC_USDT")
print("Current BTC/USDT price:", price)
# Get order book
orderbook = await client.get_orderbook("BTC_USDT")
print("Order book:", orderbook)
# Get funding history for futures market
funding_history = await client.get_funding_history("BTC_USDT")
print("Funding history:", funding_history)
# Subscribe to BookTicker for real-time best bid/ask
subscription = await client.bookticker_subscribe("BTC_USDT")
print("BookTicker subscription:", subscription)
if __name__ == "__main__":
asyncio.run(main())Server Configuration
from aiowhitebit_mcp.server import create_server
import asyncio
# Create the server with custom configuration
server = create_server(
name="WhiteBit API"
)
# Run the server with desired transport
if __name__ == "__main__":
asyncio.run(
server.run(
transport="stdio", # or "sse"
host="127.0.0.1", # for network transports
port=8000 # for network transports
)
)Available Tools
Public API
get_server_time(): Get current server timeget_market_info(): Get all markets informationget_orderbook(market: str): Get order bookget_recent_trades(market: str, limit: int = 100): Get recent tradesget_ticker(market: str): Get ticker informationget_fee(market: str): Get trading feesget_server_status(): Get server statusget_asset_status_list(): Get status of all assetsget_funding_history(market: str): Get funding rate history for futures markets
WebSocket API
get_last_price(market: str): Get real-time priceget_market_depth(market: str): Get real-time order bookbookticker_subscribe(market: str): Subscribe to BookTicker stream for best bid/ask pricesbookticker_unsubscribe(market: str): Unsubscribe from BookTicker streamconnect_websocket(): Connect to WebSocket APIdisconnect_websocket(): Disconnect from WebSocket API
Resources
whitebit://markets: Get all markets informationwhitebit://markets/{market}: Get specific market informationwhitebit://assets: Get all assets informationwhitebit://assets/{asset}: Get specific asset information
Command-line Interface
# Show help
aiowhitebit-mcp --help
# Run with stdio transport (for Claude Desktop)
aiowhitebit-mcp --transport stdio
# Run with SSE transport
aiowhitebit-mcp --transport sse --host localhost --port 8000Development
# Clone the repository
git clone https://github.com/yourusername/aiowhitebit-mcp.git
cd aiowhitebit-mcp
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
# Run tests
pytest
# Run type checking
pyright src/aiowhitebit_mcp
# Run linting
ruff check .Examples
Check the examples/ directory for more usage examples:
claude_desktop_server.py: Run the server with stdio transport for Claude Desktopclaude_desktop_client.py: Client for connecting to a stdio serversse_server.py: Run the server with SSE transportsse_client.py: Client for connecting to an SSE server
License
Apache License 2.0
Available Tools
22 toolsbookticker_subscribeB
Subscribe to BookTicker stream for a market.
Args: market: Market pair (e.g., 'BTC_USDT')
Inputs: market (required). Returns: object
bookticker_unsubscribeB
Unsubscribe from BookTicker stream for a market.
Args: market: Market pair (e.g., 'BTC_USDT')
Inputs: market (required). Returns: object
circuit_breakersA
Get the status of all circuit breakers.
Inputs: no named parameters. Returns: object
connect_websocketC
Connect to the WebSocket API.
Inputs: no named parameters. Returns: object
disconnect_websocketB
Disconnect from the WebSocket API.
Inputs: no named parameters. Returns: object
get_assetsB
Get all available assets.
Inputs: no named parameters. Returns: object
get_asset_status_listB
Get status of all assets.
Inputs: no named parameters. Returns: object
get_feeC
Get trading fee for a specific market.
Args: market: Market pair (e.g., 'BTC_USDT')
Inputs: market (required). Returns: object
get_funding_historyA
Get funding rate history for a futures market.
Args: market: Market pair (e.g., 'BTC_USDT')
Inputs: market (required). Returns: object
get_market_activityB
Get activity information for all markets (last price, volume, etc.).
Inputs: no named parameters. Returns: object
get_market_infoB
Get information about all available markets.
Inputs: no named parameters. Returns: object
get_orderbookA
Get orderbook for a specific market.
Args: market: Market pair (e.g., 'BTC_USDT')
Inputs: market (required). Returns: object
get_recent_tradesB
Get recent trades for a specific market.
Args: market: Market pair (e.g., 'BTC_USDT') trade_type: Type of trades to retrieve ('buy' or 'sell')
Inputs: market (required), trade_type. Returns: object
get_server_statusB
Get current server status.
Inputs: no named parameters. Returns: object
get_server_timeA
Get current server time.
Inputs: no named parameters. Returns: object
get_symbolsB
Get all available symbols.
Inputs: no named parameters. Returns: object
get_tickerB
Get ticker information for a specific market.
Args: market: Market pair (e.g., 'BTC_USDT')
Inputs: market (required). Returns: object
get_tickersA
Get ticker information for all markets.
Inputs: no named parameters. Returns: object
healthA
Get the health status of the WhiteBit MCP server.
Inputs: no named parameters. Returns: object
metricsB
Get metrics for the WhiteBit MCP server.
Inputs: no named parameters. Returns: object
reset_circuit_breakerC
Reset a circuit breaker.
Args: name: The name of the circuit breaker to reset
Inputs: name (required). Returns: object
reset_metricsC
Reset all metrics.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools have distinct purposes, e.g., get_assets vs get_asset_status_list, get_ticker vs get_tickers. Some overlap between get_market_info and get_market_activity, but descriptions clarify differences.
Mix of verb_noun (get_*, reset_*), noun (health, metrics), and noun_verb (bookticker_subscribe). No consistent pattern throughout.
22 tools is slightly above the ideal range (3-15) but still reasonable for a crypto exchange MCP server covering market data, websockets, and admin functions.
Lacks trading-related tools like place_order, cancel_order, or account info, which are essential for a full exchange API. Significant gap that limits agent capabilities.
Maintenance
Related MCP Connectors
Real-time crypto market data: candles, tickers, orderbooks across 13+ exchanges via MCP.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
JW3.ai remote MCP server for market reads and confirm-gated trading execution.
MCP server for Financial Modeling Prep API with 250+ financial data tools
Related MCP Servers
- AlicenseBqualityDmaintenanceHigh-performance CCXT MCP server for cryptocurrency exchange integration24452 npm145MIT
- FlicenseBqualityDmaintenanceA comprehensive MCP server providing full access to Bybit's v5 API for real-time market data, trading operations, and account management. It enables AI assistants to execute trades, manage positions, and monitor wallet balances with built-in safety controls for both testnet and production environments.2230 PyPI6-

cdcxofficial
AlicenseNot gradedqualityCmaintenanceMCP server for the Crypto.com Exchange API, providing 86 dynamically generated tools for market data, trading, account management, and more with real-time WebSocket streaming and safety enforcement.71 npm27Apache 2.0- FlicenseNot gradedqualityDmaintenancePython-based MCP server that provides real-time and historical cryptocurrency data from 100+ exchanges via CCXT, with tools for tickers, OHLCV, markets, and order books.1-