yfinance-ai: Yahoo Finance

io.github.lkcairPublished by GitHub account lkcairv5.0.5Updated Oct 29, 2026

Yahoo Finance in 68 tools: stocks, crypto, forex, commodities, funds, options, analysts, calendars.

The publisher's own server: Finance Foundation

VerifiedSTDIODesktop onlyFinanceData & Analytics

Overview

AI-generated overview

Local MCP server exposing 68 read-only Yahoo Finance tools so an assistant can look up stock, fund, crypto, forex and commodity market data.

What you can do
  • Look up quotes, prices, historical data and price on a given date, plus bulk downloads and ticker search
  • Read financial statements, ratios, valuation history, TTM figures and share counts
  • Pull analyst estimates, price targets, recommendations, upgrades and downgrades, and earnings dates and history
  • Review holders, insiders, dividends, splits, options chains, funds and ETFs
  • Check market status, indices, movers, sector and industry overviews, and earnings, IPO, economic and split calendars
  • Compare stocks and peers, fetch news and SEC filings, and run a full multi-tool analysis of one ticker
When to use it
Useful when you want an assistant to answer questions about public markets, company fundamentals, analyst views or upcoming market events without leaving the chat, and to compare several tickers side by side.
Requirements
Runs locally over stdio; needs uv (uvx yfinance-ai@latest) or pip install yfinance-ai. No API key or account. Requires internet access to Yahoo Finance data.
Before you install
Quotes can be delayed about 15 minutes and the output is not investment advice. News headlines and summaries are third-party text that the assistant should report rather than act on. get_complete_analysis and run_self_test issue many requests, so use them only when that depth is wanted. Every tool is read-only.

Installation

In SourceWeft

  1. Open yfinance-ai: Yahoo Finance in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

yfinance-ai MCP server

[PyPI] [License: MIT]

World's first AI-powered Yahoo Finance integration: 68 tools for stocks, ETFs, mutual funds, crypto, forex and commodities, in one Python file.

🚀 Thousands of downloads on ClawHub and OpenWebUI

Prices and history, financial statements, ratios and valuation history, analyst estimates and price targets, earnings, dividends, options, holders and insiders, funds and ETFs, market movers, sectors and industries, and earnings, IPO, economic and split calendars.

Use it inInstallRepo
Claude, Cursor, VS Code, LangChain, Google ADK, Strands Agents and other MCP clientsuvx yfinance-ai@latestyfinance-ai-mcp
ClawHub skill for OpenClaw 🚀 Thousands of downloadsopenclaw skills install @lkcair/stocksyfinance-ai-skill
OpenWebUI tool 🚀 Thousands of downloadsGet it on openwebui.comyfinance-ai
Pythonfrom yfinance_ai import Toolsyfinance-ai

Install

Needs uv. No API key.

Claude Code:

bash
claude mcp add yfinance-ai -- uvx yfinance-ai@latest

VS Code:

bash
code --add-mcp '{"name":"yfinance-ai","type":"stdio","command":"uvx","args":["yfinance-ai@latest"]}'

Claude Desktop, Cursor, Windsurf and other clients, in the client's MCP config file:

json
{  "mcpServers": {    "yfinance-ai": {      "command": "uvx",      "args": [        "yfinance-ai@latest"      ]    }  }}

@latest picks up new releases when the client starts. Without uv: pip install yfinance-ai, then use "command": "yfinance-ai" with no args.

Listed in the MCP Registry as io.github.lkcair/yfinance-ai. Every tool is read-only.

Agent frameworks

The server runs over stdio with uvx yfinance-ai@latest, so any framework with MCP support can load all its tools.

LangChain: pip install "langchain[mcp]" langchain-anthropic

python
import asynciofrom langchain.agents import create_agentfrom langchain.mcp import MCPAdapter
async def main():    config = {"mcpServers": {"yfinance-ai": {        "command": "uvx", "args": ["yfinance-ai@latest"],    }}}    async with MCPAdapter(config) as adapter:        tools = await adapter.list_tools()        agent = create_agent("claude-sonnet-5", tools)        result = await agent.ainvoke({"messages": [{"role": "user", "content": "What is Apple's P/E, and how does it compare with Microsoft and Google?"}]})        print(result["messages"][-1].content)
asyncio.run(main())

Google ADK: pip install "google-adk[mcp]"

python
from google.adk.agents import LlmAgentfrom google.adk.tools.mcp_tool import McpToolsetfrom google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParamsfrom mcp import StdioServerParameters
root_agent = LlmAgent(    model="gemini-flash-latest",    name="yfinance_ai",    instruction="Answer with the yfinance-ai tools.",    tools=[McpToolset(connection_params=StdioConnectionParams(        server_params=StdioServerParameters(command="uvx", args=["yfinance-ai@latest"]),        timeout=60,    ))],)

