Overview
What is Advanced Stock Market Analysis Server?
A powerful, extensible server built using the Model Context Protocol (MCP) and yfinance for advanced stock market analysis. It provides a suite of tools for retrieving, analyzing, comparing stock data, and performing sector and market sentiment analysis. Designed for developers and analysts who need live financial data and technical indicators via an MCP-compatible client.
How to use Advanced Stock Market Analysis Server?
Clone the repository, install dependencies with uv pip install -r requirements.txt, then start the server with uv run mcp install main.py. Interact using any MCP-compatible client (e.g., Claude, Cursor) by making tool calls such as { "ticker": "AAPL" } to get stock info.
Key features of Advanced Stock Market Analysis Server
- Retrieve basic stock info (name, price, market cap, P/E)
- Fetch historical price and volume data with error handling
- Technical trend analysis: moving averages, RSI, MACD, Bollinger Bands
- Quantitative risk metrics: volatility, Sharpe ratio, beta, VaR
- Compare multiple stocks on key metrics and performance
- Analyze sector performance and market sentiment using indices and VIX
Use cases of Advanced Stock Market Analysis Server
- Perform technical analysis on a stock's price trend
- Assess risk and volatility of individual securities
- Compare the performance of several stocks side-by-side
- Evaluate sector-level performance across major market sectors
- Gauge overall market sentiment using the VIX and major indices
- Scrape latest stock news headlines for sentiment analysis
FAQ from Advanced Stock Market Analysis Server
What data sources does the server use?
All stock data is fetched live from Yahoo Finance via yfinance. News headlines and URLs are scraped from Finviz for the get_stock_news tool.
What are the runtime and dependency requirements?
The server requires Python 3.8+ and relies on yfinance, fastapi, requests, and beautifulsoup4. Dependencies are listed in requirements.txt.
How does the server handle errors or network issues?
Built-in error handling and retry logic ensure robust operation when fetching data or scraping news.
What transport or authentication does the server support?
The server runs as a standard MCP tool server—no authentication details are provided in the README. It is designed to be used with any MCP-compatible client.
Is there a recommended prompt for analyzing news sentiment?
The README suggests using the prompt: “Get the latest news of {{ticker}} stock. For each article, read the full content, assess whether the sentiment is positive, negative, or neutral, and then write a summary of the overall sentiment and your conclusions.”