by kukapay
Integrates the Freqtrade cryptocurrency trading bot with MCP, exposing its REST API as tools for AI agents to perform automated trading operations.
Freqtrade Mcp provides an MCP server that wraps the Freqtrade REST API, turning each endpoint into a ready‑to‑use tool for AI agents. The server enables agents to query market data, monitor bot status, manage trades, and control the bot (start/stop, reload config, blacklist management) without writing custom integration code.
git clone https://github.com/kukapay/freqtrade-mcp.git
cd freqtrade-mcp
pip install freqtrade-client mcp[cli]
(or use uv add freqtrade-client "mcp[cli]"
).serverConfig
below) with the Freqtrade connection variables (FREQTRADE_API_URL
, FREQTRADE_USERNAME
, FREQTRADE_PASSWORD
).fetch_market_data
, place_trade
, start_bot
, etc., from any compatible AI agent or script.Q: Which Python version is required? A: Python 3.13 or newer.
Q: Do I need to run Freqtrade locally? A: Yes, a running Freqtrade instance with the REST API enabled is mandatory.
Q: How do I secure the connection?
A: Set FREQTRADE_USERNAME
and FREQTRADE_PASSWORD
in the MCP server environment; optionally use HTTPS for the API URL.
Q: Can I add custom tools? A: Yes, extend the server code to expose additional Freqtrade endpoints or your own logic.
Q: What if I use a different package manager?
A: The server can be started with any command that runs __main__.py
; the provided uv
example works, but python -m freqtrade_mcp
would also work.
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.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "freqtrade-mcp": { "command": "uv", "args": [ "run", "__main__.py" ], "env": { "FREQTRADE_API_URL": "http://127.0.0.1:8080", "FREQTRADE_USERNAME": "your_username", "FREQTRADE_PASSWORD": "your_password" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by goat-sdk
Enables AI agents to send and receive payments, purchase goods and services, execute investment strategies, tokenize assets, and obtain financial insights by leveraging blockchains, stablecoins, and wallets.
by financial-datasets
Provides access to income statements, balance sheets, cash flow statements, stock prices, market news, and cryptocurrency data through MCP tools for AI assistants.
by alpacahq
Enables large language models to trade stocks and options, retrieve real‑time and historical market data, and manage portfolios using plain English commands through a local or remote MCP server.
by XeroAPI
Provides a bridge between the Model Context Protocol and Xero's API, enabling standardized access to Xero accounting and business features.
by stefanoamorelli
Provides an MCP server that connects AI models to SEC EDGAR filings, enabling real‑time retrieval of company filings, financial statements, and insider‑trading data with exact XBRL precision and verifiable filing references.
by ariadng
Enables AI LLMs to execute trades on the MetaTrader 5 platform through the Model Context Protocol.
by calvernaz
Provides access to Alpha Vantage stock market data via an MCP server, supporting stdio and HTTP streaming modes with optional OAuth 2.1 authentication.
by kukapay
Provides a comprehensive set of cryptocurrency technical analysis indicators and ready‑to‑use trading strategies through an MCP interface, enabling AI agents and applications to generate buy, hold, or sell signals.
by OctagonAI
Provides AI-powered financial research and analysis by integrating with the Octagon Market Intelligence API, enabling extraction of insights from public filings, earnings call transcripts, financial metrics, stock market data, and private market transactions within Claude Desktop and other popular MCP clients.