Strands Agents: pip install strands-agents

python
from mcp import stdio_client, StdioServerParametersfrom strands import Agentfrom strands.tools.mcp import MCPClient
yfinance_ai = MCPClient(lambda: stdio_client(StdioServerParameters(    command="uvx", args=["yfinance-ai@latest"],)))agent = Agent(tools=[yfinance_ai])agent("What is Apple's P/E, and how does it compare with Microsoft and Google?")

Example questions

  • What is Apple's P/E, and how does it compare with Microsoft and Google?
  • What are analysts saying about NVIDIA? Price targets and recent upgrades.
  • Who reports earnings this week?
  • Bitcoin price, EUR/USD rate and gold today.

MCP tools (68)

Quotes and history

ToolParametersDescription
get_stock_pricetickerGet current stock price and key metrics for a ticker symbol
get_stock_quotetickerGet detailed quote with bid/ask, day range, and trading info
get_fast_infotickerGet fast-access ticker information (lightweight, quick response)
get_historical_dataticker, period="1y", interval="1d"Get historical price data for a stock
get_historical_price_on_dateticker, dateGet historical price for a specific date
download_multiple_tickerstickers, period="1mo", interval="1d"Historical data for several tickers at once

Company

ToolParametersDescription
get_company_infotickerGet detailed company information and business description
get_company_overviewtickerCompany overview with context for every metric
get_company_officerstickerGet company officers and key management
get_isintickerGet International Securities Identification Number (ISIN) for a ticker

Financials

ToolParametersDescription
get_income_statementticker, period="annual"Get income statement data
get_balance_sheetticker, period="annual"Get balance sheet data
get_cash_flowticker, period="annual"Get cash flow statement data
get_ttm_financialstickerGet trailing-twelve-month (TTM) income statement and cash flow
get_key_ratiostickerGet key financial ratios and valuation metrics
get_valuation_historytickerGet valuation measures now and for the last quarters (market cap, EV, P/E, PEG, P/S, P/B, EV/EBITDA)
get_financial_summarytickerGet a comprehensive one-page financial summary of a stock
get_shares_historyticker, years=3Get shares outstanding over time (dilution or buybacks)

Earnings and estimates

ToolParametersDescription
get_earnings_datestickerGet upcoming and past earnings dates with estimates
get_earnings_historytickerGet historical earnings data with annual and quarterly figures
get_earnings_calendartickerGet earnings calendar including next earnings date and dividend dates
get_analyst_estimatestickerGet analyst estimates for earnings, revenue, and EPS
get_growth_estimatestickerGet analyst growth estimates
get_eps_trendtickerGet EPS (Earnings Per Share) trend data showing how estimates have changed
get_eps_revisionstickerGet EPS revision data showing analyst estimate changes

Analysts

ToolParametersDescription
get_analyst_recommendationstickerGet analyst recommendations and ratings
get_analyst_price_targetstickerGet detailed analyst price targets for a stock
get_upgrades_downgradesticker, limit=20Get detailed analyst upgrades and downgrades history

Holders and insiders

ToolParametersDescription
get_institutional_holderstickerGet major institutional holders and their ownership
get_major_holderstickerGet major holders summary (institutions, insiders, public float)
get_mutualfund_holderstickerGet mutual fund holders
get_insider_transactionstickerGet recent insider trading activity
get_insider_purchasestickerGet insider purchases only (filtered for buys)
get_insider_roster_holderstickerGet insider roster (list of company insiders)

Dividends and corporate actions

ToolParametersDescription
get_dividendsticker, period="5y"Get dividend payment history and current metrics
get_stock_splitstickerGet stock split history
get_corporate_actionstickerGet all corporate actions (dividends + splits combined)
get_capital_gainstickerGet capital gains distributions (primarily for funds/ETFs)

Options

ToolParametersDescription
get_options_chainticker, expiration=""Get options chain data (calls and puts)
get_options_expirationstickerGet all available options expiration dates

Market-wide

ToolParametersDescription
get_market_statusCheck if US stock markets are currently open
get_market_summaryregion="US"Get a market overview for a region: open/closed status plus main indices, futures, bonds and FX
get_market_indicesGet current prices for major market indices
get_market_moverscategory="day_gainers", count=10Get today's market movers from Yahoo Finance screeners
get_trending_tickerscount=10Get today's most active (trending) US tickers
get_sector_performanceGet performance of major market sectors
get_sector_overviewsector="technology"Get a sector overview: size, weight, largest companies, industries and sector ETFs
get_industry_overviewindustry="semiconductors"Get an industry overview: largest, best-performing and fastest-growing companies

