yfinance-ai MCP server
A read-only Yahoo Finance data server exposing 68 tools for stocks, ETFs, funds, crypto, forex and commodities — quotes, financials, analysts, holders, options, market-wide data and calendars.
Quotes & history: current price, detailed quote, fast info, historical data/price-on-date, bulk multi-ticker downloads
Company: business info, overview, officers, ISIN
Financials: income statement, balance sheet, cash flow, TTM figures, key ratios, valuation history, one-page summary, share count history
Earnings & estimates: earnings dates/history/calendar, analyst estimates, growth estimates, EPS trend and revisions
Analysts: recommendations, price targets, upgrades/downgrades
Holders & insiders: institutional, major and mutual fund holders, insider transactions/purchases/roster
Dividends & corporate actions: dividends, splits, combined corporate actions, capital gains
Options: expiration dates and full options chain (calls/puts)
Market-wide: market status/summary by region, indices, movers, trending tickers, sector performance, sector and industry overviews
Calendars: upcoming earnings, IPOs, economic events, stock splits
Funds & ETFs: fund overview, top holdings, sector weights
Crypto, forex & commodities: prices and FX rates
Comparison: compare stocks, peer comparison, historical performance comparison, full complete analysis
News & filings: stock news, SEC filings
Utility: ticker search/validation, API status, 64-check self-test
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., "@yfinance-ai MCP server compare AAPL, MSFT and GOOGL on valuation and margins"
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.
yfinance-ai MCP server
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 in | Install | Repo |
Claude, Cursor, VS Code, LangChain, Google ADK, Strands Agents and other MCP clients |
| |
ClawHub skill for OpenClaw 🚀 Thousands of downloads |
| |
OpenWebUI tool 🚀 Thousands of downloads | ||
Python |
|
Install
Needs uv. No API key.
Claude Code:
claude mcp add yfinance-ai -- uvx yfinance-ai@latestVS Code:
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:
{
"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.
Related MCP server: Yahoo Finance MCP Server
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
import asyncio
from langchain.agents import create_agent
from 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]"
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from 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
from mcp import stdio_client, StdioServerParameters
from strands import Agent
from 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
Tool | Parameters | Description |
|
| Get current stock price and key metrics for a ticker symbol |
|
| Get detailed quote with bid/ask, day range, and trading info |
|
| Get fast-access ticker information (lightweight, quick response) |
|
| Get historical price data for a stock |
|
| Get historical price for a specific date |
|
| Historical data for several tickers at once |
Company
Tool | Parameters | Description |
|
| Get detailed company information and business description |
|
| Company overview with context for every metric |
|
| Get company officers and key management |
|
| Get International Securities Identification Number (ISIN) for a ticker |
Financials
Tool | Parameters | Description |
|
| Get income statement data |
|
| Get balance sheet data |
|
| Get cash flow statement data |
|
| Get trailing-twelve-month (TTM) income statement and cash flow |
|
| Get key financial ratios and valuation metrics |
|
| Get valuation measures now and for the last quarters (market cap, EV, P/E, PEG, P/S, P/B, EV/EBITDA) |
|
| Get a comprehensive one-page financial summary of a stock |
|
| Get shares outstanding over time (dilution or buybacks) |
Earnings and estimates
Tool | Parameters | Description |
|
| Get upcoming and past earnings dates with estimates |
|
| Get historical earnings data with annual and quarterly figures |
|
| Get earnings calendar including next earnings date and dividend dates |
|
| Get analyst estimates for earnings, revenue, and EPS |
|
| Get analyst growth estimates |
|
| Get EPS (Earnings Per Share) trend data showing how estimates have changed |
|
| Get EPS revision data showing analyst estimate changes |
Analysts
Tool | Parameters | Description |
|
| Get analyst recommendations and ratings |
|
| Get detailed analyst price targets for a stock |
|
| Get detailed analyst upgrades and downgrades history |
Holders and insiders
Tool | Parameters | Description |
|
| Get major institutional holders and their ownership |
|
| Get major holders summary (institutions, insiders, public float) |
|
| Get mutual fund holders |
|
| Get recent insider trading activity |
|
| Get insider purchases only (filtered for buys) |
|
| Get insider roster (list of company insiders) |
Dividends and corporate actions
Tool | Parameters | Description |
|
| Get dividend payment history and current metrics |
|
| Get stock split history |
|
| Get all corporate actions (dividends + splits combined) |
|
| Get capital gains distributions (primarily for funds/ETFs) |
Options
Tool | Parameters | Description |
|
| Get options chain data (calls and puts) |
|
| Get all available options expiration dates |
Market-wide
Tool | Parameters | Description |
| Check if US stock markets are currently open | |
|
| Get a market overview for a region: open/closed status plus main indices, futures, bonds and FX |
| Get current prices for major market indices | |
|
| Get today's market movers from Yahoo Finance screeners |
|
| Get today's most active (trending) US tickers |
| Get performance of major market sectors | |
|
| Get a sector overview: size, weight, largest companies, industries and sector ETFs |
|
| Get an industry overview: largest, best-performing and fastest-growing companies |
Calendars
Tool | Parameters | Description |
|
| Get the market-wide earnings calendar (which companies report in the next N days) |
|
| Get upcoming IPOs (exchange, expected date, price range, shares) |
|
| Get upcoming economic events (CPI, jobs, GDP, rate decisions) with expected and prior values |
|
| Get upcoming stock splits |
Funds and ETFs
Tool | Parameters | Description |
|
| Get overview data for an ETF or mutual fund |
|
| Get top holdings for an ETF or mutual fund |
|
| Get sector allocation/weights for an ETF or mutual fund |
Crypto, forex and commodities
Tool | Parameters | Description |
|
| Get cryptocurrency price and market data |
|
| Get foreign exchange (forex) rate for a currency pair |
|
| Get commodity/futures price data |
Compare
Tool | Parameters | Description |
|
| Compare key metrics across multiple stocks |
|
| Compare a stock with its peers on key metrics |
|
| Compare historical price performance of multiple stocks |
|
| Complete analysis of a stock, calling every relevant tool |
News and filings
Tool | Parameters | Description |
|
| Get recent news articles about a stock |
|
| Get recent SEC filings (10-K, 10-Q, 8-K, etc.) |
Utility
Tool | Parameters | Description |
|
| Search for ticker symbols by company name or keyword |
|
| Validate if a ticker symbol exists and is tradeable |
| Get API status and usage information | |
|
| 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.
Available Tools
68 toolscompare_stocksBRead-onlyIdempotent
Compare key metrics across multiple stocks.
Args: tickers: Comma-separated list of ticker symbols (e.g., 'AAPL,MSFT,GOOGL')
Returns: Comparison table of price, market cap, P/E, dividend yield, and returns
Inputs: tickers (required). Returns: result
download_multiple_tickersBRead-onlyIdempotent
Download historical data for multiple tickers at once (bulk operation).
Args: tickers: Space or comma-separated ticker symbols (e.g., 'AAPL MSFT GOOGL') period: Time period (default: 1mo) interval: Data interval (default: 1d)
Returns: Summary of downloaded data for all tickers
Inputs: tickers (required), period, interval. Returns: result
get_analyst_estimatesBRead-onlyIdempotent
Get analyst estimates for earnings, revenue, and EPS.
Args: ticker: Stock ticker symbol
Returns: Comprehensive analyst estimates and forecasts
Inputs: ticker (required). Returns: result
get_analyst_price_targetsBRead-onlyIdempotent
Get detailed analyst price targets for a stock.
Args: ticker: Stock ticker symbol
Returns: Comprehensive price target data including current, low, mean, median, high targets and the number of analysts covering the stock
Inputs: ticker (required). Returns: result
get_analyst_recommendationsBRead-onlyIdempotent
Get analyst recommendations and ratings.
Args: ticker: Stock ticker symbol
Returns: Analyst buy/hold/sell recommendations, consensus, and recent upgrades/downgrades
Inputs: ticker (required). Returns: result
get_api_statusBRead-onlyIdempotent
Get API status and usage information.
Returns: Current API usage statistics and configuration
Inputs: no named parameters. Returns: result
get_balance_sheetBRead-onlyIdempotent
Get balance sheet data.
Args: ticker: Stock ticker symbol period: 'annual' or 'quarterly'
Returns: Balance sheet with assets, liabilities, and equity
Inputs: ticker (required), period. Returns: result
get_capital_gainsARead-onlyIdempotent
Get capital gains distributions (primarily for funds/ETFs).
Args: ticker: Ticker symbol (typically ETF or mutual fund)
Returns: Capital gains distribution history
Inputs: ticker (required). Returns: result
get_cash_flowARead-onlyIdempotent
Get cash flow statement data.
Args: ticker: Stock ticker symbol period: 'annual' or 'quarterly'
Returns: Cash flow statement with operating, investing, and financing activities
Inputs: ticker (required), period. Returns: result
get_commodity_priceARead-onlyIdempotent
Get commodity/futures price data.
Args: commodity: Commodity name or ticker (e.g., 'gold', 'oil', 'crude oil', 'GC=F', 'CL=F')
Returns: Current price, day change, and key market data
Inputs: commodity (required). Returns: result
get_company_infoBRead-onlyIdempotent
Get detailed company information and business description.
Args: ticker: Stock ticker symbol
Returns: Company overview including sector, industry, employees, website, and business summary
Inputs: ticker (required). Returns: result
get_company_officersBRead-onlyIdempotent
Get company officers and key management.
Args: ticker: Stock ticker symbol
Returns: List of company officers with titles and compensation
Inputs: ticker (required). Returns: result
get_company_overviewBRead-onlyIdempotent
Get a beautiful, insightful company overview with context for every metric. Perfect for quick overviews and basic questions about a company.
Args: ticker: Stock ticker symbol (e.g., 'AAPL', 'MSFT')
Returns: Beautifully formatted company overview with insights and context
Inputs: ticker (required). Returns: result
get_complete_analysisARead-onlyIdempotent
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.
Args: ticker: Stock ticker symbol (e.g., 'AAPL', 'MSFT') peers: Optional comma-separated peer tickers for comparison (e.g., 'MSFT,GOOGL,META') AI should provide contextually relevant peers based on the conversation.
Returns: Comprehensive analysis with results from all applicable functions
Inputs: ticker (required), peers. Returns: result
get_corporate_actionsARead-onlyIdempotent
Get all corporate actions (dividends + splits combined).
Args: ticker: Stock ticker symbol
Returns: Combined history of dividends and stock splits
Inputs: ticker (required). Returns: result
get_crypto_priceARead-onlyIdempotent
Get cryptocurrency price and market data.
Args: symbol: Crypto symbol (e.g., 'BTC', 'ETH', 'bitcoin', 'ethereum', 'BTC-USD')
Returns: Current price, 24h change, market cap, volume, and key metrics
Inputs: symbol (required). Returns: result
get_dividendsARead-onlyIdempotent
Get dividend payment history and current metrics.
Args: ticker: Stock ticker symbol period: Time period for dividend history (1y, 5y, 10y, max)
Returns: Dividend history and current dividend metrics
Inputs: ticker (required), period. Returns: result
get_earnings_calendarBRead-onlyIdempotent
Get earnings calendar including next earnings date and dividend dates.
Args: ticker: Stock ticker symbol
Returns: Upcoming earnings dates, ex-dividend dates, and dividend payment dates
Inputs: ticker (required). Returns: result
get_earnings_datesCRead-onlyIdempotent
Get upcoming and past earnings dates with estimates.
Args: ticker: Stock ticker symbol
Returns: Earnings calendar with dates, estimates, and actual results
Inputs: ticker (required). Returns: result
get_earnings_historyBRead-onlyIdempotent
Get historical earnings data with annual and quarterly figures.
Args: ticker: Stock ticker symbol
Returns: Historical earnings by year and quarter
Inputs: ticker (required). Returns: result
get_economic_calendarARead-onlyIdempotent
Get upcoming economic events (CPI, jobs, GDP, rate decisions) with expected and prior values.
Args: days: Look-ahead window in days (default 7) limit: Max events (default 30)
Returns: Table of economic events by region and time
Inputs: days, limit. Returns: result
get_eps_revisionsCRead-onlyIdempotent
Get EPS revision data showing analyst estimate changes.
Args: ticker: Stock ticker symbol
Returns: EPS revisions showing up/down estimate changes by analysts
Inputs: ticker (required). Returns: result
get_eps_trendBRead-onlyIdempotent
Get EPS (Earnings Per Share) trend data showing how estimates have changed.
Args: ticker: Stock ticker symbol
Returns: EPS trend data showing estimate changes over different time periods
Inputs: ticker (required). Returns: result
get_fast_infoARead-onlyIdempotent
Get fast-access ticker information (lightweight, quick response).
Args: ticker: Stock ticker symbol
Returns: Quick summary with most recent price, market cap, and basic metrics
Example: Useful for quick price checks without full info loading.
Inputs: ticker (required). Returns: result
get_financial_summaryCRead-onlyIdempotent
Get a comprehensive one-page financial summary of a stock.
Args: ticker: Stock ticker symbol
Returns: Comprehensive summary including price, valuation, financials, and analyst data
Inputs: ticker (required). Returns: result
get_forex_rateARead-onlyIdempotent
Get foreign exchange (forex) rate for a currency pair.
Args: pair: Currency pair (e.g., 'EURUSD', 'EUR/USD', 'eurusd', 'GBPUSD=X')
Returns: Current exchange rate, bid/ask, day range, and recent changes
Inputs: pair (required). Returns: result
get_fund_holdingsARead-onlyIdempotent
Get top holdings for an ETF or mutual fund.
Args: ticker: Fund ticker symbol (e.g., 'VOO', 'SPY', 'QQQ') limit: Maximum number of holdings to return (default 25)
Returns: List of top holdings with weights and values
Inputs: ticker (required), limit. Returns: result
get_fund_overviewARead-onlyIdempotent
Get overview data for an ETF or mutual fund.
Args: ticker: Fund ticker symbol (e.g., 'VOO', 'SPY', 'QQQ', 'ARKK')
Returns: Fund category, family, total assets, expense ratio, and other key metrics
Inputs: ticker (required). Returns: result
get_fund_sector_weightsBRead-onlyIdempotent
Get sector allocation/weights for an ETF or mutual fund.
Args: ticker: Fund ticker symbol (e.g., 'VOO', 'SPY', 'QQQ')
Returns: Sector allocation percentages for the fund
Inputs: ticker (required). Returns: result
get_growth_estimatesBRead-onlyIdempotent
Get analyst growth estimates.
Args: ticker: Stock ticker symbol
Returns: Growth rate estimates for various periods
Inputs: ticker (required). Returns: result
get_historical_comparisonBRead-onlyIdempotent
Compare historical price performance of multiple stocks.
Args: tickers: Comma or space-separated ticker symbols (e.g., 'AAPL,MSFT,GOOGL') period: Time period for comparison (default: 1y)
Returns: Performance comparison showing % returns for each ticker
Inputs: tickers (required), period. Returns: result
get_historical_dataARead-onlyIdempotent
Get historical price data for a stock.
Args: ticker: Stock ticker symbol period: Time period - valid values: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max interval: Data interval - valid values: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo
Returns: Historical price data summary with statistics and returns
Example: >>> await get_historical_data("AAPL", period="6mo", interval="1d")
Inputs: ticker (required), period, interval. Returns: result
get_historical_price_on_dateARead-onlyIdempotent
Get historical price for a specific date.
Args: ticker: Stock ticker symbol date: Date in YYYY-MM-DD format (e.g., "2024-01-15")
Returns: Price on that date (or closest trading day)
Example: >>> await get_historical_price_on_date("AAPL", "2024-01-15")
Inputs: date (required), ticker (required). Returns: result
get_income_statementBRead-onlyIdempotent
Get income statement data.
Args: ticker: Stock ticker symbol period: 'annual', 'quarterly', or 'ttm' (trailing twelve months)
Returns: Income statement with revenue, expenses, and net income
Inputs: ticker (required), period. Returns: result
get_industry_overviewARead-onlyIdempotent
Get an industry overview: largest, best-performing and fastest-growing companies.
Args: industry: Industry key, e.g. semiconductors, software-infrastructure, biotechnology, banks-regional, oil-gas-integrated (see get_sector_overview for all keys)
Returns: Industry summary with top companies by size, YTD performance and growth
Inputs: industry. Returns: result
get_insider_purchasesARead-onlyIdempotent
Get insider purchases only (filtered for buys).
Args: ticker: Stock ticker symbol
Returns: Recent insider purchase transactions
Inputs: ticker (required). Returns: result
get_insider_roster_holdersBRead-onlyIdempotent
Get insider roster (list of company insiders).
Args: ticker: Stock ticker symbol
Returns: List of company insiders and their positions
Inputs: ticker (required). Returns: result
get_insider_transactionsBRead-onlyIdempotent
Get recent insider trading activity.
Args: ticker: Stock ticker symbol
Returns: Recent insider buy/sell transactions
Inputs: ticker (required). Returns: result
get_institutional_holdersBRead-onlyIdempotent
Get major institutional holders and their ownership.
Args: ticker: Stock ticker symbol
Returns: List of institutional holders with shares owned and percentage ownership
Inputs: ticker (required). Returns: result
get_ipo_calendarBRead-onlyIdempotent
Get upcoming IPOs (exchange, expected date, price range, shares).
Args: days: Look-ahead window in days (default 14) limit: Max IPOs (default 25)
Returns: Table of upcoming IPOs
Inputs: days, limit. Returns: result
get_isinCRead-onlyIdempotent
Get International Securities Identification Number (ISIN) for a ticker.
Args: ticker: Stock ticker symbol
Returns: ISIN code and related identification information
Inputs: ticker (required). Returns: result
get_key_ratiosBRead-onlyIdempotent
Get key financial ratios and valuation metrics.
Args: ticker: Stock ticker symbol
Returns: Comprehensive ratios including P/E, P/B, ROE, ROA, profit margins, debt ratios
Inputs: ticker (required). Returns: result
get_major_holdersBRead-onlyIdempotent
Get major holders summary (institutions, insiders, public float).
Args: ticker: Stock ticker symbol
Returns: Summary of insider vs institutional ownership percentages
Inputs: ticker (required). Returns: result
get_market_indicesBRead-onlyIdempotent
Get current prices for major market indices.
Returns: Current values and changes for S&P 500, Nasdaq, Dow Jones, and other major indices
Inputs: no named parameters. Returns: result
get_market_moversARead-onlyIdempotent
Get today's market movers from Yahoo Finance screeners.
Args: category: day_gainers, day_losers, most_actives, most_shorted_stocks, small_cap_gainers, undervalued_large_caps, undervalued_growth_stocks, growth_technology_stocks, aggressive_small_caps, top_etfs_us, top_performing_etfs, technology_etfs, bond_etfs, top_mutual_funds count: Number of results (1-50, default 10)
Returns: Table of tickers with price, change %, volume and market cap
Inputs: count, category. Returns: result
get_market_statusARead-onlyIdempotent
Check if US stock markets are currently open.
Returns: Market status (open/closed), current time, and market hours
Inputs: no named parameters. Returns: result
get_market_summaryARead-onlyIdempotent
Get a market overview for a region: open/closed status plus main indices, futures, bonds and FX.
Args: region: US, GB, DE, FR, JP, HK, IN, CA, AU, BR, EUROPE, ASIA (default US)
Returns: Market status and a table of the region's headline instruments
Inputs: region. Returns: result
get_mutualfund_holdersBRead-onlyIdempotent
Get mutual fund holders.
Args: ticker: Stock ticker symbol
Returns: List of mutual funds holding the stock
Inputs: ticker (required). Returns: result
get_options_chainARead-onlyIdempotent
Get options chain data (calls and puts).
Args: ticker: Stock ticker symbol expiration: Specific expiration date (YYYY-MM-DD) or empty for nearest
Returns: Options chain with top calls and puts by volume
Inputs: ticker (required), expiration. Returns: result
get_options_expirationsBRead-onlyIdempotent
Get all available options expiration dates.
Args: ticker: Stock ticker symbol
Returns: List of all available options expiration dates
Inputs: ticker (required). Returns: result
get_peer_comparisonBRead-onlyIdempotent
Compare a stock with its peers on key metrics.
Args: ticker: Primary stock ticker symbol peers: Optional comma-separated peer tickers (if not provided, uses sector peers)
Returns: Comparison table of key metrics across stocks
Inputs: ticker (required), peers. Returns: result
get_sec_filingsCRead-onlyIdempotent
Get recent SEC filings (10-K, 10-Q, 8-K, etc.).
Args: ticker: Stock ticker symbol
Returns: Recent SEC filings with types and dates
Inputs: ticker (required). Returns: result
get_sector_overviewARead-onlyIdempotent
Get a sector overview: size, weight, largest companies, industries and sector ETFs.
Args: sector: basic-materials, communication-services, consumer-cyclical, consumer-defensive, energy, financial-services, healthcare, industrials, real-estate, technology, utilities
Returns: Sector summary with top companies and its industries
Inputs: sector. Returns: result
get_sector_performanceBRead-onlyIdempotent
Get performance of major market sectors.
Returns: Performance data for major S&P 500 sectors
Inputs: no named parameters. Returns: result
get_splits_calendarBRead-onlyIdempotent
Get upcoming stock splits.
Args: days: Look-ahead window in days (default 14) limit: Max splits (default 25)
Returns: Table of upcoming splits with ratios
Inputs: days, limit. Returns: result
get_stock_newsARead-onlyIdempotent
Get recent news articles about a stock.
Args: ticker: Stock ticker symbol limit: Maximum number of news articles to return (default 10)
Returns: Recent news headlines, sources, and links
Inputs: ticker (required), limit. Returns: result
get_stock_priceBRead-onlyIdempotent
Get current stock price and key metrics for a ticker symbol.
Args: ticker: Stock ticker symbol (e.g., 'AAPL', 'TSLA', 'SPY')
Returns: Formatted string with current price, market cap, P/E ratio, and other key metrics
Example: >>> await get_stock_price("AAPL") AAPL - Apple Inc. Current Price: $175.43 Market Cap: $2.75T ...
Inputs: ticker (required). Returns: result
get_stock_quoteBRead-onlyIdempotent
Get detailed quote with bid/ask, day range, and trading info.
Args: ticker: Stock ticker symbol
Returns: Detailed quote information including bid/ask spreads and intraday trading data
Inputs: ticker (required). Returns: result
get_stock_splitsBRead-onlyIdempotent
Get stock split history.
Args: ticker: Stock ticker symbol
Returns: Complete stock split history with dates and ratios
Inputs: ticker (required). Returns: result
get_trending_tickersBRead-onlyIdempotent
Get today's most active (trending) US tickers.
Args: count: Number of trending tickers to return
Returns: List of trending tickers with basic info
Inputs: count. Returns: result
get_ttm_financialsBRead-onlyIdempotent
Get trailing-twelve-month (TTM) income statement and cash flow.
Args: ticker: Stock ticker symbol
Returns: Key TTM lines: revenue, gross profit, operating income, net income, EBITDA, EPS, cash flows
Inputs: ticker (required). Returns: result
get_upcoming_earningsARead-onlyIdempotent
Get the market-wide earnings calendar (which companies report in the next N days).
Args: days: Look-ahead window in days (default 7) limit: Max companies (default 25)
Returns: Companies with report date, timing and EPS estimate
Inputs: days, limit. Returns: result
get_upgrades_downgradesBRead-onlyIdempotent
Get detailed analyst upgrades and downgrades history.
Args: ticker: Stock ticker symbol limit: Maximum number of rating changes to return (default 20)
Returns: Recent analyst rating changes including firm, action, and grade changes
Inputs: ticker (required), limit. Returns: result
get_valuation_historyBRead-onlyIdempotent
Get valuation measures now and for the last quarters (market cap, EV, P/E, PEG, P/S, P/B, EV/EBITDA).
Args: ticker: Stock ticker symbol
Returns: Table of valuation measures by quarter
Inputs: ticker (required). Returns: result
run_self_testARead-onlyIdempotent
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.
Args: ticker: Ticker symbol to use for testing (default: SPY - reliable ETF with full data)
Returns: Comprehensive test report with pass/fail status and sample data for all tools
Example AI Prompt: "Run self-test on yfinance tools" "Test all financial data functions" "Verify yfinance-ai is working"
Inputs: ticker. Returns: result
search_tickerBRead-onlyIdempotent
Search for ticker symbols by company name or keyword.
Args: query: Company name or keyword to search
Returns: List of matching tickers
Inputs: query (required). Returns: result
validate_tickerCRead-onlyIdempotent
Validate if a ticker symbol exists and is tradeable.
Args: ticker: Ticker symbol to validate
Returns: Validation result with ticker details if valid
Inputs: ticker (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 68 tools
Many tools overlap heavily: get_stock_price/get_stock_quote/get_fast_info/get_company_overview/get_financial_summary/get_complete_analysis all serve quick company/price overviews, while compare_stocks/get_peer_comparison/get_historical_comparison and several earnings/analyst/holder tools have close boundaries. Descriptions help, but an agent can easily misselect among similar read-only financial-data endpoints.
The set is overwhelmingly consistent with get_* snake_case names for data retrieval. A few outliers such as compare_stocks, download_multiple_tickers, search_ticker, validate_ticker, and run_self_test are minor deviations but still readable.
With 68 tools, the surface is far beyond a well-scoped set and includes many redundant overview/quote/analyst/holder variants. The count is an extreme mismatch for practical tool selection despite the broad financial domain.
Coverage is extensive across quotes, fundamentals, analysts, earnings, funds, options, macro calendars, forex, crypto, commodities, and SEC filings. Some niche areas are missing or only indirectly covered, but the read-only market-data surface is broadly complete.
Maintenance
Related MCP Connectors
Yahoo Finance for AI agents: quotes, price history, options with Greeks, financials, news, movers.
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
Yahoo Finance stock quotes and multi-ticker comparison as agent tools.
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time financial data from Yahoo Finance to Large Language Models through the Model Context Protocol, enabling AI models to access stock prices, historical data, and company information.1MIT
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive financial data from Yahoo Finance, enabling retrieval of stock prices, company information, financial statements, options data, analyst recommendations, and market news through natural language queries.MIT
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive access to Yahoo Finance data, including historical stock prices, financial statements, and analyst recommendations. It is designed for deployment on Cloudflare Workers and supports multiple transport methods to integrate market data into LLM workflows.94 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access real-time stock, crypto, and market index data from Yahoo Finance, supporting queries for prices, history, company info, and comparisons.MIT