Freqtrade-MCP

Freqtrade-MCP

MCP server bridge for Freqtrade automated crypto trading bots

92
Stars
24
Forks
92
Watchers
5
Issues
Freqtrade-MCP acts as a Model Context Protocol (MCP) server that connects AI agents to the Freqtrade cryptocurrency trading bot via its REST API. It exposes Freqtrade operations as standardized MCP tools, enabling automated trading workflows through programmatic access. The system ensures AI agents can manage market data, trigger trades, and monitor performance in a uniform context protocol environment. It supports secure and configurable deployment with support for relevant API endpoints.

Key Features

Exposes Freqtrade REST API as MCP tools
Automated cryptocurrency trading management
Fetches market data and bot status
Programmatic trade execution (buy/sell)
Secure configuration of API credentials
Bot start/stop and configuration reload capabilities
Provides account balance and profit summaries
Tool interface for whitelists, blacklists, and trade locks
Integration-ready for AI-driven agents
Active Python-based server

Use Cases

AI-driven cryptocurrency trading automation
Fetching real-time market data for financial models
Automating trade execution based on model signals
Monitoring trading bot performance and profitability via MCP
Managing account state and balances programmatically
Implementing end-to-end algorithmic trading workflows
Integrating with other applications needing trading bot control
Triggering bot start/stop and configuration changes remotely
Accessing trade history for quantitative analysis
Constructing custom trading strategies with standardized toolchains

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.

Discord 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:

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

    bash
    pip install freqtrade-client mcp[cli]
    

    Or with uv (optional):

    bash
    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."

License

This project is licensed under the MIT License. See the LICENSE file for details.

Star History

Star History Chart

Repository Owner

kukapay
kukapay

User

Repository Details

Language Python
Default Branch main
Size 19 KB
Contributors 1
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Alpaca Trading MCP Server

    Alpaca Trading MCP Server

    MCP server interface for real-time stock and crypto trading via Alpaca.

    Alpaca Trading MCP Server provides a Model Context Protocol (MCP) compliant server that acts as an interface to the Alpaca trading API. It enables users to manage portfolios, place trades, access real-time and historical market data, and handle account information programmatically. The server exposes standardized resources and tools for account management, trading, asset information, and market analytics, offering integration with MCP clients such as Claude Desktop.

    • 33
    • MCP
    • laukikk/alpaca-mcp
  • Taskade MCP

    Taskade MCP

    Tools and server for Model Context Protocol workflows and agent integration

    Taskade MCP provides an official server and tools to implement and interact with the Model Context Protocol (MCP), enabling seamless connectivity between Taskade’s API and MCP-compatible clients such as Claude or Cursor. It includes utilities for generating MCP tools from any OpenAPI schema and supports the deployment of autonomous agents, workflow automation, and real-time collaboration. The platform promotes extensibility by supporting integration via API, OpenAPI, and MCP, making it easier to build and connect agentic systems.

    • 90
    • MCP
    • taskade/mcp
  • QuantConnect MCP Server

    QuantConnect MCP Server

    Official bridge for secure AI access to QuantConnect's algorithmic trading cloud platform

    QuantConnect MCP Server enables artificial intelligence systems such as Claude and OpenAI to interface with QuantConnect's cloud platform through an official, secure, and dockerized implementation of the Model Context Protocol (MCP). It facilitates automated project management, strategy writing, backtesting, and live deployment by exposing a comprehensive suite of API tools for users with valid access credentials. As the maintained official version, it ensures security, easy deployment, and cross-platform compatibility for advanced algorithmic trading automation.

    • 50
    • MCP
    • QuantConnect/mcp-server
  • Freshdesk MCP Server

    Freshdesk MCP Server

    AI-powered Freshdesk integration for automated ticket and agent management via MCP.

    Enables seamless integration between AI models and Freshdesk by providing a Model Context Protocol (MCP) server interface. Supports a wide range of helpdesk operations such as ticket creation, updates, conversation management, agent handling, and contact management. Facilitates automated support workflows and allows AI agents to interact programmatically with Freshdesk modules.

    • 31
    • MCP
    • effytech/freshdesk_mcp
  • PumpSwap MCP Server

    PumpSwap MCP Server

    MCP server for real-time Solana token trades and pool data.

    PumpSwap MCP Server allows AI agents to interact with the PumpSwap DEX on Solana for automated, real-time token swaps and on-chain trading operations. It exposes commands for buying and selling tokens, querying token prices, and retrieving liquidity pool information. Designed for secure integration with Solana accounts, it enables customizable slippage and transaction fees while supporting context-driven, AI-issued commands. The server operates as a bridge between AI agents and the PumpSwap protocol, facilitating seamless trading and data queries.

    • 5
    • MCP
    • kukapay/pumpswap-mcp
  • Bitcoin & Lightning Network MCP Server

    Bitcoin & Lightning Network MCP Server

    Enable AI models to safely interact with Bitcoin and Lightning Network in a standardized way.

    The Bitcoin & Lightning Network MCP Server implements the Model Context Protocol, allowing AI models to interface with Bitcoin and Lightning Network functionalities such as key generation, address validation, transaction decoding, blockchain queries, and lightning payments. It provides standardized endpoints for AI model integration, including support for Claude Desktop and Goose. The solution supports querying blockchain data, parsing transactions and invoices, and managing cryptographic operations in a secure and extensible manner.

    • 65
    • MCP
    • AbdelStark/bitcoin-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results