freqtrade-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@freqtrade-mcp show my open trades"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@furkankoykiran/freqtrade-mcp
TypeScript MCP server for Freqtrade — connect AI agents (Claude, Cursor, Cline) to your crypto trading bot via its REST API.
Built with the official MCP TypeScript SDK, it exposes 15 tools covering account stats, trade management, market data, pair list control, trade execution, and bot lifecycle — all accessible from any MCP-compatible client.
Features
Category | Tools |
Account |
|
Trades |
|
Market Data |
|
Pair Lists |
|
Execution |
|
Lifecycle |
|
Related MCP server: freqtrade-mcp
Prerequisites
Freqtrade running with the REST API enabled (see Freqtrade REST API docs)
Node.js 18+ (
node --version)
Enable the Freqtrade REST API
Add the following to your Freqtrade config.json:
"api_server": {
"enabled": true,
"listen_ip_address": "127.0.0.1",
"listen_port": 8080,
"verbosity": "error",
"enable_openapi": false,
"jwt_secret_key": "change-this-to-a-random-32-char-string",
"username": "Freqtrader",
"password": "YourStrongPassword"
}Installation
Option 1 — Run directly with npx (no install required)
FREQTRADE_PASSWORD=yourpassword npx @furkankoykiran/freqtrade-mcpOption 2 — Install globally from npm
npm install -g @furkankoykiran/freqtrade-mcp
FREQTRADE_PASSWORD=yourpassword freqtrade-mcpOption 3 — Install from GitHub Packages
npm install -g @furkankoykiran/freqtrade-mcp --registry=https://npm.pkg.github.com
FREQTRADE_PASSWORD=yourpassword freqtrade-mcpOption 4 — Build from source
git clone https://github.com/furkankoykiran/freqtrade-mcp.git
cd freqtrade-mcp
npm install
npm run build
node build/index.jsConfiguration
The server is configured entirely via environment variables — no config file needed.
Variable | Default | Description |
|
| Base URL of the Freqtrade API server |
|
| API username from your Freqtrade config |
| (empty) | API password — required |
Copy .env.example to .env and fill in your values for local development.
MCP Client Setup
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"freqtrade": {
"command": "npx",
"args": ["-y", "@furkankoykiran/freqtrade-mcp"],
"env": {
"FREQTRADE_API_URL": "http://127.0.0.1:8080",
"FREQTRADE_USERNAME": "Freqtrader",
"FREQTRADE_PASSWORD": "YourStrongPassword"
}
}
}
}VS Code (Cline / Continue)
Add to your MCP server settings:
{
"freqtrade": {
"command": "npx",
"args": ["-y", "@furkankoykiran/freqtrade-mcp"],
"env": {
"FREQTRADE_API_URL": "http://127.0.0.1:8080",
"FREQTRADE_USERNAME": "Freqtrader",
"FREQTRADE_PASSWORD": "YourStrongPassword"
}
}
}Built from source
{
"freqtrade": {
"command": "node",
"args": ["/absolute/path/to/freqtrade-mcp/build/index.js"],
"env": {
"FREQTRADE_API_URL": "http://127.0.0.1:8080",
"FREQTRADE_USERNAME": "Freqtrader",
"FREQTRADE_PASSWORD": "YourStrongPassword"
}
}
}Available Tools
Account
get_profit_stats
Retrieve current profit/loss statistics: total profit, win/loss ratio, best pair, drawdown, trading volume, and more.
get_balance
Retrieve the current account balance across all currencies, including free, used, and total amounts.
get_performance
Retrieve per-pair trading performance metrics, including profit and trade count.
Parameter | Type | Required | Description |
| string | No | Filter to a specific pair (e.g. |
Trades
get_open_trades
Retrieve all currently active trades, including entry price, current profit, stake amount, and duration.
get_trade
Retrieve detailed information about a specific trade by its ID.
Parameter | Type | Required | Description |
| number | Yes | Numeric trade ID |
get_trade_history
Retrieve closed trade history with optional pagination.
Parameter | Type | Required | Description |
| number | No | Max trades to return (max 500) |
| number | No | Pagination offset |
Market Data
get_market_data
Retrieve live OHLCV candlestick data for a trading pair.
Parameter | Type | Required | Description |
| string | Yes | Trading pair (e.g. |
| enum | Yes |
|
| number | No | Number of candles (max 500) |
Pair Lists
get_whitelist / get_blacklist
Retrieve the current whitelist / blacklist.
add_to_blacklist
Add a trading pair to the blacklist.
Parameter | Type | Required | Description |
| string | Yes | Pair to blacklist (e.g. |
remove_from_blacklist
Remove a trading pair from the blacklist.
Parameter | Type | Required | Description |
| string | Yes | Pair to remove |
Trade Execution
execute_trade
Force-enter a trade, bypassing strategy signals. The bot manages the position after entry.
Parameter | Type | Required | Description |
| string | Yes | Trading pair (e.g. |
|
| Yes | Trade direction |
| number | No | Amount in stake currency |
| number | No | Limit price (omit for market order) |
|
| No | Order type |
Natural language examples:
"buy 100 USDT of BTC" →
pair=BTC/USDT,side=long,stake_amount=100"short ETH/USDT at 2000" →
pair=ETH/USDT,side=short,price=2000
force_exit_trade
Force-exit an open trade. Supports full and partial exits.
Parameter | Type | Required | Description |
| number | Yes | Trade ID to exit |
|
| No | Exit order type (default: market) |
| number | No | Partial exit amount |
Bot Lifecycle
start_bot / stop_bot
Start or stop the trading bot.
reload_config
Reload the bot configuration from disk without restarting the process.
get_bot_info
Retrieve bot version and the timestamp of the last strategy run cycle.
get_locks
Retrieve all active trade locks.
delete_lock
Remove a specific trade lock by ID.
Parameter | Type | Required | Description |
| number | Yes | Lock ID to remove |
Development
# Clone and install
git clone https://github.com/furkankoykiran/freqtrade-mcp.git
cd freqtrade-mcp
npm install
# Run in development mode (auto-reloads on change)
cp .env.example .env
# Edit .env with your Freqtrade credentials
npm run dev
# Type-check
npm run typecheck
# Lint
npm run lint
# Build for production
npm run buildTesting with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsSet the environment variables in the Inspector UI and verify all 15 tools are listed.
Contributing
Contributions are welcome. Please read the contributing guidelines and open an issue before submitting a pull request for significant changes.
License
MIT — see LICENSE.
Available Tools
19 toolsadd_to_blacklistB
Add a trading pair to the blacklist to prevent the bot from opening new trades on it.
Inputs: pair (required).
delete_lockA
Remove a specific trade lock by its ID. Use get_locks to list current locks and their IDs.
Inputs: lock_id (required).
execute_tradeA
Manually enter (force-enter) a trade on a specific pair. The bot bypasses strategy signals and opens the position immediately. Natural language examples: • "buy 100 USDT of BTC/USDT" → pair=BTC/USDT, side=long, stake_amount=100 • "short 0.5 ETH/USDT at 2000" → pair=ETH/USDT, side=short, price=2000 The position will be managed by the active strategy after entry.
Inputs: pair (required), side (required), stake_amount, price, +1 more.
force_exit_tradeA
Manually exit (force-sell) an open trade, bypassing the strategy exit signals. Supports full and partial exits. Examples: • Close trade 42 immediately: trade_id=42 • Partial exit 50% of trade 7: trade_id=7, amount=
Inputs: trade_id (required), order_type, amount.
get_balanceA
Check the current wallet and account balance across all currencies, including free, used, and total amounts.
Inputs: no named parameters.
get_blacklistA
View the current trading pair blacklist — pairs that are explicitly excluded from trading.
Inputs: no named parameters.
get_bot_infoA
Get general information about the bot: software version and the timestamp of the last strategy run cycle.
Inputs: no named parameters.
get_locksA
Retrieve all active trade locks. Locks prevent the bot from opening new trades on specific pairs for a defined period.
Inputs: no named parameters.
get_market_dataA
Fetch live OHLCV (Open/High/Low/Close/Volume) candlestick market data for a specific trading pair and timeframe.
Inputs: pair (required), timeframe (required), limit.
get_open_tradesA
View all currently active (open) trades, including entry price, current profit, stake amount, and duration.
Inputs: no named parameters.
get_performanceA
Retrieve per-pair trading performance metrics, including profit and trade count for each pair.
Inputs: pair.
get_profit_statsA
Retrieve current profit and loss statistics: total profit, win/loss ratio, best pair, drawdown, trading volume, and more.
Inputs: no named parameters.
get_tradeA
Retrieve detailed information about a specific trade by its ID, including full history, fees, and profit/loss.
Inputs: trade_id (required).
get_trade_historyA
Retrieve closed trade history with optional pagination. Returns trades sorted by ID.
Inputs: limit, offset.
get_whitelistA
View the current trading pair whitelist — the set of pairs the bot is allowed to trade.
Inputs: no named parameters.
reload_configA
Reload the bot configuration from disk. Useful after editing config.json without restarting the process. The bot will briefly pause trading during the reload.
Inputs: no named parameters.
remove_from_blacklistB
Remove a trading pair from the blacklist, allowing the bot to trade it again.
Inputs: pair (required).
start_botA
Start the Freqtrade bot. The bot will begin trading according to its configured strategy. Has no effect if already running.
Inputs: no named parameters.
stop_botA
Stop the Freqtrade bot. Existing open trades will remain open and will not be closed automatically. Use force_exit_trade to close positions manually.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool targets a distinct action or resource. Blacklist, lock, trade execution, and bot control tools are clearly separated. Even similar tools like get_performance and get_profit_stats are differentiated by per-pair vs global perspective.
All tools follow a consistent verb_noun pattern (e.g., get_balance, add_to_blacklist, force_exit_trade). No mixing of conventions like camelCase or inconsistent verb forms.
19 tools is slightly above the ideal range but still reasonable for a comprehensive trading bot server. Each tool covers a necessary function without redundancy.
Core CRUD operations for trades, blacklist, locks, and bot control are present. Minor gaps exist, such as the inability to modify active trade parameters (e.g., stop loss) or cancel pending orders, but the essential workflow is covered.
Maintenance
Related MCP Connectors
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Related MCP Servers
AlicenseCqualityDmaintenanceAn MCP server providing unified access to blockchain operations, bridging, swapping, and crypto trading strategies for AI agents.37178GPL 3.0- AlicenseNot gradedqualityDmaintenanceAn MCP server that integrates with the Freqtrade cryptocurrency trading bot.149MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that provides AI agents with financial tools including real-time quotes, backtesting, technical analysis, and multi-exchange data via a simple CLI interface.2MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for cryptocurrency trading via Freqtrade, enabling trade management, balance checks, strategy configuration, backtesting, and bot lifecycle control from any MCP-compatible AI agent.MIT