Purpose market-data-mcp is an MCP server whose goal is to provide clean, unified market data tools for any MCP client (Claude Desktop, Claude Code, agents, etc.), enabling LLMs to obtain real-time quotes, news, earnings calendars, watchlist scan results, and comprehensive market verdicts. The data backend is the Finnhub free API.
Main capabilities
- Market data tools such as quotes, news, and earnings calendars.
- Watchlist scanner.
- Comprehensive market analysis tool market_analyze, which outputs a directional score from -100 to +100 and a confidence level, making it easy for agents to triage without reading long texts.
- Optional broker_positions tool that reads Alpaca paper account positions; when ALPACA_API_KEY and ALPACA_SECRET_KEY are not configured, it returns a "keys not set" message and degrades gracefully.
- All tools return Markdown by default (human-readable), and return JSON when response_format="json" is passed, for programmatic use.
Design features
- Unified result contract: each data source returns the same Result structure (source, ok, summary, data, score, confidence, error), so LLMs can reason across tools without parsing multiple formats.
- Graceful degradation: when there is no data, an endpoint is payment-restricted, or a key is missing, it returns Result.failed(...) and never fabricates values; the zero price returned by Finnhub for unknown symbols is treated as "no data" rather than a quote.
- TTL cache: in-process caching per data source, avoiding agents frequently hitting rate-limited APIs when calling multiple tools in the same round.
Usage
- At https://finnhub.io/register obtain a free Finnhub key.
- Note that the market-data-mcp package on PyPI is an unrelated project by another author; this project must be installed from source.
- Claude Desktop configuration: add the corresponding configuration to claude_desktop_config.json (on Windows located at %APPDATA%\Claude, on macOS located at ~/Library/Application Support/Claude/), then restart Claude Desktop; when not using a virtual environment, use the system Python path.
- Optional Alpaca: go to https://app.alpaca.markets/ → Paper Trading → API Keys to obtain keys, add ALPACA_API_KEY and ALPACA_SECRET_KEY to .env, and restart the server.
Applicable scenarios Aimed at research and teaching scenarios that need to connect real-time market data to LLMs or agents, such as quote queries, news retrieval, earnings calendar viewing, watchlist scanning, and comprehensive scoring analysis.
Limitations For research and educational purposes only; data comes from Finnhub and Alpaca and may be delayed or incomplete; automated market data should not be used for financial decisions without independent verification. The earnings calendar was tested on 2026-06-14 and is accessible on the Finnhub free tier. Other specific feature details, fees, and pricing information are not yet provided.