Calendars

ToolParametersDescription
get_upcoming_earningsdays=7, limit=25Get the market-wide earnings calendar (which companies report in the next N days)
get_ipo_calendardays=14, limit=25Get upcoming IPOs (exchange, expected date, price range, shares)
get_economic_calendardays=7, limit=30Get upcoming economic events (CPI, jobs, GDP, rate decisions) with expected and prior values
get_splits_calendardays=14, limit=25Get upcoming stock splits

Funds and ETFs

ToolParametersDescription
get_fund_overviewtickerGet overview data for an ETF or mutual fund
get_fund_holdingsticker, limit=25Get top holdings for an ETF or mutual fund
get_fund_sector_weightstickerGet sector allocation/weights for an ETF or mutual fund

Crypto, forex and commodities

ToolParametersDescription
get_crypto_pricesymbolGet cryptocurrency price and market data
get_forex_ratepairGet foreign exchange (forex) rate for a currency pair
get_commodity_pricecommodityGet commodity/futures price data

Compare

ToolParametersDescription
compare_stockstickersCompare key metrics across multiple stocks
get_peer_comparisonticker, peers=nullCompare a stock with its peers on key metrics
get_historical_comparisontickers, period="1y"Compare historical price performance of multiple stocks
get_complete_analysisticker, peers=""Complete analysis of a stock, calling every relevant tool

News and filings

ToolParametersDescription
get_stock_newsticker, limit=10Get recent news articles about a stock
get_sec_filingstickerGet recent SEC filings (10-K, 10-Q, 8-K, etc.)

Utility

ToolParametersDescription
search_tickerquerySearch for ticker symbols by company name or keyword
validate_tickertickerValidate if a ticker symbol exists and is tradeable
get_api_statusGet API status and usage information
run_self_testticker="SPY"Run comprehensive self-test of the yfinance-ai tools (64 checks)

License

MIT. Data comes from Yahoo Finance through yfinance and may be delayed. Not affiliated with Yahoo. For research and education, not investment advice.

Source: README.md at commit 2477fa8

Tools

68

compare_stocks

Compare Stocks

Compare key metrics across multiple stocks. Returns: Comparison table of price, market cap, P/E, dividend yield, and returns

Parameterstickersrequired

download_multiple_tickers

Download Multiple Tickers

Download historical data for multiple tickers at once (bulk operation). Returns: Summary of downloaded data for all tickers

Parametersperiodtickersrequiredinterval

get_analyst_estimates

Analyst Estimates

Get analyst estimates for earnings, revenue, and EPS. Returns: Comprehensive analyst estimates and forecasts

Parameterstickerrequired

get_analyst_price_targets

Analyst Price Targets

Get detailed analyst price targets for a stock. Returns: Comprehensive price target data including current, low, mean, median, high targets and the number of analysts covering the stock

Parameterstickerrequired

get_analyst_recommendations

Analyst Recommendations

Get analyst recommendations and ratings. Returns: Analyst buy/hold/sell recommendations, consensus, and recent upgrades/downgrades

Parameterstickerrequired

get_api_status

API Status

Get API status and usage information. Returns: Current API usage statistics and configuration

Takes no parameters.

get_balance_sheet

Balance Sheet

Get balance sheet data. Returns: Balance sheet with assets, liabilities, and equity

Parametersperiodtickerrequired

get_capital_gains

Capital Gains

Get capital gains distributions (primarily for funds/ETFs). Returns: Capital gains distribution history

Parameterstickerrequired

get_cash_flow

Cash Flow

Get cash flow statement data. Returns: Cash flow statement with operating, investing, and financing activities

Parametersperiodtickerrequired

get_commodity_price

Commodity Price

Get commodity/futures price data. Returns: Current price, day change, and key market data

Parameterscommodityrequired

get_company_info

Company Info

Get detailed company information and business description. Returns: Company overview including sector, industry, employees, website, and business summary

Parameterstickerrequired

get_company_officers

Company Officers

Get company officers and key management. Returns: List of company officers with titles and compensation

Parameterstickerrequired

get_company_overview

Company Overview

Get a beautiful, insightful company overview with context for every metric. Perfect for quick overviews and basic questions about a company. Returns: Beautifully formatted company overview with insights and context

Parameterstickerrequired

get_complete_analysis

Complete Analysis

Run a complete analysis of a stock by calling ALL available functions. This is the most comprehensive analysis available - use when user asks for "everything about" or "complete analysis of" a company. Returns: Comprehensive analysis with results from all applicable functions

