backtrader-mcp
by kukapay
Overview
An AI-accessible MCP server for Backtrader, enabling agents to run, analyze, and optimize trading strategies through natural language prompts.
Installation
uv run main.py stdioSecurity Notes
The `run_backtest` tool uses `exec(strategy_code, {}, local_ns)` to execute user-provided Python code directly. This is a critical security vulnerability as it allows arbitrary code execution. An attacker could inject malicious Python code (e.g., `import os; os.system('rm -rf /')`) leading to severe system compromise, data theft, or denial of service if the server is exposed to untrusted input. While the `exec` call uses empty globals, core built-ins and module imports are still accessible.
Similar Servers
maverick-mcp
Personalized stock analysis, technical indicators, and portfolio optimization via Claude Desktop.
Financial-Modeling-Prep-MCP-Server
Enables AI assistants to access and analyze comprehensive financial data, stock information, company fundamentals, and market insights from Financial Modeling Prep.
stock-mcp
Provides AI Agents with professional-grade stock market analysis capabilities by bridging large language models with real-time financial data.
trade-it-mcp
Enables natural-language interaction with stock, crypto, and options brokerages for trading, portfolio queries, and market insights.