market-data-analyzer
v2.1.4
Published
MCP server for financial market data analysis -- live stock analysis, screening, portfolio analytics, crypto analysis, and market overview using free APIs.
Maintainers
Readme
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
| Plan | Price | Includes |
|------|-------|----------|
| Basic | $15/mo | analyze_stock, screen_stocks, market_overview — Buy → |
| Pro | $25/mo | All 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-analyzerOr install globally:
npm install -g market-data-analyzerUsage
Stdio transport (default)
npx -y market-data-analyzerSSE transport
npx -y market-data-analyzer --sse
# or with custom port
PORT=8080 npx -y market-data-analyzer --sseClaude 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 endpointPOST /messages?sessionId=<id>-- Message endpointGET /health-- Health check
Data Sources
| Source | Used By | Rate Limits |
|--------|---------|-------------|
| Yahoo Finance (free) | analyze_stock, screen_stocks, analyze_portfolio, compare_assets, market_overview | Unofficial, best-effort |
| CoinGecko (free API) | crypto_analysis | 10-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+zodonly - 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