Parameterspeerstickerrequired

get_corporate_actions

Corporate Actions

Get all corporate actions (dividends + splits combined). Returns: Combined history of dividends and stock splits

Parameterstickerrequired

get_crypto_price

Crypto Price

Get cryptocurrency price and market data. Returns: Current price, 24h change, market cap, volume, and key metrics

Parameterssymbolrequired

get_dividends

Dividends

Get dividend payment history and current metrics. Returns: Dividend history and current dividend metrics

Parametersperiodtickerrequired

get_earnings_calendar

Earnings Calendar

Get earnings calendar including next earnings date and dividend dates. Returns: Upcoming earnings dates, ex-dividend dates, and dividend payment dates

Parameterstickerrequired

get_earnings_dates

Earnings Dates

Get upcoming and past earnings dates with estimates. Returns: Earnings calendar with dates, estimates, and actual results

Parameterstickerrequired

get_earnings_history

Earnings History

Get historical earnings data with annual and quarterly figures. Returns: Historical earnings by year and quarter

Parameterstickerrequired

get_economic_calendar

Economic Calendar

Get upcoming economic events (CPI, jobs, GDP, rate decisions) with expected and prior values. Returns: Table of economic events by region and time

Parametersdayslimit

get_eps_revisions

EPS Revisions

Get EPS revision data showing analyst estimate changes. Returns: EPS revisions showing up/down estimate changes by analysts

Parameterstickerrequired

get_eps_trend

EPS Trend

Get EPS (Earnings Per Share) trend data showing how estimates have changed. Returns: EPS trend data showing estimate changes over different time periods

Parameterstickerrequired

get_fast_info

Fast Info

Get fast-access ticker information (lightweight, quick response). Returns: Quick summary with most recent price, market cap, and basic metrics

Parameterstickerrequired

get_financial_summary

Financial Summary

Get a comprehensive one-page financial summary of a stock. Returns: Comprehensive summary including price, valuation, financials, and analyst data

Parameterstickerrequired

get_forex_rate

Forex Rate

Get foreign exchange (forex) rate for a currency pair. Returns: Current exchange rate, bid/ask, day range, and recent changes

Parameterspairrequired

get_fund_holdings

Fund Holdings

Get top holdings for an ETF or mutual fund. Returns: List of top holdings with weights and values

Parameterslimittickerrequired

get_fund_overview

Fund Overview

Get overview data for an ETF or mutual fund. Returns: Fund category, family, total assets, expense ratio, and other key metrics

Parameterstickerrequired

get_fund_sector_weights

Fund Sector Weights

Get sector allocation/weights for an ETF or mutual fund. Returns: Sector allocation percentages for the fund

Parameterstickerrequired

get_growth_estimates

Growth Estimates

Get analyst growth estimates. Returns: Growth rate estimates for various periods

Parameterstickerrequired

get_historical_comparison

Historical Comparison

Compare historical price performance of multiple stocks. Returns: Performance comparison showing % returns for each ticker

Parametersperiodtickersrequired

get_historical_data

Historical Data

Get historical price data for a stock. Returns: Historical price data summary with statistics and returns

Parametersperiodtickerrequiredinterval

get_historical_price_on_date

Historical Price on Date

Get historical price for a specific date. Returns: Price on that date (or closest trading day)

Parametersdaterequiredtickerrequired

get_income_statement

Income Statement

Get income statement data. Returns: Income statement with revenue, expenses, and net income

Parametersperiodtickerrequired

get_industry_overview

Industry Overview

Get an industry overview: largest, best-performing and fastest-growing companies. Returns: Industry summary with top companies by size, YTD performance and growth

Parametersindustry

get_insider_purchases

Insider Purchases

Get insider purchases only (filtered for buys). Returns: Recent insider purchase transactions

Parameterstickerrequired

get_insider_roster_holders

Insider Roster Holders

Get insider roster (list of company insiders). Returns: List of company insiders and their positions

Parameterstickerrequired

get_insider_transactions

Insider Transactions

Get recent insider trading activity. Returns: Recent insider buy/sell transactions

Parameterstickerrequired

get_institutional_holders

Institutional Holders

Get major institutional holders and their ownership. Returns: List of institutional holders with shares owned and percentage ownership

Parameterstickerrequired

get_ipo_calendar

IPO Calendar

Get upcoming IPOs (exchange, expected date, price range, shares). Returns: Table of upcoming IPOs

Parametersdayslimit

get_isin

ISIN

Get International Securities Identification Number (ISIN) for a ticker. Returns: ISIN code and related identification information

Parameterstickerrequired

