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
Personal-use FastMCP server for professional-grade financial data analysis, technical indicators, and portfolio optimization tools integrated with Claude Desktop.
Financial-Modeling-Prep-MCP-Server
Enables AI assistants to fetch and analyze comprehensive financial market data, company fundamentals, and economic indicators from Financial Modeling Prep.
stock-mcp
A Model Context Protocol (MCP) server that empowers AI agents with professional-grade financial market analysis capabilities, including real-time data, technical analysis, fundamental research, and SEC/A-share filings.
Equity-Traders
An AI-powered trading assistant that analyzes market trends, executes trades, and supports financial strategies using multiple AI agents and real-time market data.