nisargshah96/Investor-GPT
If you are the rightful owner of Investor-GPT and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A FastAPI-based MCP server for fetching OHLCV market data, running trading strategies, and sending Discord alerts.
š Market Data MCP Server
A FastAPI-based MCP server for fetching OHLCV market data, running trading strategies, and sending Discord alerts.
Supports REST APIs and MCP tools for AI/LLM integration.
š Features
- š API key authentication
- š” Market data with fallback chain: Yahoo ā Alpha Vantage ā Google scrape
- š Trading strategies:
- Breakout (1:R risk-reward)
- Wyckoff (prototype/TODO route)
- š¤ MCP support:
/tools/list
+/tools/call
- š Discord alerts for actionable or neutral signals
- āļø AWS Secrets Manager integration for production
š Structure
market_data_mcp/ āāā main.py āāā app/ āāā routes.py # REST + MCP endpoints āāā auth.py # API key verification āāā config.py # .env / AWS Secrets Manager āāā tools.py # MCP tool handlers āāā providers/ # Yahoo, Alpha Vantage, Google āāā strategies/ # Breakout, Wyckoff āāā utils/ # Discord notifier
š§ Setup
1. Install
pip install -r requirements.txt
2. Config
API_KEY=your-secret ALPHA_VANTAGE_KEY=your-alpha-key DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/xxxx/yyyy AWS_REGION=ap-south-1
3. Run
uvicorn main:app --reload
4. Endpoints
-
GET /health ā { "status": "ok" }
-
GET /market-data/{symbol}?interval=5m&lookback=20
-
GET /breakout/{symbol}?interval=5m&lookback=20&rr=3¬ify_when_no_signal=true
-
POST /tools/call
{ "name": "breakout_signal", "arguments": { "symbol": "RELIANCE", "interval": "5m", "lookback": 20, "rr": 3 } }
5. Sample Response
-
Breakout (with signal):
{ "symbol": "RELIANCE", "strategy": "breakout", "result": { "signal": "LONG", "entry": 2540, "stop_loss": 2530, "target": 2570, "rr": 3 } }
-
No breakout:
{ "symbol": "RELIANCE", "strategy": "breakout", "result": { "signal": null, "reason": "No breakout yet" } }
ā ļø Notes
- Yahoo Finance ā good NSE/BSE coverage (RELIANCE.NS, TCS.NS)
- Alpha Vantage ā free but rate-limited
- Google scrape ā last resort, single candle
- Data may lag; not financial advice
š ļø Roadmap
- Add /wyckoff/{symbol} route
- More indicators (RSI, MA crossovers)
- Caching & backtesting
- Web dashboard
š License
MIT