get_key_ratios

Key Ratios

Get key financial ratios and valuation metrics. Returns: Comprehensive ratios including P/E, P/B, ROE, ROA, profit margins, debt ratios

Parameterstickerrequired

get_major_holders

Major Holders

Get major holders summary (institutions, insiders, public float). Returns: Summary of insider vs institutional ownership percentages

Parameterstickerrequired

get_market_indices

Market Indices

Get current prices for major market indices. Returns: Current values and changes for S&P 500, Nasdaq, Dow Jones, and other major indices

Takes no parameters.

get_market_movers

Market Movers

Get today's market movers from Yahoo Finance screeners. Returns: Table of tickers with price, change %, volume and market cap

Parameterscountcategory

get_market_status

Market Status

Check if US stock markets are currently open. Returns: Market status (open/closed), current time, and market hours

Takes no parameters.

get_market_summary

Market Summary

Get a market overview for a region: open/closed status plus main indices, futures, bonds and FX. Returns: Market status and a table of the region's headline instruments

Parametersregion

get_mutualfund_holders

Mutual Fund Holders

Get mutual fund holders. Returns: List of mutual funds holding the stock

Parameterstickerrequired

get_options_chain

Options Chain

Get options chain data (calls and puts). Returns: Options chain with top calls and puts by volume

Parameterstickerrequiredexpiration

get_options_expirations

Options Expirations

Get all available options expiration dates. Returns: List of all available options expiration dates

Parameterstickerrequired

get_peer_comparison

Peer Comparison

Compare a stock with its peers on key metrics. Returns: Comparison table of key metrics across stocks

Parameterspeerstickerrequired

get_sec_filings

SEC Filings

Get recent SEC filings (10-K, 10-Q, 8-K, etc.). Returns: Recent SEC filings with types and dates

Parameterstickerrequired

get_sector_overview

Sector Overview

Get a sector overview: size, weight, largest companies, industries and sector ETFs. Returns: Sector summary with top companies and its industries

Parameterssector

get_sector_performance

Sector Performance

Get performance of major market sectors. Returns: Performance data for major S&P 500 sectors

Takes no parameters.

get_shares_history

Shares History

Get shares outstanding over time (dilution or buybacks). Returns: Shares outstanding at several points and the total change

Parametersyearstickerrequired

get_splits_calendar

Splits Calendar

Get upcoming stock splits. Returns: Table of upcoming splits with ratios

Parametersdayslimit

get_stock_news

Stock News

Get recent news articles about a stock. Returns: Recent news headlines, sources, and links

Parameterslimittickerrequired

get_stock_price

Stock Price

Get current stock price and key metrics for a ticker symbol. Returns: Formatted string with current price, market cap, P/E ratio, and other key metrics

Parameterstickerrequired

get_stock_quote

Stock Quote

Get detailed quote with bid/ask, day range, and trading info. Returns: Detailed quote information including bid/ask spreads and intraday trading data

Parameterstickerrequired

get_stock_splits

Stock Splits

Get stock split history. Returns: Complete stock split history with dates and ratios

Parameterstickerrequired

get_ttm_financials

TTM Financials

Get trailing-twelve-month (TTM) income statement and cash flow. Returns: Key TTM lines: revenue, gross profit, operating income, net income, EBITDA, EPS, cash flows

Parameterstickerrequired

get_upcoming_earnings

Upcoming Earnings

Get the market-wide earnings calendar (which companies report in the next N days). Returns: Companies with report date, timing and EPS estimate

Parametersdayslimit

get_upgrades_downgrades

Upgrades and Downgrades

Get detailed analyst upgrades and downgrades history. Returns: Recent analyst rating changes including firm, action, and grade changes

Parameterslimittickerrequired

get_valuation_history

Valuation History

Get valuation measures now and for the last quarters (market cap, EV, P/E, PEG, P/S, P/B, EV/EBITDA). Returns: Table of valuation measures by quarter

Parameterstickerrequired

run_self_test

Self-Test

Run comprehensive self-test of the yfinance-ai tools (64 checks). This function is designed to be called by AI assistants to verify that all tools are working correctly. It tests each tool category, reports success/failure status, and shows sample data from each test. Returns: Comprehensive test report with pass/fail status and sample data for all tools

Parametersticker

search_ticker

Search Ticker

Search for ticker symbols by company name or keyword. Returns: List of matching tickers

Parametersqueryrequired

validate_ticker

Validate Ticker

Validate if a ticker symbol exists and is tradeable. Returns: Validation result with ticker details if valid

Parameterstickerrequired

Version history

1
  1. v5.0.5LatestOct 21, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Finance integrations