🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

market-data-analyzer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

market-data-analyzer

MCP server for financial market data analysis -- live stock analysis, screening, portfolio analytics, crypto analysis, and market overview using free APIs.

latest
Source
npmnpm
Version
2.1.4
Version published
Maintainers
1
Created
Source

Market Data Analyzer MCP Server

Finance-focused MCP server providing live market data analysis. Analyze stocks with technical indicators, screen for opportunities, track portfolios, compare assets, monitor market conditions, and analyze crypto -- all powered by free APIs (Yahoo Finance + CoinGecko).

Pricing

PlanPriceIncludes
Basic$15/moanalyze_stock, screen_stocks, market_overviewBuy →
Pro$25/moAll 6 tools + priority data refresh — Buy →

Free trial: 3 calls total (shared across all tools), no credit card. License keys are emailed instantly after checkout. Activate via the LICENSE_KEY environment variable. More info: aivp-mcp.vercel.app

Tools

analyze_stock

Deep analysis of a stock symbol with live Yahoo Finance data.

Output: Price overview, SMA (20/50/200), RSI (14), MACD (12,26,9), support/resistance levels, golden/death cross detection, signal summary.

{ "symbol": "AAPL" }

screen_stocks

Screen ~70 popular stocks by criteria with live data.

Filters: Market cap range, P/E ratio, sector, volume threshold, price range.

{
  "sector": "tech",
  "max_pe": 40,
  "min_market_cap": 500000000000,
  "limit": 10
}

analyze_portfolio

Analyze a portfolio of holdings with live price lookup.

Output: Total value, P&L per position, allocation %, sector breakdown, diversification score (HHI-based), concentration warnings.

{
  "holdings": [
    { "symbol": "AAPL", "shares": 100, "avg_cost": 150.00 },
    { "symbol": "MSFT", "shares": 50, "avg_cost": 380.00 },
    { "symbol": "JPM", "shares": 75, "avg_cost": 195.00 }
  ]
}

compare_assets

Compare 2-5 assets side by side over a configurable period.

Output: Returns, volatility, Sharpe ratio, max drawdown, correlation matrix, rankings.

{
  "symbols": ["AAPL", "MSFT", "GOOGL"],
  "period": "1y"
}

market_overview

Live market snapshot with no arguments needed.

Output: Major indices (S&P 500, NASDAQ, DOW, Russell 2000), VIX interpretation, sector ETF performance, crypto & commodities, market sentiment score.

{}

crypto_analysis

Crypto-specific analysis via CoinGecko free API.

Output: Price, 24h/7d/30d changes, volume, market cap, dominance, supply metrics, ATH/ATL, fear & greed approximation, global crypto market context.

{ "symbol": "BTC" }

Installation

No install step needed — run straight from npm:

npx -y market-data-analyzer

Or install globally:

npm install -g market-data-analyzer

Usage

Stdio transport (default)

npx -y market-data-analyzer

SSE transport

npx -y market-data-analyzer --sse
# or with custom port
PORT=8080 npx -y market-data-analyzer --sse

Claude Desktop configuration

{
  "mcpServers": {
    "market-data-analyzer": {
      "command": "npx",
      "args": ["-y", "market-data-analyzer"],
      "env": { "LICENSE_KEY": "<your license key — omit for free trial>" }
    }
  }
}

SSE endpoints

  • GET /sse -- SSE connection endpoint
  • POST /messages?sessionId=<id> -- Message endpoint
  • GET /health -- Health check

Data Sources

SourceUsed ByRate Limits
Yahoo Finance (free)analyze_stock, screen_stocks, analyze_portfolio, compare_assets, market_overviewUnofficial, best-effort
CoinGecko (free API)crypto_analysis10-30 calls/min

All price data is cached in-memory with a 5-minute TTL to minimize API calls and improve response times.

Technical Details

  • Runtime: Node.js 18+
  • Language: TypeScript (strict mode, ES modules)
  • Protocol: Model Context Protocol (MCP) via @modelcontextprotocol/sdk
  • Dependencies: @modelcontextprotocol/sdk + zod only
  • Caching: In-memory with 5-minute TTL for all price data
  • Calculations: SMA, EMA, RSI, MACD, Sharpe ratio, max drawdown, HHI diversification, support/resistance -- all implemented from scratch

Project Structure

src/
  index.ts              # Server setup, tool registration, transports
  types.ts              # TypeScript interfaces
  tools/
    analyze_stock.ts    # Stock analysis with technical indicators
    screen_stocks.ts    # Stock screener with live data
    analyze_portfolio.ts # Portfolio analytics
    compare_assets.ts   # Multi-asset comparison
    market_overview.ts  # Market snapshot
    crypto_analysis.ts  # Crypto analysis via CoinGecko
  utils/
    api.ts              # Yahoo Finance + CoinGecko API helpers
    cache.ts            # In-memory TTL cache
    math.ts             # Financial math (SMA, RSI, MACD, etc.)

License

MIT

Keywords

mcp

FAQs

Package last updated on 04 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts