yfinance-mcp
by narumiruna·★ 135·Score 49
Yahoo Finance MCP server providing stock data, financial statements, news, charts, and options data.
Overview
The yfinance-mcp server provides AI assistants with comprehensive access to Yahoo Finance data through the Model Context Protocol. It leverages the popular yfinance library to retrieve stock information, financial statements, historical data, news articles, and options data. The server offers multiple tools for different financial data needs, including ticker info retrieval, financial statement analysis, price history with chart generation, and options data access.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
When you need comprehensive financial market data integration with AI assistants, particularly for stock analysis, news retrieval, and technical chart generation.
When NOT to choose this
When you need real-time trading capabilities or data from financial sources beyond Yahoo Finance, as this server only provides read-only access to Yahoo data.
Tools this server exposes
9 tools extracted from the READMEyfinance_get_ticker_infosymbol: stringRetrieve comprehensive stock data including company info, financials, trading metrics, and governance data.
yfinance_get_ticker_newssymbol: stringFetch recent news articles and press releases for a specific stock.
yfinance_searchquery: string, search_type: stringSearch Yahoo Finance for stocks, ETFs, and news articles.
yfinance_get_topsector: string, top_type: string, top_n?: numberGet top-ranked financial entities within a market sector.
yfinance_get_price_historysymbol: string, period?: string, interval?: string, chart_type?: string, prepost?: booleanFetch historical price data and optionally generate technical analysis charts.
yfinance_get_financialssymbol: string, frequency?: stringFetch financial statements (income statement, balance sheet, and cash flow) with historical data.
yfinance_get_holderssymbol: string, max_rows?: numberFetch major holders, institutional holders, mutual fund holders, and insider data.
yfinance_get_option_datessymbol: stringFetch available option expiration dates for a stock.
yfinance_get_option_chainsymbol: string, expiration_date?: string, option_type?: stringFetch option chain data (calls and puts) for a stock with available strike prices.
Comparable tools
Installation
Installation
Via uv (recommended)
- [Install uv](https://docs.astral.sh/uv/getting-started/installation/)
- Add the following to your MCP client configuration:
{
"mcpServers": {
"yfmcp": {
"command": "uvx",
"args": ["yfmcp@latest"]
}
}
}Via Docker
{
"mcpServers": {
"yfmcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]
}
}
}From Source
- Clone the repository and install dependencies:
git clone https://github.com/narumiruna/yfinance-mcp.git
cd yfinance-mcp
uv sync- Add the following to your MCP client configuration:
{
"mcpServers": {
"yfmcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/yfinance-mcp",
"yfmcp"
]
}
}
}Replace /path/to/yfinance-mcp with the actual path to your cloned repository.
FAQ
- What financial data can be accessed through this MCP server?
- The server provides comprehensive financial data including stock information, financial statements (income, balance sheet, cash flow), company details, price history with technical charts, financial news, sector rankings, options data, and ownership information.
- Can I generate charts with this MCP server?
- Yes, the server can generate professional financial charts including candlestick charts with volume bars, VWAP overlays, and volume distribution charts. Charts are returned as Base64-encoded WebP images for efficient token usage.
Compare yfinance-mcp with
Last updated · Auto-generated from public README + GitHub signals.