Back to Home
Bwizrd icon

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

Run Command
python mcp_servers/universal_backtest_mcp.py

Environment 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

Stats

Interest Score0
Security Score2
Cost ClassHigh
Avg Tokens900
Stars0
Forks0
Last Update2026-01-16

Tags

Financial TradingBacktestingChartingTechnical AnalysisStrategy Development