Freqtrade-MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install freqtrade-client mcp[cli]
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "FREQTRADE_API_URL=${FREQTRADE_API_URL}" -e "FREQTRADE_USERNAME=${FREQTRADE_USERNAME}" -e "FREQTRADE_PASSWORD=${FREQTRADE_PASSWORD}" freqtrade -- node "<FULL_PATH_TO_FREQTRADE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_FREQTRADE_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:FREQTRADE_API_URLFREQTRADE_USERNAMEFREQTRADE_PASSWORD
README.md

Integrates with the Freqtrade cryptocurrency trading bot via its REST API

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

  1. Clone the Repository:

    git clone https://github.com/kukapay/freqtrade-mcp.git
    cd freqtrade-mcp
    
  2. Install Dependencies: Using pip:

    pip install freqtrade-client mcp[cli]
    

    Or with uv (optional):

    uv add freqtrade-client "mcp[cli]"
    
  3. 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"
        } 
      } 
    }
    
  4. 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

  1. Fetch Market Data:
    • "Show me the hourly price data for BTC/USDT."
    • "Wh

Tools (22)

fetch_market_dataFetch OHLCV data for a pair
fetch_bot_statusGet open trade status
fetch_profitGet profit summary
fetch_balanceGet account balance
fetch_performanceGet performance metrics
fetch_whitelistGet whitelist of pairs
fetch_blacklistGet blacklist of pairs
fetch_tradesGet trade history
fetch_configGet bot configuration
fetch_locksGet trade locks
place_tradePlace a buy/sell trade
start_botStart the bot
stop_botStop the bot
reload_configReload bot configuration
add_blacklistAdd pair to blacklist
delete_blacklistRemove pair from blacklist
delete_lockDelete a trade lock
run_backtestStart backtest via REST API
fetch_backtest_statusGet current backtest status/result
fetch_backtest_historyList backtest history
abort_backtestAbort currently running backtest
reset_backtestReset backtest state/result

Environment Variables

FREQTRADE_API_URLrequiredThe URL of the Freqtrade REST API instance
FREQTRADE_USERNAMErequiredUsername for Freqtrade API authentication
FREQTRADE_PASSWORDrequiredPassword for Freqtrade API authentication

Configuration

claude_desktop_config.json
{"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"}}}}

Try it

Show me the hourly price data for BTC/USDT.
What is my current account balance and profit summary?
Add ETH/USDT to the blacklist.
Start a backtest for my latest strategy.

Frequently Asked Questions

What are the key features of Freqtrade-MCP?

Full integration with Freqtrade REST API. Real-time monitoring of bot status, balance, and performance. Automated trade execution via natural language. Backtest management including starting, aborting, and viewing history. Configuration management and pair list control.

What can I use Freqtrade-MCP for?

Quickly checking trading bot performance without opening the web UI. Managing trade blacklists on the fly during market volatility. Triggering backtests for new strategies using natural language commands. Monitoring account balances and open trades through Claude.

How do I install Freqtrade-MCP?

Install Freqtrade-MCP by running: pip install freqtrade-client mcp[cli]

What MCP clients work with Freqtrade-MCP?

Freqtrade-MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Freqtrade-MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare