MCP Connector

Control Freqtrade with AI Agents

freqtrade-mcp lets AI agents monitor and control a running Freqtrade crypto trading bot through its REST API.

Works with freqtrade

91
Spark score
out of 100
Updated 9 months ago
Source checked Sep 8, 2026
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Integrate AI agents with your Freqtrade cryptocurrency trading bot. Seamlessly execute automated trading operations by leveraging the bot's REST API for data retrieval and trade execution.

Outcomes

What it gets done

01

Retrieve real-time market data (OHLCV) and bot status.

02

Manage trades, balance, and performance metrics programmatically.

03

Control trading pairs via whitelist/blacklist management.

04

Place buy/sell orders and manage bot operations (start/stop/reload).

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

fetch_market_data

Retrieve OHLCV data for a trading pair

fetch_bot_status

Retrieve status of open trades

fetch_profit

Retrieve profit summary

fetch_balance

Retrieve account balance

fetch_performance

Retrieve performance metrics

fetch_whitelist

Retrieve whitelist of pairs

fetch_blacklist

Retrieve blacklist of pairs

fetch_trades

Retrieve trade history

+7 tools

Overview

freqtrade-mcp server

freqtrade-mcp gives AI agents REST API access to a running Freqtrade crypto trading bot, covering market data, account status, and trade placement. Use it when you already run Freqtrade with its REST API enabled and want an AI agent to monitor or control the bot.

What it does

freqtrade-mcp is an MCP server that integrates with Freqtrade, the open-source cryptocurrency trading bot, via its REST API. It gives an AI agent seamless interaction with a running Freqtrade instance for automated trading operations: checking market data, bot status, and performance, and issuing trading commands, without the agent talking to the Freqtrade REST API directly.

When to use - and when NOT to

Use it when you already run a Freqtrade bot with its REST API enabled and want an AI agent to monitor it (status, profit, balance, performance, whitelist and blacklist, trade history, locks) or act on it (place trades, start or stop the bot, manage the pair blacklist, reload configuration). It requires Python 3.13+ and a running Freqtrade instance with api_server.enabled set to true, so it is not useful without an existing Freqtrade deployment. Because place_trade and start_bot/stop_bot can move real funds against your exchange account, treat credentials and access to this server with the same care as the exchange API keys behind Freqtrade itself.

Capabilities

  • Market and account data: fetch_market_data (OHLCV for a pair and timeframe), fetch_bot_status, fetch_profit, fetch_balance, fetch_performance, fetch_trades, fetch_config
  • Pair management: fetch_whitelist, fetch_blacklist, add_blacklist, delete_blacklist
  • Trade locks: fetch_locks, delete_lock
  • Trading and bot control: place_trade with pair, side, and stake_amount parameters, start_bot, stop_bot, reload_config

Example requests it is built to answer, from the project's own prompt list: "Show me the hourly price data for BTC/USDT", "What's the current status of my open trades?", "How much profit have I made so far?", "What's my account balance?", and "Which pairs are on the whitelist?"

How to install

Requires Python 3.13+, Git, and a running Freqtrade instance with its REST API enabled. Clone the repository and install dependencies:

git clone https://github.com/kukapay/freqtrade-mcp.git
cd freqtrade-mcp
pip install freqtrade-client mcp[cli]

Configure your MCP client with the server's directory and Freqtrade credentials:

"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"
    }
  }
}

On the Freqtrade side, enable the REST API with an api_server block setting enabled to true, plus a listen address, port, username, password, and jwt_secret_key.

Who it's for

Freqtrade users who want an AI agent to monitor bot performance and account status, or to place trades and control the bot, through natural language instead of the Freqtrade REST API or CLI directly. It is released under the MIT License.

Source 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.

GitHub License
Python Version
Status

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

Example Prompts

  1. 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."
  2. 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."
  3. 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?"
  4. 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."
  5. Fetch Performance:

    • "How well has the bot been performing?"
    • "What are the performance metrics for my trades?"
    • "Show me the trading stats."
  6. Fetch Whitelist:

    • "Which pairs are on the whitelist?"
    • "What trading pairs is the bot allowed to use?"
    • "List the whitelisted pairs for me."
  7. Fetch Blacklist:

    • "Which pairs are blacklisted?"
    • "What trading pairs are blocked right now?"
    • "Tell me about the blacklist."
  8. 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?"
  9. Fetch Config:

    • "What’s the current bot configuration?"
    • "Show me the settings the bot is using."
    • "Tell me about the Freqtrade config."
  10. Fetch Locks:

    • "Are there any trade locks active?"
    • "What locks are currently in place?"
    • "Show me the list of trading locks."
  11. Place Trade:

    • "Buy 0.01 BTC/USDT right now."
    • "Sell 0.05 ETH/USDT immediately."
    • "Place a buy order for 0.1 XRP/USDT."
  12. Start Bot:

    • "Start the trading bot."
    • "Turn on the Freqtrade bot."
    • "Get the bot running now."
  13. Stop Bot:

    • "Stop the trading bot."
    • "Shut down the Freqtrade bot."
    • "Pause the bot’s trading."
  14. Reload Config:

    • "Reload the bot’s configuration."
    • "Update the bot settings."
    • "Refresh the Freqtrade config."
  15. Add Blacklist:

    • "Blacklist ETH/USDT."
    • "Add BTC/ETH to the blacklist."
    • "Block trading for XRP/USDT."
  16. Delete Blacklist:

    • "Remove ETH/USDT from the blacklist."
    • "Unblock BTC/ETH for trading."
    • "Take XRP/USDT off the blacklist."
  17. Delete Lock:

    • "Delete the trade lock with ID 123."
    • "Remove lock number 45."
    • "Unlock the trade with ID 7."

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.