Investor-GPT

nisargshah96/Investor-GPT

3.3

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.

Tools
1
Resources
0
Prompts
0

šŸ“ˆ 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&notify_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