freqtrade-mcp
Freqtrade-MCP: Connect AI agents to Freqtrade for automated crypto trading via a secure, standardized MCP server.

freqtrade-mcp Solution Overview
Freqtrade-MCP is an MCP server designed to seamlessly connect AI agents with the Freqtrade cryptocurrency trading bot, enabling automated trading operations. It exposes Freqtrade's REST API endpoints as standardized MCP tools, facilitating secure and consistent interaction between AI models and the trading platform.
This server empowers developers to build AI-driven trading strategies by providing tools for fetching market data, managing bot status, accessing profit summaries, and executing trades. It supports communication via standard input/output or HTTP/SSE, offering flexibility in integration. By leveraging the MCP protocol, Freqtrade-MCP ensures a standardized interface, simplifying the development of sophisticated AI trading agents.
Built with Python 3.10+, it relies on freqtrade-client
and mcp[cli]
libraries for efficient operation. The core value lies in enabling AI models to interact with Freqtrade in a controlled and predictable manner, streamlining the development and deployment of automated trading solutions.
freqtrade-mcp Key Capabilities
Expose Freqtrade API as Tools
Freqtrade-MCP acts as a bridge, converting Freqtrade's REST API endpoints into standardized MCP tools. This allows AI agents to interact with Freqtrade in a structured and predictable manner. Instead of directly calling the REST API, the AI agent can use the MCP client to invoke tools like fetch_market_data
, place_trade
, or fetch_profit
. Each tool encapsulates a specific Freqtrade API call, simplifying the interaction for the AI model. This abstraction promotes modularity and reduces the complexity of integrating AI with trading strategies. For example, an AI model can use the fetch_market_data
tool to get the latest price data and then use the place_trade
tool to execute a trade based on its analysis.
Technically, this is achieved by mapping each relevant Freqtrade API endpoint to a corresponding MCP tool within the Freqtrade-MCP server. The server then handles the communication with the Freqtrade instance, translates the MCP requests into Freqtrade API calls, and returns the results to the AI agent via the MCP client.
Standardized AI-Trading Interaction
Freqtrade-MCP establishes a standardized interface for AI agents to interact with the Freqtrade trading bot. By adhering to the MCP protocol, it ensures that AI models can seamlessly integrate with Freqtrade without requiring custom code or complex API integrations. This standardization simplifies the development and deployment of AI-driven trading strategies. The AI agent can use a consistent set of tools and data formats, regardless of the underlying trading platform. For instance, an AI model designed to work with Freqtrade-MCP can be easily adapted to other MCP-compatible trading platforms, promoting code reusability and reducing integration costs.
This standardization is achieved through the MCP client-server architecture, where the AI agent acts as the client and Freqtrade-MCP acts as the server. The MCP protocol defines the communication rules and data formats, ensuring interoperability between the client and server.
Real-time Trading Control
Freqtrade-MCP provides AI agents with real-time control over the Freqtrade trading bot. Through the exposed MCP tools, AI models can monitor market conditions, analyze trading opportunities, and execute trades in real-time. This allows for dynamic and adaptive trading strategies that can respond quickly to changing market conditions. For example, an AI agent can use the fetch_bot_status
tool to monitor the current state of the bot, the fetch_balance
tool to track account balance, and the place_trade
tool to execute trades based on real-time market data. This level of control enables AI models to optimize trading performance and maximize profits.
The real-time control is facilitated by the low-latency communication channels supported by MCP, such as HTTP/SSE. These channels allow for near real-time data streaming and command execution, ensuring that the AI agent can react quickly to market events.
Simplified Configuration Management
Freqtrade-MCP simplifies the configuration and management of the Freqtrade trading bot for AI agents. By exposing the fetch_config
and reload_config
tools, AI models can access and modify the bot's configuration settings without requiring direct access to the Freqtrade configuration files. This allows for dynamic configuration adjustments based on market conditions or AI model recommendations. For example, an AI agent can use the fetch_config
tool to retrieve the current bot configuration, analyze the settings, and then use the reload_config
tool to update the configuration with optimized parameters. This simplifies the process of fine-tuning the bot's behavior and adapting it to changing market dynamics.
The configuration management is implemented through the Freqtrade REST API, which provides endpoints for accessing and modifying the bot's configuration settings. Freqtrade-MCP wraps these endpoints into MCP tools, providing a standardized and secure interface for AI agents to interact with the configuration.