Trading-MCP
by Bwizrd
Overview
This MCP server provides a comprehensive platform for backtesting trading strategies, visualizing results with interactive charts, managing technical indicators, and integrating with external systems like Notion and SSH for reporting and diagnostics. It supports both code-based and JSON-configured DSL strategies, such as the Stochastic Quad Rotation.
Installation
python mcp_servers/universal_backtest_mcp.pyEnvironment Variables
- CTRADER_API_URL
- CTRADER_API_USERNAME
- CTRADER_API_PASSWORD
- VPS_TICK_ENABLED
- VPS_TICK_URL
- VPS_API_URL
- VPS_API_KEY
- INFLUXDB_URL
- INFLUXDB_TOKEN
- INFLUXDB_ORG
- INFLUXDB_BUCKET
- BACKTEST_DIAGNOSTICS
- CHARTS_OUTPUT_DIR
- DATA_OUTPUT_DIR
Security Notes
CRITICAL: The `eval()` function is used in `shared/strategies/dsl_interpreter/dsl_strategy.py` to dynamically evaluate comparison expressions from JSON configurations. This allows for arbitrary code execution if a malicious DSL configuration is introduced, making the server highly vulnerable to injection attacks. Additionally, the use of `pexpect` for SSH uploads in `api_server.py` (which itself runs on localhost:8001) could pose risks if not handled with extreme care regarding credential management and command sanitization. Diagnostic logs written to `/tmp/` could potentially expose sensitive data if file permissions are not strictly controlled. Extensive use of `httpx` for external API calls (`VPS_TICK_URL`, `CTRADER_API_URL`, InfluxDB) could lead to SSRF or data leakage if URLs or parameters are not properly validated.
Similar Servers
alpaca-mcp-server
Enables natural language trading operations for Alpaca's Trading API via AI assistants, supporting stocks, options, crypto, portfolio management, and real-time market data.
tradingview-mcp
Provides real-time cryptocurrency and stock market analysis for traders, analysts, and AI assistants via the Model Context Protocol (MCP).
crypto-indicators-mcp
Provides an MCP server with over 50 cryptocurrency technical analysis indicators and strategies to empower AI trading agents in analyzing market trends and developing quantitative strategies.
finance-trading-ai-agents-mcp
A specialized MCP server for financial analysis and quantitative trading, designed to deploy local financial MCP services with a departmental architecture for LLM integration and algorithmic trading.