Freqtrade-MCP
Integrates with the Freqtrade cryptocurrency trading bot via its REST API to enable AI-driven automated trading and bot management. It allows users to fetch market data, monitor performance, manage whitelists, and execute trades through natural language.
README
Freqtrade-MCP
An MCP server that integrates with the Freqtrade cryptocurrency trading bot via its REST API, enabling seamless AI agent interaction for automated trading operation.
For more crypto-related MCP servers, see the Kukapay MCP servers.
Installation
Prerequisites
- Python 3.13+: Ensure Python is installed on your system.
- Freqtrade: A running Freqtrade instance with the REST API enabled (see Freqtrade Docs).
- Git: For cloning the repository.
Steps
-
Clone the Repository:
git clone https://github.com/kukapay/freqtrade-mcp.git cd freqtrade-mcp -
Install Dependencies: Using
pip:pip install freqtrade-client mcp[cli]Or with
uv(optional):uv add freqtrade-client "mcp[cli]" -
Client Configuration:
"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" } } } -
Freqtrade Configuration:
Enable the rest API by adding the api_server section to your configuration and setting api_server.enabled to true.
Sample 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" },Check the document here.
Usage
Available Tools
The server exposes the following Freqtrade API endpoints as MCP tools:
| Tool | Description | Parameters |
|---|---|---|
fetch_market_data |
Fetch OHLCV data for a pair | pair: str, timeframe: str |
fetch_bot_status |
Get open trade status | None |
fetch_profit |
Get profit summary | None |
fetch_balance |
Get account balance | None |
fetch_performance |
Get performance metrics | None |
fetch_whitelist |
Get whitelist of pairs | None |
fetch_blacklist |
Get blacklist of pairs | None |
fetch_trades |
Get trade history | None |
fetch_config |
Get bot configuration | None |
fetch_locks |
Get trade locks | None |
place_trade |
Place a buy/sell trade | pair: str, side: str, stake_amount: float |
start_bot |
Start the bot | None |
stop_bot |
Stop the bot | None |
reload_config |
Reload bot configuration | None |
add_blacklist |
Add pair to blacklist | pair: str |
delete_blacklist |
Remove pair from blacklist | pair: str |
delete_lock |
Delete a trade lock | lock_id: int |
run_backtest |
Start backtest via REST API | strategy: str, enable_protections: bool, optional timerange, timeframe |
fetch_backtest_status |
Get current backtest status/result | None |
fetch_backtest_history |
List backtest history | optional filename: str |
abort_backtest |
Abort currently running backtest | None |
reset_backtest |
Reset backtest state/result | None |
Example Prompts
-
Fetch Market Data:
- "Show me the hourly price data for BTC/USDT."
- "What’s the 5-minute chart for ETH/BTC like?"
- "Give me the latest candlestick data for XRP/USDT over the past hour."
-
Fetch Bot Status:
- "What’s the current status of my open trades?"
- "Are there any active trades right now?"
- "Tell me about the bot’s trading activity at the moment."
-
Fetch Profit:
- "How much profit have I made so far?"
- "What’s the total profit summary for the bot?"
- "Can you show me my trading gains?"
-
Fetch Balance:
- "What’s my account balance?"
- "How much money do I have in the trading account?"
- "Tell me the current balance of my Freqtrade wallet."
-
Fetch Performance:
- "How well has the bot been performing?"
- "What are the performance metrics for my trades?"
- "Show me the trading stats."
-
Fetch Whitelist:
- "Which pairs are on the whitelist?"
- "What trading pairs is the bot allowed to use?"
- "List the whitelisted pairs for me."
-
Fetch Blacklist:
- "Which pairs are blacklisted?"
- "What trading pairs are blocked right now?"
- "Tell me about the blacklist."
-
Fetch Trades:
- "What’s the history of my closed trades?"
- "Show me all the trades the bot has completed."
- "Can you list my past trades?"
-
Fetch Config:
- "What’s the current bot configuration?"
- "Show me the settings the bot is using."
- "Tell me about the Freqtrade config."
-
Fetch Locks:
- "Are there any trade locks active?"
- "What locks are currently in place?"
- "Show me the list of trading locks."
-
Place Trade:
- "Buy 0.01 BTC/USDT right now."
- "Sell 0.05 ETH/USDT immediately."
- "Place a buy order for 0.1 XRP/USDT."
-
Start Bot:
- "Start the trading bot."
- "Turn on the Freqtrade bot."
- "Get the bot running now."
-
Stop Bot:
- "Stop the trading bot."
- "Shut down the Freqtrade bot."
- "Pause the bot’s trading."
-
Reload Config:
- "Reload the bot’s configuration."
- "Update the bot settings."
- "Refresh the Freqtrade config."
-
Add Blacklist:
- "Blacklist ETH/USDT."
- "Add BTC/ETH to the blacklist."
- "Block trading for XRP/USDT."
-
Delete Blacklist:
- "Remove ETH/USDT from the blacklist."
- "Unblock BTC/ETH for trading."
- "Take XRP/USDT off the blacklist."
-
Delete Lock:
- "Delete the trade lock with ID 123."
- "Remove lock number 45."
- "Unlock the trade with ID 7."
License
This project is licensed under the MIT License. See the LICENSE file for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。