InvestMCP

by arrpitk

405 downloads
Not rated
GitHub

About

A suite of Model Context Protocol (MCP) servers that enhance Claude's capabilities with real-time stock analysis, technical indicators, and financial news sentiment for smarter investment decisions.

Details

Author
arrpitk
Downloads
405
Categories
Finance

- Stock Data Server: Access fundamentals like P/E ratios, dividend yields, and revenue growth.
- Technical Analysis Server: Generate RSI, MACD, moving averages, and identify chart patterns.
- Financial News Server: Analyze news sentiment and track breaking stories about companies.
- Planned: Stock Screener, Investment Advisor, and Portfolio Tracker servers (not yet implemented).
- Built on yfinance, NLTK, and the Model Context Protocol by Anthropic.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name InvestMCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Python 3.10+, clone the repository, install the required Python packages (mcp[cli]>=1.4.0, yfinance, pandas, numpy, requests, nltk), then configure Claude Desktop by adding a JSON configuration for the three MCP servers. Each server is launched with a python3 command pointing to its script; the financial news server additionally requires the NEWS_API_KEY environment variable. Once configured, users can ask Claude natural-language questions about stocks.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "investmcp": {
            "stock-data": {
                "command": "python3",
                "args": [
                    "/path/to/InvestMCP/servers/stock_data_server.py"
                ]
            },
            "technical-analysis": {
                "command": "python3",
                "args": [
                    "/path/to/InvestMCP/servers/technical_analysis_server.py"
                ]
            },
            "financial-news": {
                "command": "python3",
                "args": [
                    "/path/to/InvestMCP/servers/financial_news_server.py"
                ],
                "env": {
                    "NEWS_API_KEY": ""
                }
            }
        }
    }
}

McpServers

{
    "stock-data": {
        "command": "python3",
        "args": [
            "/path/to/InvestMCP/servers/stock_data_server.py"
        ]
    },
    "technical-analysis": {
        "command": "python3",
        "args": [
            "/path/to/InvestMCP/servers/technical_analysis_server.py"
        ]
    },
    "financial-news": {
        "command": "python3",
        "args": [
            "/path/to/InvestMCP/servers/financial_news_server.py"
        ],
        "env": {
            "NEWS_API_KEY": ""
        }
    }
}

InvestMCP

MCP
Python
License

InvestMCP is a comprehensive suite of Model Context Protocol (MCP) servers that transform Claude AI into a powerful stock analysis assistant. This project enables seamless integration between Claude and financial data sources, allowing for natural language investment analysis through conversation.

🚀 Features

Implemented Servers

- Stock Data Server: Access fundamental financial data including P/E ratios, dividend yields, revenue growth, and more.

- Technical Analysis Server: Generate technical indicators like RSI, MACD, moving averages, and identify chart patterns.

- Financial News Server: Analyze news sentiment and track breaking stories about companies to incorporate market sentiment into investment decisions.

Planned Servers

- Stock Screener Server: Filter stocks based on custom criteria to discover investment opportunities.

- Investment Advisor Server: Receive personalized investment recommendations based on risk tolerance and goals.

- Portfolio Tracker Server: Track portfolio performance and get rebalancing suggestions.

📋 Requirements

- Python 3.10+
- Claude Desktop app with MCP support
- Required Python packages:
- mcp\[cli]>=1.4.0
- yfinance>=0.2.30
- pandas>=2.0.0
- numpy>=1.24.0
- requests>=2.31.0
- nltk>=3.8.1

🔧 Installation

1. Clone this repository:

 git clone https://github.com/arrpitk/InvestMCP.git
cd InvestMCP

Configure Claude Desktop:

Open Claude Desktop settings
Navigate to Developer tab
Click "Edit Config"
Add the MCP server configuration (see example below)

🔍 Usage

Claude Desktop Configuration

json
{
  "mcpServers": {
    "stock-data": {
      "command": "python3",
      "args": ["/path/to/InvestMCP/servers/stock_data_server.py"]
    },
    "technical-analysis": {
      "command": "python3",
      "args": ["/path/to/InvestMCP/servers/technical_analysis_server.py"]
    },
    "financial-news": {
      "command": "python3",
      "args": ["/path/to/InvestMCP/servers/financial_news_server.py"],
      "env": {
        "NEWS_API_KEY": "your-news-api-key-here"
      }
    }
  }
}

Example Conversations

Once configured, you can talk to Claude naturally about stocks:

"What are the key financial metrics for AAPL?"
"Show me the technical analysis for MSFT including RSI and MACD."
"What's the current news sentiment around Tesla?"
"Compare the fundamentals of AMZN and GOOGL."

🔜 Roadmap

1. Add Stock Screener functionality
2. Implement Investment Advisor capabilities
3. Add Portfolio Tracking and management
4. Create interactive visualizations for technical analysis
5. Add historical backtesting of investment strategies

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📢 Acknowledgements

Model Context Protocol by Anthropic
yfinance for financial data

  • NLTK for sentiment analysis

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.