freqtrade-mcp logo

freqtrade-mcp

Community
yalcin

Read-only MCP server for Freqtrade codebase introspection. Helps LLMs write better strategy code by providing access to method signatures, type hints, enums, config schema, and documentation.

Publisheryalcin
Repositoryfreqtrade-mcp
LanguagePython
Forks
2
Stars
17
Available tools
0
Transport typestdio
Categories
LicenseGPL-3.0
Links
  • Connect tools to AI workflows

    freqtrade-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    17 stars and 2 forks from the linked repository.

freqtrade-mcp

I designed and built this project for my own use. All architectural decisions, tool design, and the security model are my own work. I used Claude Opus as a coding assistant during the development process. This is a research and personal-use project.

A read-only MCP (Model Context Protocol) server that provides LLM tools with introspection data about the Freqtrade codebase. Helps LLMs write faster, more reliable Freqtrade strategy code by giving them access to overridable functions, classes, variables, docstrings, type hints, and method signatures from the live Freqtrade installation.

Disclaimer

This is a research and personal-use project. It provides read-only introspection of the Freqtrade codebase to assist LLM-based code generation. It does NOT execute trades, access exchange APIs, or manage funds. It is NOT financial advice software.

The author(s) accept NO responsibility or liability for any direct, indirect, incidental, or consequential damages arising from the use of this software, including but not limited to financial losses from trading strategies developed with its assistance. Use entirely at your own risk. Always backtest thoroughly before deploying any strategy with real capital.

Usage Philosophy

freqtrade-mcp is not meant to replace reading the Freqtrade documentation.

It is a read-only reference layer for LLM agents. The goal is to help agents check the actual docs, public strategy APIs, method signatures, config keys, enums, and DataFrame column references before suggesting code.

Agents should prefer documented public APIs and avoid relying on undocumented Freqtrade internals in strategy code.

Features

  • Strategy Method Introspection: List and inspect all overridable IStrategy methods with full signatures, type hints, and docstrings
  • Class Inspection: Explore any freqtrade class — MRO, attributes, public methods
  • Enum Discovery: List and inspect all trading-related enums and their values
  • Codebase Search: Search for classes, functions, constants, and enums by name pattern
  • Callback Details: Get detailed info about strategy callbacks (bot_start, custom_stoploss, etc.)
  • Config Schema: Browse the installed freqtrade schema and its descriptions
  • DataFrame Columns: Discover available DataFrame columns in strategy methods
  • Documentation Access: Browse, search, and read freqtrade markdown documentation
  • Version Info: Check installed freqtrade and MCP server versions

Security

  • Read-only: No trading, no exchange connections, no side effects
  • Input validation: All LLM inputs use strict allow-lists and length limits; code search accepts only glob-style patterns built from escaped literals
  • No eval/exec: Only uses Python's inspect and ast modules
  • No import side effects in search: symbol search parses source with ast rather than importing it, so no third-party module-level code runs
  • Namespace restricted: Only inspects freqtrade.* modules
  • stdio transport: Local-only, no network exposure

Requirements

  • Python >= 3.13
  • freqtrade >= 2026.2
  • mcp[cli] >= 1.26.0, < 2.0

Installation

bash
pip install freqtrade-mcp-server

Important: Install freqtrade-mcp-server into the same environment as the freqtrade version you develop against, so introspection reflects the code you actually run. Avoid isolated installs (pipx/uvx): they pull in their own copy of freqtrade, and the server would inspect that copy instead of yours.

Or install from source:

bash
git clone https://github.com/yalcin/freqtrade-mcp.git
cd freqtrade-mcp
pip install -e ".[dev]"

Usage

Claude Code (CLI)

bash
claude mcp add freqtrade-mcp \
  -e FREQTRADE_DOCS_PATH=/path/to/freqtrade/docs \
  -- "$(command -v freqtrade-mcp)"

Claude Desktop (macOS / Windows only)

Note: Claude Desktop is not available on Linux. This configuration is based on official documentation but has not been tested by the author. If you encounter issues or have corrections, pull requests are welcome.

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "freqtrade": {
      "command": "freqtrade-mcp",
      "args": [],
      "env": {
        "FREQTRADE_MCP_LOG_LEVEL": "INFO",
        "FREQTRADE_DOCS_PATH": "/path/to/freqtrade/docs"
      }
    }
  }
}

OpenAI Codex CLI

Codex CLI is a terminal-based tool that runs on all platforms including Linux.

