SuperAPIAI Directory

market-data-mcp

github.com · AI developer platforms

market-data-mcp is a Model Context Protocol (MCP)-based server that provides real-time market data tools for any large language model (LLM) and MCP clients (such as Claude Desktop, Claude Code, and agents), with data sourced from the Finnhub free API. It provides stock quotes, news, earnings calendars, a watchlist scanner, and comprehensive market analysis verdicts; all tools uniformly return Markdown (default) or JSON (on demand) format, and follow a unified result contract and graceful degradation principles: when data is missing, an endpoint requires payment, or a key is not configured, it returns "no data" and does not fabricate values. Optional integration with an Alpaca paper account reads positions. The project must be installed from source, and is suitable for research, teaching, and agent data access scenarios; it does not constitute investment advice.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS

About this tool

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

  1. At https://finnhub.io/register obtain a free Finnhub key.
  2. Note that the market-data-mcp package on PyPI is an unrelated project by another author; this project must be installed from source.
  3. 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.
  4. 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.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools