Skip to main content
Glama
vashishtavarma

MCP Stocks Analyzer

MCP Stocks Analyzer

A simple and efficient Model Context Protocol (MCP) server for financial analysis. This tool provides real-time stock data and news aggregation for AI assistants.


Features

  • News: Fetch stock news from Google News.

  • Prices: Get historical OHLCV data from Yahoo Finance.

  • Company info: Read fundamentals and profile data.

  • Technical indicators: Compute trend, momentum, volatility, and volume signals.

  • MCP-ready: Designed to plug into AI assistants.


Related MCP server: Yahoo Finance MCP Server

Installation

  1. Clone the repository:

    git clone https://github.com/vashishtavarma/mcp-stocks-analyzer.git
    cd mcp-stocks-analyzer
  2. Create and activate a virtual environment:

    python -m venv venv
    # On Windows:
    venv\Scripts\activate
    # On macOS/Linux:
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

Usage

  1. Start the MCP server:

    python main.py
  2. Use the available tools from your MCP client:

    • get_news_from_google(ticker, region='IN', period='7d')

    • get_stock_price(symbol, period, interval)

    • get_company_info(symbol)

    • get_technical_indicators(symbol, period='6mo', interval='1d')


Project Structure

  • main.py: MCP server entry point that registers tools.

  • src/news.py: News fetching tool.

  • src/price.py: Price history tool.

  • src/company.py: Company info tool.

  • src/indicators.py: Technical indicators tool.


Claude Desktop Setup

To integrate MCP Stocks Analyzer with Claude Desktop, follow these steps:

  1. Locate the Configuration File:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. Add the Server Configuration: Insert the following JSON snippet into the mcpServers object in the configuration file:

    {
      "mcpServers": {
        "stock-analyzer": {
          "command": "<path>/mcp-stocks-analyzer/venv/bin/python",
          "args": [
            "<path>/mcp-stocks-analyzer/main.py"
          ]
        }
      }
    }

    Note for Windows users: Adjust the python path to ...\\venv\\Scripts\\python.exe and use backslashes.

    Important: Replace <path> with the absolute path to your project directory.

  3. Restart Claude Desktop: Restart the application to apply the changes. The MCP Stocks Analyzer tools will now be available in Claude Desktop.


License

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

Related MCP Connectors

  • Stock market data for AI agents: real-time quotes, financials, options, SEC filings and news.

  • Market data MCP for AI agents: prices, fundamentals, SEC filings, 13F, insider, options, credit

  • Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.

  • A Model Context Protocol server exposing real-time and historical Colombo Stock Exchange (CSE) data to AI agents and LLM applications. Provides quotes and OHLCV price history, full financial statements (income, balance sheet, cash flow), pre-computed technicals (moving averages, RS ratings, volume signals), macroeconomic indicators, corporate actions, and rule-based screening across CSE stocks and sector indices, everything needed to build CSE-aware trading assistants, research tools, and market-analysis agents. This is the official MCP server of www.ceyloncharts.com

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time financial data from Yahoo Finance to Large Language Models through the Model Context Protocol, enabling AI models to access stock prices, historical data, and company information.
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Provides access to real-time stock prices, financial statements, news, and options data via the Model Context Protocol. It enables AI assistants to retrieve comprehensive market data, including historical prices and analyst recommendations, through a standardized interface.
    9
    68 PyPI
    2
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Provides financial data tools including stock prices, news, forex, fundamentals, and corporate actions via the Tiingo API through the Model Context Protocol.
    11
    5
    -