Skip to main content

Market Data MCP Server

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

Python 3.10+ MCP License: MIT


Demo

Coming soon: A GIF showing the server in action with Claude Desktop.

In the meantime, check out the Example Output section below.


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

Tool Parameters Description
get_stock_quote ticker (str) Real-time stock price, change, volume, market cap, PE ratio, 52-week range, sector
get_crypto_price symbol (str) Cryptocurrency price via CoinGecko with 24h/7d/30d changes, market cap, ATH distance
get_market_movers none Today's top 10 gainers and losers from a universe of 60+ liquid stocks
get_sector_performance none All 11 S&P 500 sector ETFs with 1-day, 5-day, and 1-month returns
get_earnings_calendar days_ahead (int, default 7) Upcoming earnings reports with EPS and revenue estimates
get_technical_indicators ticker (str) RSI, MACD, SMA (20/50/200), EMA, Bollinger Bands, volume analysis, signal interpretation
get_fear_greed_index none CNN Fear & Greed Index (0-100) with historical comparison and VIX fallback
get_fda_calendar none Upcoming FDA PDUFA drug approval dates — major biotech catalysts
screen_stocks market, sector, min_price, max_price, min_volume, min_market_cap, sort_by, limit TradingView stock screener with filters for market, sector, price, volume, and technicals
screen_crypto min_volume, min_market_cap, sort_by, limit TradingView crypto screener with market cap filtering to exclude DEX noise
top_movers market, min_price, min_volume, count Market-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:

Platform Config 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

Source Used For Rate Limits
yfinance Stocks, ETFs, earnings, technicals Generous (Yahoo Finance)
CoinGecko API Cryptocurrency prices 10-30 req/min (free tier)
tvscreener Stock & crypto screening TradingView screener API
CNN Fear & Greed Market sentiment Public endpoint
Bundled JSON FDA PDUFA calendar No 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

Metadata

Release files for market-data-mcp 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for market-data-mcp 1.0.0
File Size Uploaded Provenance
market_data_mcp-1.0.0.tar.gz 19.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for market-data-mcp 1.0.0
File Interpreter ABI Platform
market_data_mcp-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.4 kB

Release files / market_data_mcp-1.0.0.tar.gz

Download URL market_data_mcp-1.0.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b67ab715afc1d1878200e239d06e1749fd7e54674cc611f8327786e5c0b4900c
BLAKE2b-256 checksum
How to use checksums
4b0a72b64330b3a6c478c399a4837cd5ee482fa2ef2e90bf1a0c5d811b61c060
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / market_data_mcp-1.0.0-py3-none-any.whl

Download URL market_data_mcp-1.0.0-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3df1b542982e5458db01c90bd9d6554811c3cea9f04039978673db0ee9f13077
BLAKE2b-256 checksum
How to use checksums
da6a096ce774ed262ae58d335cf005f8e499256b609e5c946f564b6452a7bc23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for market-data-mcp 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page