Yahoo Finance MCP Server
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., "@Yahoo Finance MCP Server Get latest news for TSLA"
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 Finance MCP Server
A simple MCP server for Yahoo Finance using yfinance. This server provides a set of tools to fetch stock data, news, and other financial information.
Tools
get_ticker_info
Retrieve stock data including company info, financials, trading metrics and governance data.
Inputs:
symbol(string): The stock symbol.
get_ticker_news
Fetches recent news articles related to a specific stock symbol with title, content, and source details.
Inputs:
symbol(string): The stock symbol.
search
Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles.
Inputs:
query(string): The search query (ticker symbol or company name).search_type(string): Type of search results to retrieve (options: "all", "quotes", "news").
get_top
Get top entities (ETFs, mutual funds, companies, growth companies, or performing companies) in a sector.
Inputs:
sector(string): The sector to get.top_type(string): Type of top companies to retrieve (options: "top_etfs", "top_mutual_funds", "top_companies", "top_growth_companies", "top_performing_companies").top_n(number, optional): Number of top entities to retrieve (default 10).
get_price_history
Fetch historical price data for a given stock symbol over a specified period and interval. Can return data as a markdown table or generate professional financial charts using mplfinance, including candlestick charts with volume bars, VWAP overlays, and volume profile analysis.
Inputs:
symbol(string): The stock symbol.period(string, optional): Time period to retrieve data for (e.g. '1d', '1mo', '1y'). Default is '1mo'.interval(string, optional): Data interval frequency (e.g. '1d', '1h', '1m'). Default is '1d'.chart_type(string, optional): Type of chart to generate. If not specified, returns price data as markdown table. Options:"price_volume": Candlestick chart with volume bars
"vwap": Volume Weighted Average Price chart with VWAP overlay
"volume_profile": Candlestick chart with volume profile showing volume distribution by price level (displayed as a histogram on the right side)
Output:
If
chart_typeis not specified: Returns historical price data as a markdown tableIf
chart_typeis specified: Returns a base64-encoded WebP image for efficient token usage
Related MCP server: Yahoo Finance MCP Server
Usage
You can use this MCP server via uv (Python package installer), Docker, or local development.
Via uv
Add the following configuration to your MCP server configuration file:
{
"mcpServers": {
"yfmcp": {
"command": "uvx",
"args": ["yfmcp@latest"]
}
}
}Via Docker
Add the following configuration to your MCP server configuration file:
{
"mcpServers": {
"yfmcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]
}
}
}Local Development
For local development, add the following configuration to your MCP server configuration file:
{
"mcpServers": {
"yfmcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/yfinance-mcp",
"yfmcp"
]
}
}
}Replace /path/to/yfinance-mcp with the actual path to your local repository.
Demo Chatbot
This repository includes a demo chatbot built with Chainlit that provides a conversational interface to the Yahoo Finance MCP server.
Features
Interactive chat interface for querying stock information
Automatic display of financial charts and data visualizations
Support for both OpenAI and LiteLLM backends
Tool calling integration with the MCP server
Setup
Install demo dependencies:
uv sync --extra devConfigure environment variables (create a
.envfile):
# For OpenAI
OPENAI_API_KEY=your_openai_api_key
DEFAULT_MODEL=gpt-4.1
# For LiteLLM (alternative)
LITELLM_API_KEY=your_litellm_api_key
LITELLM_BASE_URL=your_litellm_base_url
DEFAULT_MODEL=gpt-4.1Run the demo:
uv run chainlit run demo.pyThe chatbot will be available at http://localhost:8000.
Example Queries
"Get AAPL stock information"
"Show me recent TSLA news"
"Display NVDA price history for the past month"
"Show me a candlestick chart for MSFT over the last 3 months"
Available Tools
5 toolsget_price_historyA
Fetch historical price data for a given stock symbol over a specified period and interval.
Inputs: symbol (required), period, interval, chart_type. Returns: result
get_ticker_infoA
Retrieve stock data including company info, financials, trading metrics and governance data.
Inputs: symbol (required). Returns: result
get_ticker_newsA
Fetches recent news articles related to a specific stock symbol with title, content, and source details.
Inputs: symbol (required). Returns: result
get_topB
Get top entities (ETFs, mutual funds, companies, growth companies, or performing companies) in a sector.
Inputs: sector (required), top_type (required), top_n. Returns: result
searchC
Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles.
Inputs: query (required), search_type (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 5 tools
Tools are mostly distinct: price history, news, company info, and top lists each have clear purposes. Some ambiguity exists because 'search' also returns news articles, which overlaps with 'get_ticker_news'.
Most tools follow a consistent get_* pattern with clear object names like get_ticker_info and get_price_history. The outlier is 'search', which lacks the get_ prefix and is more generic.
Five tools is an appropriate, focused scope for a Yahoo Finance server covering quotes, news, historical data, search, and top lists. Each tool adds clear value without unnecessary bloat.
The server covers core Yahoo Finance workflows: retrieving quotes and fundamentals, news, price history, and sector/entity rankings. Minor gaps like financial statement detail or options data exist, but the surface is sufficient for common use cases.
Maintenance
Related MCP Connectors
Yahoo Finance stock quotes and multi-ticker comparison as agent tools.
Finnhub MCP — wraps Finnhub Stock API (finnhub.io)
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
Yahoo Finance for AI agents: quotes, price history, options with Greeks, financials, news, movers.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides financial data from Yahoo Finance via MCP, enabling AI agents to access real-time stock info, historical prices, financial statements, and market analysis.1014-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access Yahoo Finance data including stock information, news, price history, options, and earnings via MCP tools.53MIT
- 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
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to retrieve real-time US stock market data including prices, company info, financials, and news via MCP tools, using Yahoo Finance as the data source.MIT