Add to your ~/.codex/config.toml (or project-scoped .codex/config.toml):

toml
[mcp_servers.freqtrade]
command = "freqtrade-mcp"
args = []

[mcp_servers.freqtrade.env]
FREQTRADE_MCP_LOG_LEVEL = "INFO"
FREQTRADE_DOCS_PATH = "/path/to/freqtrade/docs"

Or via CLI:

bash
codex mcp add freqtrade-mcp \
  --env FREQTRADE_DOCS_PATH="<FREQTRADE_DOCS_PATH>" \
  -- "$(command -v freqtrade-mcp)"

Codex Desktop App (macOS only)

Note: The Codex desktop app is currently macOS-only (Apple Silicon). Windows and Linux versions are not yet available. This configuration is based on official documentation but has not been tested by the author. If you encounter issues or have corrections, pull requests are welcome.

The Codex desktop app shares the same ~/.codex/config.toml configuration file with the CLI. Use the config shown in the Codex CLI section above — it applies to both.

Codex IDE Extension (VS Code / Cursor / Windsurf)

Note: Available on macOS and Linux. Windows support is experimental (WSL recommended).

The Codex IDE extension also shares ~/.codex/config.toml with the CLI and desktop app. Use the same configuration shown in the Codex CLI section. In the extension, you can access MCP settings via the gear menu.

Integrations note: Claude Code (CLI) and Codex CLI configurations have been tested and verified. Claude Desktop, Codex desktop app, and Codex IDE extension configurations are based on official documentation but have not been tested by the author. If you encounter issues or have corrections, pull requests are welcome.

Generic stdio

bash
FREQTRADE_DOCS_PATH=/path/to/freqtrade/docs freqtrade-mcp

Available Tools

ToolDescription
freqtrade_list_strategy_methodsList all overridable IStrategy methods
freqtrade_get_method_signatureGet full signature of a specific method
freqtrade_get_class_infoInspect any freqtrade class
freqtrade_list_enumsList trading-related enums
freqtrade_get_enum_valuesGet values of a specific enum
freqtrade_search_codebaseSearch for symbols by name pattern (statically indexed, no imports)
freqtrade_get_callback_infoGet detailed callback method info
freqtrade_get_config_schemaBrowse configuration keys
freqtrade_get_dataframe_columnsList DataFrame columns in strategy methods
freqtrade_get_version_infoGet version information
freqtrade_list_docsList available documentation topics
freqtrade_search_docsFull-text search across all documentation
freqtrade_get_docRead a documentation page, or one section of it

Configuration

Environment Variables

VariableDefaultDescription
FREQTRADE_DOCS_PATH(not set)Path to the freqtrade docs/ directory for documentation tools
FREQTRADE_MCP_LOG_LEVELWARNINGLogging level: DEBUG, INFO, WARNING, ERROR, CRITICAL

Documentation Tools

To enable documentation tools, set FREQTRADE_DOCS_PATH to the docs/ directory of a cloned freqtrade repository:

bash
export FREQTRADE_DOCS_PATH=/path/to/freqtrade/docs

If not set, the server starts normally but documentation tools will return a guidance message instead of content. The documentation is cached with a 1-hour TTL and refreshes automatically.

Development

bash
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run only the smoke tests against a real freqtrade installation
# (skipped automatically when freqtrade is not importable)
pytest -m integration

# Lint
ruff check src/ tests/

# Format
ruff format src/ tests/

# Type check
mypy src/

Contributors

See CONTRIBUTORS.md for project credits.

License

GPLv3

Installation

TypingMind
{
  "mcpServers": {
    "freqtrade-mcp": {
      "command": "freqtrade-mcp",
      "args": [],
      "env": {
        "FREQTRADE_DOCS_PATH": "<FREQTRADE_DOCS_PATH>"
      }
    }
  }
}

Use freqtrade-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once freqtrade-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add freqtrade-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the freqtrade-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "freqtrade-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "freqtrade-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the freqtrade-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the freqtrade-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use freqtrade-mcp to help me with this task?
freqtrade-mcp
Sure. I read it.
Here is what I found using freqtrade-mcp.

Frequently asked questions

What is the freqtrade-mcp MCP server used for?

freqtrade-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use freqtrade-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use freqtrade-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use freqtrade-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With freqtrade-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect freqtrade-mcp MCP to TypingMind?

freqtrade-mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does freqtrade-mcp MCP provide in TypingMind?

freqtrade-mcp exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use freqtrade-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If freqtrade-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