stock-mcp
Summary: This server gives an AI agent read access to locally synced Yahoo Finance / Investing.com stock-market data in MySQL, plus the ability to sync new data on demand.
Search & quotes — find instruments by symbol/name (
search_symbol) and pull quotes with 52-week range, ratios, and dividend summary (get_quote).Price history — daily/weekly/monthly OHLCV bars (
get_bars) and intraday 1m–60m bars (get_intraday_bars), both from the local DB.Fundamentals — company profile, income/balance/cashflow statements, and valuation/financial ratios.
Dividends & events — dividend history/summary, plus forward-looking events like next earnings, earnings call, ex-dividend, and payment dates.
Earnings & analysts — earnings history/forecasts, earnings estimate trends, analyst consensus and price targets, upgrades/downgrades, and recommendation trends.
Ownership — institutional holders, mutual-fund holders, insider transactions, short interest, and ownership breakdown (insider/institutional %).
Options — stored option-chain snapshots (
get_options) and live on-demand Yahoo option quotes by expiration/strike/type (get_option_quote).News — recent stock news.
Sectors — list GICS sectors, view sector rotation performance vs SPY, get top constituents with weights, and sync sector ETFs/holdings.
Data sync — populate/update MySQL for a stock (
sync_stock, full or incremental, optional intraday) and refresh all sector ETF data (sync_sectors).
Stores and retrieves stock market data in a MySQL database, providing tools for querying quotes, historical K-line data, company profiles, financial statements, ratios, dividends, analyst forecasts, earnings, holders, news, and options chains.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stock-mcp Get latest quote for AAPL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yahoo-stock-mcp
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-mcpThen 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:
Back it up first. The database is untouched by the upgrade, but nothing in v0.5.0 will read it.
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.
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 toolsget_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
Scored across 27 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for Financial Modeling Prep API with 250+ financial data tools
Official Intrinio MCP server. US stock prices, options and fundamentals for AI agents.
One API and MCP server for financial and economic data: markets, economics, companies and more.
Hosted MCP server for SEC, FRED, Polymarket, Deribit, OKX, and FMP.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceReal-time financial market data MCP server. Stocks, crypto, technicals, sentiment, FDA calendar. No API keys required.-
- AlicenseNot gradedqualityDmaintenanceA 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 npmISC
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP server for accessing Yahoo Finance data, providing stock prices, history, company information, and financial statements.-
- AlicenseAqualityBmaintenanceMCP 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.242,315 PyPI2MIT