MCP server for stock analysis providing tools to fetch stock prices, company information, technical indicators, and news from Google News
Stock Analyzer demonstrates solid foundational structure with 4 well-named tools, complete parameter schemas, and comprehensive descriptions. However, output schemas are undocumented (critical gap), error handling is basic, and there is no validation guidance for parameter constraints. Tool names follow the verb_noun pattern correctly ('get_*'). Descriptions are detailed (100-200+ chars each) but could be more concise for LLM efficiency. Parameter schemas include types and descriptions, meeting baseline standards. The server uses fastmcp framework with STDIO transport, which caps protocol readiness at 50/100 regardless of spec compliance. Overall definition quality is above median (62 vs. community baseline ~50) but falls short of production-grade (70+) due to missing output documentation and weak error recovery guidance.
Fetch detailed company information and fundamentals for a stock using Yahoo Finance. Args: symbol: Yahoo Finance ticker symbol. - US stocks: plain ticker, e.g. 'AAPL', 'MSFT', 'GOOGL'. - Indian stocks: append '.NS' (NSE) or '.BO' (BSE), e.g. 'RELIANCE.NS', 'TCS.BO'. Returns: dict: Company profile and fundamentals, including fields such as: - shortName (str): Company display name. - sector, industry (str): Business classification. - country, city (str): Headquarters location. - marketCap (int): Market capitalisation in base currency. - currentPrice, fiftyTwoWeekHigh, fiftyTwoWeekLow (float): Price data. - trailingPE, forwardPE (float): Price-to-earnings ratios. - dividendYield (float): Annual dividend yield. - returnOnEquity, returnOnAssets (float): Profitability ratios. - totalRevenue, netIncomeToCommon (int): Income statement highlights. - debtToEquity (float): Leverage ratio. - longBusinessSummary (str): Full business description.
Fetch news articles for a stock ticker from Google News. Args: ticker: Stock ticker symbol or company name to search for (e.g., 'AAPL', 'Reliance'). region: ISO 3166-1 alpha-2 country code for the Google News edition. - Common values: 'US' (United States), 'IN' (India), 'GB' (United Kingdom). - Defaults to 'IN'. period: Lookback window for articles. Format is a number followed by 'd' (days) or 'm' (months), e.g. '1d', '7d', '1m'. Defaults to '7d'. Returns: list[dict]: News articles, each containing: - title (str): Headline of the article. - date (str): Human-readable publication date. - datetime (None): Reserved for parsed datetime. - description (str): Short snippet or summary. - link (str): URL to the full article. - publisher (str): Source/publisher name.
Fetch historical OHLCV price data for a stock using Yahoo Finance. Args: symbol: Yahoo Finance ticker symbol. - US stocks: plain ticker, e.g. 'AAPL', 'MSFT', 'GOOGL'. - Indian stocks: append '.NS' (NSE) or '.BO' (BSE), e.g. 'RELIANCE.NS', 'TCS.BO'. - Other exchanges: use the Yahoo Finance suffix, e.g. '7203.T' (Toyota/Tokyo), 'RY.TO' (Royal Bank of Canada/Toronto). period: Total span of data to retrieve. - Valid values: '1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max'. - Default: 7d interval: Granularity of each data point. - Valid values: '1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo'. - Default: '1d' - Note: Intraday intervals (< '1d') are only available for the trailing 60 days. Returns: list[dict]: OHLCV records, each containing: - Date (datetime): Timestamp of the record. - Open, High, Low, Close (float): Price data. - Volume (int): Trading volume. - Dividends (float): Dividends paid. - Stock Splits (float): Stock splits occurred.
Output schemas are not formally documented. All tools return structured data (list[dict] or dict) described only in docstrings, not as JSON Schema definitions. LLMs cannot parse the output structure programmatically and must infer fields from text descriptions.
Parameter constraints are documented in text but not enforced via enum or pattern. For example, 'period' in get_stock_price accepts only ['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max'] but schema declares type='string' with no constraint. LLMs may pass invalid values like '2d' or '8mo'.
Error handling returns structured error objects but lacks recovery guidance. Functions in src/resources/errors.py return {'error': 'symbol_not_found', 'message': '...', 'suggestion': '...'} which is helpful but the docstrings do not mention error scenarios or how callers should interpret them. Missing: guidance on retryability, user-facing vs. fatal errors.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 58 | 2026-07-28+ | v2 |
| 2026-04-08 | F | 23 | - | v1 |
Compute technical indicators for a stock. Args: symbol: Yahoo Finance ticker (e.g., 'RELIANCE.NS', 'AAPL') period: Data lookback — '3mo', '6mo', '1y' (default '6mo') interval: Candle size — '1d', '1wk' (default '1d') Returns: dict with trend, momentum, volatility, volume, and signals
get_technical_indicators description is vague. 'Returns dict with trend, momentum, volatility, volume, and signals' does not explain which fields or data types are in the returned dict. Source code reveals 20+ computed indicators (SMA_20, EMA_12, MACD, RSI_14, STOCH_K, ATR_14, BB_upper, etc.) but tool docstring provides no catalog.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). All four tools are read-only (stock data, news, company info, indicators) but this is not declared in MCP schema. Agents cannot infer safety properties and may assume tools modify state.
No validation of parameter values at tool entry. For example, get_stock_price accepts symbol as string but does not validate format (must be a valid ticker). Malformed input is passed directly to yfinance, which may raise cryptic exceptions (AttributeError, ValueError) rather than user-friendly error messages.