funding-rates-mcp is an MCP (Model Context Protocol) server designed to provide real-time funding rate data from major cryptocurrency exchanges, enabling AI agents to detect arbitrage opportunities.
Key capabilities include:
- Real-time funding rates: Fetch current funding rates from Binance, OKX, Bybit, Bitget, Gate, and CoinEx.
- Pivot table output: Display trading pairs as rows, exchanges as columns, and include a Divergence column that shows the maximum funding rate difference for each trading pair.
- Claude Desktop integration: Run as an MCP server for interactive queries.
Usage:
- Clone the repository: git clone https://github.com/kukapay/funding-rates-mcp.git && cd funding-rates-mcp
- Set up dependencies using uv: uv sync
- Configure Claude Desktop: Edit the Claude configuration file: on macOS the path is ~/Library/Application Support/Claude/claude_desktop_config.json, and on Windows the path is %APPDATA%\Claude\claude_desktop_config.json. Add the MCP server configuration: { "mcpServers": { "funding-rates-mcp": { "command": "uv", "args": ["--directory", "/absolute/path/to/funding-rates-mcp", "run", "funding-rates-mcp"] } } }
- Restart Claude Desktop and look for the hammer icon to confirm the integration was successful.
The server provides the following MCP tool for querying funding rates:
- compare_funding_rates: Compare the current funding rates for multiple trading pairs on specified exchanges, returning a pivot Markdown table that includes a Divergence column showing the maximum funding rate difference for each trading pair.
- Parameters: symbols (List[str], required): list of trading pairs (for example ["BTC/USDT:USDT", "ETH/USDT:USDT"]).
- exchanges (List[str], optional): list of exchanges to compare (for example ["binance", "okx"]). Defaults to all supported exchanges (binance, okx, bybit, bitget, gate, coinex).
- params (Dict, optional): additional parameters for the API call. Defaults to {}.
- Returns: a Markdown table with trading pairs as rows, exchanges as columns, funding rates as values (in percentage format), and a Divergence column.
The server also includes the following MCP prompt for generating natural language queries:
- compare_funding_rates_prompt: Generates a natural language prompt for comparing funding rates across all supported exchanges, suitable for input in Claude Desktop.
- Parameters: symbols (List[str], required): list of trading pairs.
- Returns: a string prompt (for example "Compare the funding rates for BTC/USDT:USDT, ETH/USDT:USDT across binance, okx, bybit, bitget, gate, coinex.").
- Purpose: Used internally by Claude Desktop to interpret user queries, or for testing in MCP Inspector.
Applicable scenarios include: directly querying and comparing funding rates across multiple exchanges in Claude Desktop to discover arbitrage opportunities. For example, entering "Compare funding rates for BTC/USDT:USDT and ETH/USDT:USDT across all exchanges." outputs a table containing rates for each exchange and Divergence. You can also specify particular exchanges, such as "Compare funding rates for SOL/USDT:USDT on Binance, OKX, and Bybit.".
Limitations: The project requires using uv for dependency management, and Claude Desktop can optionally be installed for interactive queries. The project uses the MIT license. Other limitations not mentioned in the materials (such as rate limits, data latency, etc.) are not currently provided.