Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📈 InvestBuddy MCP Server

An open-source Model Context Protocol (MCP) server that connects Claude Desktop directly to the InvestBuddy institutional-grade LSTM quantitative trading engine.

Instead of relying on generic LLM financial advice, this server equips Claude with real-time, mathematically validated stock predictions, 30-day optimized portfolio allocations, and automated systemic risk detection.

🧠 The ML Engine Under the Hood

This is not a simple moving average crossover bot. The underlying API is powered by a rigorously backtested deep learning pipeline:

  • Architecture: 2-Layer Stacked LSTM (128 → 64 Units)
  • Parameters: 145,354 trainable parameters
  • Feature Set: 49 distinct technical features (Momentum, Volatility, Volume) processed over a 60-day rolling window.
  • Validation: Trained on 50 S&P 100 stocks, walk-forward backtested on 50 stocks (2022-2025).
  • Directional Accuracy: 54.6%
  • Net Alpha: +15.92% over the S&P 500 (with monthly friction-optimized rebalancing).

🛠️ Available MCP Tools

Once installed, Claude gains access to the following tools:

  • get_portfolio_recommendations: Retrieves the current month's Top 5 equal-weight stock picks generated by the LSTM.
  • check_defensive_posture: Checks if the system's "Cash Fallback" is active. If the LSTM detects severe market weakness (0 positive alpha predictions), it rotates to 100% SHV (Cash).
  • analyze_market_context: Pulls the underlying bullish/bearish prediction ratios across the 50-stock universe to gauge overall market sentiment.

🚀 Quickstart: Claude Desktop Integration

Prerequisites:

1. Clone the repository and install dependencies:

git clone https://github.com/yourusername/investbuddy-mcp.git
cd investbuddy-mcp
npm install
npm run build

2. Configure Claude Desktop: Open your Claude Desktop configuration file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the InvestBuddy server to your mcpServers object:

{
  "mcpServers": {
    "investbuddy": {
      "command": "node",
      "args": ["/absolute/path/to/investbuddy-mcp/build/index.js"],
      "env": {
        "INVESTBUDDY_API_KEY": "your_api_key_here"
      }
    }
  }
}

3. Restart Claude Desktop. You can now ask Claude: "Analyze my tech portfolio against InvestBuddy's current recommendations. Are we in a defensive posture?"

⚠️ Disclaimer

The data provided by this MCP server is for informational and educational purposes only. It does not constitute financial advice. Historical backtest results (+15.92% Alpha) do not guarantee future performance. Trade at your own risk.

License

MIT

About

mcp server for investbuddy

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages