Skip to main content
Glama

yahoo-stock-mcp

npm version

English | 中文

Unofficial provider integrations / data-use notice

Yahoo Finance and Investing.com integrations in this project are unofficial. This project is not affiliated with, sponsored by, endorsed by, or authorized by Yahoo or Investing.com / Fusion Media.

Access to, storage of, and reuse or redistribution of upstream data may be restricted by provider terms and data licenses. Users are responsible for determining whether their use — including full-history sync, sync --all, local retention, and downstream use — complies with applicable terms, licenses, and law. This project grants no rights to upstream data.

Provider-access policy: transport compatibility may use ordinary protocol-level options such as standard TLS version selection, normal HTTP header casing, and a user-configured forward proxy. A bounded fallback across supported TLS profiles is allowed. The project must not implement CAPTCHA or JavaScript challenge solving, IP/account/identity rotation, credential spoofing, or unbounded retry behavior intended to defeat an explicit access denial. Recognized challenge/access-denial responses are surfaced as provider failures.

Provider terms can change. Review the current Yahoo Terms of Service and Investing.com Terms and Conditions for the jurisdiction and use case that apply to you.

An MCP server for stock-market data with unofficial Yahoo Finance and Investing.com integrations, backed by a local SQLite database.

What it does

  • syncs quotes, fundamentals, ratios, dividends, earnings, holders, news, options, events, and sector data;

  • stores normalized data in a local SQLite database and exposes it through MCP tools;

  • computes 42 technical indicators locally from stored bars;

  • uses Yahoo for daily/intraday bars and Yahoo + Investing for complementary fundamentals;

  • supports scheduled live-provider contract checks;

  • ships agent skills that turn those tools into repeatable research workflows.

Related MCP server: YFinance MCP Server

Documentation

  • Usage — install, database setup, sync commands, MCP client config, environment variables, and proxy setup.

  • Reference — MCP tools, tests, indicators, canonical metrics, and detailed data coverage.

  • Skills — installable Agent Skills for company, sector, options, dividend, earnings, and technical research workflows, plus how to verify them.

  • 中文使用说明 / 中文参考

Codex plugin

The repository also ships a portable Agent Plugin that bundles all seven skills with the MCP server configuration. Add this repository as a Codex marketplace source:

codex plugin marketplace add jamespud/yahoo-stock-mcp

Then install Yahoo Stock MCP from that marketplace in a supported Plugins Directory. The bundled stdio server runs the npm package version matching the plugin manifest. Node.js >= 22.13 and local YAHOO_STOCK_MCP_* configuration are required; the SQLite database is created automatically in a per-user data directory, and no external database service is needed. Credentials are never stored in the plugin files. For skill-only installation, see skills/README.md.

Data sources

  • Yahoo Finance (unofficial): bars, quoteSummary, options, news, fundamentals-timeseries.

  • Investing.com (unofficial): GraphQL quotes, financial statements, ratios, dividends, estimates, earnings, profile, executives, and holders.

  • Bars are Yahoo-only. The former Investing TVC/K-line path has been removed.

Yahoo is the primary provider by default; Investing fills gaps. Set YAHOO_STOCK_MCP_PRIMARY_PROVIDER=investing to reverse the precedence.

Investing availability

The Investing integration uses a native Node transport with a bounded TLS compatibility profile and optional HTTP/HTTPS forward proxy support. It does not solve challenge pages. If supported profiles are rejected or Investing is otherwise unreachable, the provider failure is surfaced explicitly and a sync may report partial.

The scheduled live-provider canary hard-gates Yahoo and Investing data-contract/unit regressions. Investing network or access availability may report DEGRADED instead of failing the job because hosted-runner egress can be blocked independently of the provider contract. The canary is low-frequency and does not populate the project database or publish a data feed.

Upgrading from v0.4.0

v0.5.0 is a breaking release: MySQL support has been removed. SQLite is now the only backend, and there is no automatic data migration in this release.

If you have data in a MySQL database created by v0.4.x:

  1. Back it up first. The database is untouched by the upgrade, but nothing in v0.5.0 will read it.

  2. Re-sync into SQLite if you want to keep using this project. Be aware that a re-sync does not guarantee recovery of all history — some historical bars, news items and financial observations may no longer be available from the upstream providers.

  3. To keep reading the old data, stay on v0.4.x. Old and new installs can coexist.

A one-off MySQL → SQLite migration tool is deferred and not part of v0.5.0. The historical v0.4.0 schema is preserved in the repository under scripts/mysql-to-sqlite/fixtures/ for that future work; it is not shipped in the npm package.

If any of YAHOO_STOCK_MCP_DATABASE_URL or YAHOO_STOCK_MCP_DB_* is still set, the server refuses to start and tells you so rather than silently creating an empty database.

Requirements

  • Node.js >= 22.13

  • No database service: a local SQLite file is created automatically on first use

  • Provider access subject to the notices and upstream terms above

For setup and commands, continue with docs/USAGE.md.

Available Tools

27 tools
get_analyst_actionsB

Get analyst upgrades, downgrades and price-target changes.

Inputs: symbol (required), limit.

get_analyst_forecastB

Get analyst consensus, buy/hold/sell counts and price targets.

Inputs: symbol (required).

get_barsA

Get historical OHLCV bars from the database (1d/1wk/1mo).

Inputs: symbol (required), to, from, limit, +1 more.

get_company_eventsA

Get forward-looking company events: next earnings date, earnings call, ex-dividend and dividend payment dates.

Inputs: symbol (required), limit.

get_dividendsB

Get dividend history and dividend summary for a stock.

Inputs: symbol (required).

get_earningsB

Get earnings history and forecasts (EPS and revenue, actual vs estimate).

Inputs: symbol (required).

get_earnings_trendA

Get quarterly earnings estimate trend: EPS/revenue estimates, growth and recent revisions.

Inputs: symbol (required).

get_financialsB

Get financial statements (income statement, balance sheet, cash flow) from the database.

Inputs: symbol (required), period, statement.

get_fund_holdersC

Get mutual fund / fund ownership positions.

Inputs: symbol (required), limit.

get_holder_breakdownA

Get ownership structure: insider % and institutional % held, float % and count.

Inputs: symbol (required).

get_holdersB

Get institutional holders and ownership data.

Inputs: symbol (required), limit.

get_insider_transactionsB

Get insider (officer/director) buy/sell transactions.

Inputs: symbol (required), limit.

get_intraday_barsA

Get intraday OHLCV bars (1m/5m/15m/30m/60m) stored in the database. Run sync_stock with mode=intraday_15m etc. to populate.

Inputs: symbol (required), to, from, limit, +1 more.

get_newsC

Get recent news for a stock.

Inputs: symbol (required), limit.

get_option_quoteA

Fetch live options quotes for a stock directly from Yahoo (on-demand, no DB sync needed): underlying quote, available expirations/strikes, and per-contract bid/ask/last/volume/open interest/IV.

Inputs: symbol (required), type, limit, strike, +1 more.

get_optionsB

Get the latest options chain snapshot for a stock (from Yahoo).

Inputs: symbol (required), expiration.

get_profileA

Get company profile: business summary, sector, industry, employees, address, contact info.

Inputs: symbol (required).

get_quoteA

Get latest quote for a stock: price, 52-week range, key ratios, dividend summary.

Inputs: symbol (required).

get_ratiosB

Get valuation and financial ratios (PE, PS, PB, margins, ROE, beta, etc.).

Inputs: symbol (required).

get_recommendation_trendB

Get analyst recommendation trend (strong buy/buy/hold/sell/strong sell) by period.

Inputs: symbol (required).

get_sector_membersA

Get a sector's top constituents with weights (from the sector ETF's topHoldings).

Inputs: sector (required), limit.

get_sector_performanceA

Sector rotation view: latest price and 1d/5d/20d returns for every GICS sector ETF, ranked by 1-day change, plus the SPY benchmark.

Inputs: no named parameters.

get_short_interestB

Get short interest snapshot: shares short, short ratio, % of float, days to cover.

Inputs: symbol (required).

list_sectorsA

List the GICS sector catalog (11 sectors + S&P 500 benchmark), each mapped to its SPDR sector ETF.

Inputs: no named parameters.

search_symbolA

Search locally stored instruments by symbol or name.

Inputs: query (required).

sync_sectorsA

Sync all GICS sector ETFs (quote, ~30d bars) and their top-holding constituents into the database. members=false skips constituent refresh.

Inputs: members.

sync_stockA

Sync a stock from providers into the local MySQL database. full = complete history from 2000; incremental = only new data.

Inputs: symbol (required), mode, intraday.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 27 tools

    Disambiguation3/5

    Most retrievals map cleanly to distinct data slices (quote, bars, profile, financials), but there are several closely grouped families: get_holders/get_fund_holders/get_holder_breakdown, get_analyst_forecast/get_recommendation_trend/get_analyst_actions/get_earnings_trend, and get_options/get_option_quote. The descriptions help, but an agent could easily select the wrong endpoint within these clusters.

    Naming Consistency5/5

    All tools follow a clear snake_case verb_noun pattern: get_* for data retrieval, search_symbol for lookup, sync_* for data population, and list_sectors for catalog access. The only minor variation is the mix of verbs, but each verb maps consistently to an action category, so the set is predictable.

    Tool Count2/5

    At 27 tools, the server exceeds the comfortable 15-tool range and is just past the 25 threshold. While the stock-data domain is broad, several endpoints (e.g., owner/analyst families) could be consolidated without losing clarity.

    Completeness4/5

    The surface covers the core stock lifecycle: symbol search, quotes, daily/intraday bars, financial statements, dividends, analyst data, ownership, news, options, and sector performance. Minor gaps exist such as batch quote support or historical options chains, but agents can complete typical research workflows without dead ends.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Real-time financial market data MCP server. Stocks, crypto, technicals, sentiment, FDA calendar. No API keys required.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive MCP server that provides seamless access to Yahoo Finance stock market data, enabling retrieval of real-time quotes, historical data, charts, financial summaries, and market searches.
      28 npm
      ISC
    • A
      license
      A
      quality
      B
      maintenance
      MCP server that exposes Yahoo Finance data through tools for searching instruments, fetching quotes, history, company info, financials, dividends, news, recommendations, and options. Enables AI assistants to answer market-data questions using natural language.
      24
      2,315 PyPI
      2
      MIT