by kukapay
Freqtrade-MCP is an MCP (Multi-Client Protocol) server that integrates with the Freqtrade cryptocurrency trading bot. It enables AI agents to seamlessly interact with Freqtrade's REST API for automated trading operations and bot management.
Freqtrade-MCP is an MCP (Multi-Client Protocol) server designed to integrate with the Freqtrade cryptocurrency trading bot. It acts as a bridge, enabling AI agents to seamlessly interact with Freqtrade's REST API for automated trading operations.
To use Freqtrade-MCP, you need Python 3.13+ and a running Freqtrade instance with its REST API enabled. After cloning the repository, install dependencies using pip
or uv
. Then, configure your MCP client to point to the freqtrade-mcp
server and ensure your Freqtrade instance has its REST API enabled with the necessary authentication details.
Q: What are the prerequisites for running Freqtrade-MCP? A: You need Python 3.13+ and a running Freqtrade instance with its REST API enabled.
Q: How do I install Freqtrade-MCP?
A: Clone the repository, navigate to the directory, and install dependencies using pip install freqtrade-client mcp[cli]
.
Q: How do I configure Freqtrade-MCP with my Freqtrade instance?
A: You need to configure your MCP client with the freqtrade-mcp
server command and arguments, including environment variables for your Freqtrade API URL, username, and password. Additionally, ensure the REST API is enabled in your Freqtrade configuration.
Q: What Freqtrade API endpoints does Freqtrade-MCP expose? A: Freqtrade-MCP exposes a wide range of endpoints, including those for fetching market data, bot status, profit, balance, performance, whitelists, blacklists, trades, config, locks, and actions like placing trades, starting/stopping the bot, reloading config, and managing blacklists and locks.
Q: Can I use Freqtrade-MCP to automate my trading strategies? A: Yes, Freqtrade-MCP is specifically designed to enable AI agents to interact with Freqtrade for automated trading operations.
An MCP server that integrates with the Freqtrade cryptocurrency trading bot via its REST API, enabling seamless AI agent interaction for automated trading operation.
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.
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 |
Fetch Market Data:
Fetch Bot Status:
Fetch Profit:
Fetch Balance:
Fetch Performance:
Fetch Whitelist:
Fetch Blacklist:
Fetch Trades:
Fetch Config:
Fetch Locks:
Place Trade:
Start Bot:
Stop Bot:
Reload Config:
Add Blacklist:
Delete Blacklist:
Delete Lock:
This project is licensed under the MIT License. See the LICENSE file for details.
Reviews feature coming soon
Stay tuned for community discussions and feedback