What is Yahoo Finance MCP Server?
Yahoo Finance MCP Server is a simple server that utilizes the yfinance library to fetch stock data, news, and other financial information from Yahoo Finance.
How to use Yahoo Finance MCP Server?
To use the server, install the required package and configure your MCP server with the provided JSON configuration. You can run the server using commands like uvx
or docker
.
Key features of Yahoo Finance MCP Server?
- Retrieve detailed information about specific stock symbols.
- Fetch news articles related to stock tickers.
- Search for stock quotes and news articles using query strings.
- Get top ETFs, mutual funds, and companies in specific sectors.
- Analyze sentiment for stocks based on user-provided rationale.
Use cases of Yahoo Finance MCP Server?
- Investors can track stock performance and news updates.
- Financial analysts can retrieve and analyze data for market research.
- Developers can integrate financial data into applications using the server's API.
FAQ from Yahoo Finance MCP Server?
- What data can I retrieve using this server?
You can retrieve stock information, news articles, top ETFs, mutual funds, and perform sentiment analysis.
- Is there a limit on the number of results returned?
Yes, you can specify the maximum number of results for searches, with a default of 8.
- Is the server easy to set up?
Yes, the setup involves simple installation and configuration steps.
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).
Usage
You can use this MCP server either via uv (Python package installer) or Docker.
Via uv
- Install uv
- Add the following configuration to your MCP server configuration file:
{
"mcpServers": {
"yfmcp": {
"command": "uvx",
"args": ["yfmcp"]
}
}
}
Via Docker
Add the following configuration to your MCP server configuration file:
{
"mcpServers": {
"yfmcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]
}
}
}