Package Exports
- market-data-analyzer
- market-data-analyzer/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (market-data-analyzer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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 |
| Pro | $25/mo | All 6 tools + priority data refresh |
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
npm install
npm run buildUsage
Stdio transport (default)
node dist/index.jsSSE transport
node dist/index.js --sse
# or with custom port
PORT=8080 node dist/index.js --sseClaude Desktop configuration
{
"mcpServers": {
"market-data-analyzer": {
"command": "node",
"args": ["/path/to/market-data-analyzer/dist/index.js"]
}
}
}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