Pip Server

Market Data

Market Data MCP Server

Real-time financial market data for any MCP-compatible AI assistant. Stocks, crypto, technicals, sentiment, and FDA catalysts — no API keys required.

Python 3.10+ MCP Compatible License: MIT PyPI


Features

  • 11 financial tools covering equities, crypto, screening, macro, and biotech catalysts
  • Zero configuration — no API keys, no accounts, no environment variables
  • Three transports — stdio (Claude Desktop), SSE, and Streamable HTTP
  • Robust error handling — every tool returns structured JSON, even on failure
  • Built-in fallbacks — Fear & Greed index degrades gracefully to a VIX-based proxy
  • Production-quality code — type hints, docstrings, logging, and clean architecture

Quick Start

1. Clone the repository

git clone https://github.com/SmashToes/market-data-mcp.git
cd market-data-mcp

2. Install dependencies

pip install -e .

3. Run the server

# For Claude Desktop (stdio transport — the default)
python server.py

# For network access (SSE on port 8100)
python server.py --transport sse --port 8100

# For network access (Streamable HTTP on port 8100)
python server.py --transport streamable-http --port 8100

That's it. No .env file, no API keys, no configuration.


Tool Reference

ToolParametersDescription
get_stock_quoteticker (str)Real-time stock price, change, volume, market cap, PE ratio, 52-week range, sector
get_crypto_pricesymbol (str)Cryptocurrency price via CoinGecko with 24h/7d/30d changes, market cap, ATH distance
get_market_moversnoneToday's top 10 gainers and losers from a universe of 60+ liquid stocks
get_sector_performancenoneAll 11 S&P 500 sector ETFs with 1-day, 5-day, and 1-month returns
get_earnings_calendardays_ahead (int, default 7)Upcoming earnings reports with EPS and revenue estimates
get_technical_indicatorsticker (str)RSI, MACD, SMA (20/50/200), EMA, Bollinger Bands, volume analysis, signal interpretation
get_fear_greed_indexnoneCNN Fear & Greed Index (0-100) with historical comparison and VIX fallback
get_fda_calendarnoneUpcoming FDA PDUFA drug approval dates — major biotech catalysts
screen_stocksmarket, sector, min_price, max_price, min_volume, min_market_cap, sort_by, limitTradingView stock screener with filters for market, sector, price, volume, and technicals
screen_cryptomin_volume, min_market_cap, sort_by, limitTradingView crypto screener with market cap filtering to exclude DEX noise
top_moversmarket, min_price, min_volume, countMarket-wide top gainers, losers, and most active via TradingView screener engine

Example Output

Stock Quote

> get_stock_quote("NVDA")
{
  "ticker": "NVDA",
  "name": "NVIDIA Corporation",
  "price": 131.28,
  "change": 3.45,
  "change_percent": "+2.70%",
  "volume": "312.5M",
  "market_cap": "3.22T",
  "pe_ratio": 64.12,
  "52w_high": 153.13,
  "52w_low": 47.32,
  "sector": "Technology"
}

Technical Indicators

> get_technical_indicators("AAPL")
{
  "ticker": "AAPL",
  "price": 232.15,
  "rsi_14": 58.4,
  "rsi_signal": "Neutral",
  "macd": {
    "macd_line": 1.2834,
    "signal_line": 0.9621,
    "histogram": 0.3213
  },
  "bollinger_bands": {
    "upper": 238.50,
    "middle": 229.30,
    "lower": 220.10
  },
  "signals": [
    "RSI Neutral (58.4)",
    "MACD bullish",
    "Golden Cross (SMA 50 > 200)"
  ]
}

Fear & Greed Index

> get_fear_greed_index()
{
  "score": 38,
  "rating": "Fear",
  "classification": "Fear",
  "previous_close": 35,
  "one_week_ago": 29,
  "one_month_ago": 52
}

Use with Claude Desktop

Add the following to your Claude Desktop configuration file:

PlatformConfig Location
Windows%APPDATA%\Claude\claude_desktop_config.json
macOS~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "market-data": {
      "command": "python",
      "args": ["/absolute/path/to/market-data-mcp/server.py"],
      "env": {}
    }
  }
}

Restart Claude Desktop. The tools icon (hammer) will appear in the chat input area, confirming the server is connected.

Use with Claude Code (CLI)

claude mcp add market-data -- python /path/to/market-data-mcp/server.py

Or connect to a running network server:

claude mcp add market-data --transport sse http://localhost:8100/sse

Example Prompts

Once connected, try asking Claude:

  • "What's the current price of NVDA?"
  • "Show me the top market movers today"
  • "Give me technical analysis on AAPL"
  • "What's the Fear & Greed index right now?"
  • "Which sectors are performing best this week?"
  • "What earnings are coming up in the next 14 days?"
  • "Show me the price of Bitcoin and Solana"
  • "Any upcoming FDA approval dates for biotech stocks?"
  • "Screen for healthcare stocks with volume over 1M"
  • "What are the top crypto gainers right now?"
  • "Show me the biggest stock losers in the US market today"

Architecture

market-data-mcp/
├── server.py              # MCP server — all 11 tools in a single file
├── demo.py                # Standalone demo (no MCP client needed)
├── pyproject.toml          # Package metadata and dependencies
├── data/
│   └── fda_calendar.json   # Curated FDA PDUFA dates
├── .github/
│   └── FUNDING.yml         # Sponsor configuration
├── LICENSE                 # MIT License
├── .gitignore
└── README.md

Design Decisions

  • Single-file server. All tools live in server.py for maximum portability. Clone, install, run — no package structure to navigate.
  • No API keys. Every data source is free and public. yfinance (Yahoo Finance), CoinGecko free tier, CNN public endpoint, and a bundled JSON file for FDA dates.
  • Graceful degradation. If the CNN Fear & Greed endpoint is down, the tool automatically falls back to a VIX-based proxy score. If a stock ticker is invalid, the tool returns a structured error — never an exception.
  • Read-only annotations. Every tool is annotated with readOnlyHint=true, signaling to MCP clients that these tools have no side effects and are safe to call without user confirmation.

Data Sources

SourceUsed ForRate Limits
yfinanceStocks, ETFs, earnings, technicalsGenerous (Yahoo Finance)
CoinGecko APICryptocurrency prices10-30 req/min (free tier)
tvscreenerStock & crypto screeningTradingView screener API
CNN Fear & GreedMarket sentimentPublic endpoint
Bundled JSONFDA PDUFA calendarNo limits (local file)

Updating the FDA Calendar

The FDA calendar lives in data/fda_calendar.json. Each entry follows this schema:

{
  "ticker": "VKTX",
  "company": "Viking Therapeutics",
  "drug": "VK2735",
  "indication": "Obesity",
  "pdufa_date": "2026-03-15",
  "catalyst_type": "Phase 3 Data",
  "notes": "Oral obesity candidate"
}

Add or remove entries as new PDUFA dates are announced.


Contributing

Contributions are welcome. Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/add-options-flow)
  3. Make your changes
  4. Test with Claude Desktop or the standalone demo.py
  5. Submit a pull request

Ideas for Contribution

  • New tools: Options flow, insider trading activity, IPO calendar, economic indicators
  • Data sources: Alpha Vantage, Polygon.io, or FRED for macroeconomic data
  • Caching layer: Add TTL-based caching to reduce API calls for repeated queries
  • Docker support: Containerize the SSE/HTTP server for cloud deployment

Requirements

  • Python 3.10+
  • Internet connection (for live market data)
  • No API keys needed

License

MIT -- Copyright 2026 Nathan

Related Servers