freqtrade-mcp
freqtrade-mcp is a read-only MCP server that gives LLMs deep introspection into the Freqtrade algorithmic trading codebase, helping generate faster and more reliable trading strategies.
Core capabilities:
Strategy Methods — List all overridable
IStrategymethods (with keyword filtering) and retrieve full signatures, parameter types, defaults, return types, and docstringsClass Inspection — Explore any
freqtrade.*class by fully-qualified path: docstring, MRO, public methods, and attributesEnums — List all trading-related enums (module paths, descriptions, member counts) and retrieve individual enum values (e.g.,
SignalDirection)Codebase Search — Search for classes, functions, constants, and enums by name pattern (regex supported)
Callback Info — Get detailed signatures and docstrings for strategy callbacks like
bot_start,custom_stoploss,custom_stake_amount, etc.Config Schema — Browse known Freqtrade configuration keys and descriptions, filterable by section (e.g., "exchange", "pairlist", "stoploss")
DataFrame Columns — List available DataFrame columns (OHLCV, entry/exit signals, indicators), filterable by context
Documentation — List, full-text search, and read official Freqtrade markdown documentation pages (requires
FREQTRADE_DOCS_PATH)Version Info — Check installed Freqtrade, MCP server, and Python versions
All tools are read-only, input-validated, and namespace-restricted — no trades, no network exposure, no side effects.
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 me the method signature and docstring for populate_indicators"
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.
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.
Related MCP server: freqtrade-mcp-server
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
inspectandastmodulesNo import side effects in search: symbol search parses source with
astrather than importing it, so no third-party module-level code runsNamespace restricted: Only inspects
freqtrade.*modulesstdio transport: Local-only, no network exposure
Requirements
Python >= 3.13
freqtrade >= 2026.2
mcp[cli] >= 1.26.0, < 2.0
Installation
pip install freqtrade-mcp-serverImportant: Install
freqtrade-mcp-serverinto 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:
git clone https://github.com/yalcin/freqtrade-mcp.git
cd freqtrade-mcp
pip install -e ".[dev]"Usage
Claude Code (CLI)
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:
{
"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):
[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:
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
FREQTRADE_DOCS_PATH=/path/to/freqtrade/docs freqtrade-mcpAvailable Tools
Tool | Description |
| List all overridable IStrategy methods |
| Get full signature of a specific method |
| Inspect any freqtrade class |
| List trading-related enums |
| Get values of a specific enum |
| Search for symbols by name pattern (statically indexed, no imports) |
| Get detailed callback method info |
| Browse configuration keys |
| List DataFrame columns in strategy methods |
| Get version information |
| List available documentation topics |
| Full-text search across all documentation |
| Read a documentation page, or one section of it |
Configuration
Environment Variables
Variable | Default | Description |
| (not set) | Path to the freqtrade |
|
| Logging level: |
Documentation Tools
To enable documentation tools, set FREQTRADE_DOCS_PATH to the docs/ directory of a cloned freqtrade repository:
export FREQTRADE_DOCS_PATH=/path/to/freqtrade/docsIf 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
# 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
Yalçın Açıkyıldız — Project creator and maintainer.
Giovanni Degiorgi — Contributor to the security hardening, runtime improvements, and MCP introspection updates in pull request #1.
See CONTRIBUTORS.md for project credits.
License
Available Tools
13 toolsfreqtrade_get_callback_infoARead-onlyIdempotent
Get detailed info about a strategy callback method.
Returns the full signature, parameters with types, return type, and docstring for a strategy callback like bot_start, custom_stake_amount, custom_stoploss, etc.
Args: callback_name: Name of the strategy callback method.
Returns: Detailed callback information including signature and docstring.
Inputs: callback_name (required). Returns: object
freqtrade_get_class_infoARead-onlyIdempotent
Inspect any freqtrade class.
Returns class docstring, method resolution order (MRO), public methods, and class-level attributes for a given fully-qualified class path.
Args: class_path: Fully-qualified class path (e.g., "freqtrade.strategy.interface.IStrategy").
Returns: Class introspection result with docstring, MRO, methods, and attributes.
Inputs: class_path (required). Returns: object
freqtrade_get_config_schemaARead-onlyIdempotent
Return known freqtrade configuration keys and their descriptions.
Lists configuration keys organized by section. Use the optional section parameter to filter by a specific config area.
Args: section: Optional section filter (e.g., "exchange", "pairlist", "stoploss").
Returns: List of config key entries with descriptions.
Inputs: section. Returns: result
freqtrade_get_dataframe_columnsARead-onlyIdempotent
List common DataFrame columns available in strategy methods.
Returns column names, types, and descriptions for columns available in populate_indicators, populate_entry_trend, populate_exit_trend, etc.
Args: context: Optional context filter: "ohlcv", "entry", "exit", or "indicators". If omitted, returns all known columns.
Returns: List of DataFrame column entries with descriptions and contexts.
Inputs: context. Returns: result
freqtrade_get_docARead-onlyIdempotent
Read a specific freqtrade documentation page.
Returns the full markdown content of a documentation page by topic name. Use freqtrade_list_docs to discover available topic names.
Args: topic: Topic name (e.g., "strategy-callbacks", "configuration", "commands/backtesting").
Returns: Full document content with title and metadata, or error if not available.
Inputs: topic (required). Returns: result
freqtrade_get_enum_valuesARead-onlyIdempotent
Get all values of a specific freqtrade enum.
Returns every member of the enum with its name and value.
Args: enum_path: Fully-qualified enum path (e.g., "freqtrade.enums.signaltype.SignalDirection").
Returns: Enum details including all member names and values.
Inputs: enum_path (required). Returns: object
freqtrade_get_method_signatureARead-onlyIdempotent
Get full signature of a specific IStrategy method.
Returns the complete method signature including all parameters with their types, default values, return type, and the full docstring.
Args: method_name: Name of the IStrategy method to inspect.
Returns: Method signature details including parameters, return type, and docstring.
Inputs: method_name (required). Returns: object
freqtrade_get_version_infoBRead-onlyIdempotent
Return installed freqtrade version and MCP server version.
Returns version information including the freqtrade-mcp server version, installed freqtrade version, and Python version.
Returns: Version information dictionary.
Inputs: no named parameters. Returns: object
freqtrade_list_docsARead-onlyIdempotent
List available freqtrade documentation topics.
Returns a list of documentation pages with their topic identifiers and titles. Use the optional filter to narrow results by keyword.
Args: filter: Optional keyword to filter topics (e.g., "strategy", "freqai").
Returns: List of doc topic summaries, or an error message if docs not available.
Inputs: filter. Returns: result
freqtrade_list_enumsARead-onlyIdempotent
List all trading-related enums from freqtrade.
Returns enum names, their module paths, docstrings, and member counts. Use the optional filter to narrow results.
Args: filter: Optional keyword filter for enum names or descriptions.
Returns: List of enum summaries.
Inputs: filter. Returns: result
freqtrade_list_strategy_methodsARead-onlyIdempotent
List all overridable methods from IStrategy.
Returns method names with brief descriptions. Use the optional filter parameter to narrow results by keyword (e.g., "entry", "exit", "indicator", "callback", "custom").
Args: filter: Optional keyword to filter methods.
Returns: List of method summaries with name, brief description, and callback flag.
Inputs: filter. Returns: result
freqtrade_search_codebaseARead-onlyIdempotent
Search for symbols in the freqtrade codebase by name pattern.
Searches for classes, functions, constants, and enums matching the given pattern. Supports basic regex patterns using alphanumeric characters, underscores, and standard regex operators.
Args: query: Search pattern for symbol names. Supports basic regex.
Returns: List of matching symbols with their module paths and kinds.
Inputs: query (required). Returns: result
freqtrade_search_docsARead-onlyIdempotent
Search across all freqtrade documentation.
Performs full-text search across all documentation pages and returns matching snippets with surrounding context. Multiple words use AND logic.
Args: query: Search text (e.g., "custom stoploss", "backtesting timerange"). max_results: Maximum number of results to return (1-50, default 10).
Returns: List of search results with snippets, or error if docs not available.
Inputs: query (required), max_results. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool has a clearly distinct purpose with no overlap. Tools are organized by specific domains: callback inspection, class introspection, configuration, dataframe columns, documentation access, enum handling, method signatures, version info, listing operations, and codebase/documentation search. The descriptions clearly differentiate their scopes, making it easy for an agent to select the right tool.
All tools follow a consistent 'freqtrade_verb_noun' pattern with snake_case throughout. The verbs are well-chosen and descriptive (get, list, search), and the nouns precisely indicate the target resource (callback_info, class_info, config_schema, etc.). This consistency makes the toolset predictable and easy to navigate.
With 13 tools, this server is well-scoped for its purpose of providing introspection and documentation access for the freqtrade trading framework. Each tool serves a specific, valuable function in exploring the codebase, configuration, and documentation, with no redundant or trivial tools. The count is appropriate for comprehensive coverage without being overwhelming.
The toolset provides complete coverage for introspection and documentation needs within the freqtrade domain. It includes tools for getting detailed info on callbacks, classes, configs, dataframes, methods, and enums; listing available docs, enums, and methods; searching code and docs; and checking versions. There are no obvious gaps—agents can fully explore and understand the framework's capabilities.
Maintenance
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
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
Read-only MCP server exposing a user ORANO library to their own AI agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceGeneric MCP server that exposes Markdown documentation to LLMs, enabling them to search and answer questions about any software documentation.MIT
- 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
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives LLMs structured, read-only insight into local code repositories — directory tree, languages, dependencies, scripts, and config files.MIT
- FlicenseNot gradedqualityBmaintenanceA read-only MCP server that exposes controlled SSH tools to inventory, document, and prepare operations on WealthTech servers for AI assistants like ChatGPT and Codex.-