freqtrade-mcp is an MCP server used to integrate with the Freqtrade cryptocurrency trading bot via its REST API, enabling seamless interaction between AI agents and Freqtrade for automated trading operations.
Purpose: To wrap Freqtrade's REST API endpoints as MCP tools for AI agents to call, thereby querying trading data or performing trading operations.
Main capabilities: The server exposes the following Freqtrade API endpoints as MCP tools, including getting market data, getting bot status, getting profit, getting balance, getting performance, getting whitelist, getting blacklist, getting trade records, getting configuration, getting locks, placing trades, starting the bot, stopping the bot, reloading configuration, adding to blacklist, deleting from blacklist, deleting locks. Users can trigger these operations with natural language prompts, such as "show hourly price data for BTC/USDT", "what is the current status of my open trades", "how much profit have I made so far", "what is my account balance", "how is the bot performing", "which trading pairs are in the whitelist", "which trading pairs are blacklisted", "what is my closed trade history", "what is the current bot configuration", "are there any trade locks active", "buy 0.01 BTC/USDT now", "start the trading bot", "stop the trading bot", "reload the bot configuration", "add ETH/USDT to the blacklist", "remove ETH/USDT from the blacklist", "delete the trade lock with ID 123", etc.
Usage: Requires Python 3.13+, a Freqtrade instance with REST API enabled, and Git. First clone the repository: git clone https://github.com/kukapay/freqtrade-mcp.git,然后 cd freqtrade-mcp. Install dependencies: use pip to install pip install freqtrade-client mcp[cli], or use uv (optional) uv add freqtrade-client "mcp[cli]". Then configure the MCP client. An example configuration is: "mcpServers": { "freqtrade-mcp": { "command": "uv", "args": [ "--directory", "/your/path/to/freqtrade-mcp", "run", "main.py" ], "env": { "FREQTRADE_API_URL": "http://127.0.0.1:8080", "FREQTRADE_USERNAME": "your_username", "FREQTRADE_PASSWORD": "your_password" } } }. At the same time, the REST API needs to be enabled in the Freqtrade configuration: add the api_server section and set api_server.enabled to true. Example configuration: "api_server": { "enabled": true, "listen_ip_address": "127.0.0.1", "listen_port": 8080, "verbosity": "error", "enable_openapi": false, "jwt_secret_key": "somethingrandom", "CORS_origins": [], "username": "Freqtrader", "password": "SuperSecret1!", "ws_token": "sercet_Ws_t0ken" }. For more information, see the relevant documentation.
Applicable scenarios: Suitable for automated trading operation scenarios that require AI agents to interact with the Freqtrade trading bot through natural language, such as querying market conditions, monitoring bot status and performance, viewing account balance and trade history, managing the whitelist/blacklist and trade locks, and performing operations such as placing orders, starting/stopping the bot, and reloading configuration.
Limitations: Requires Python 3.13+, a Freqtrade instance with REST API enabled, and Git. The Freqtrade configuration needs to enable api_server and set enabled to true. The project uses the MIT license; see the LICENSE file for details. Other limitations not described in the materials are not currently provided.