home / mcp / yahoo finance mcp server
Provides a Yahoo Finance MCP server with tools to fetch stock data, news, and price history via yfinance.
Configuration
View docs{
"mcpServers": {
"narumiruna-yfinance-mcp": {
"command": "uvx",
"args": [
"yfmcp@latest"
],
"env": {
"DEFAULT_MODEL": "gpt-4.1",
"OPENAI_API_KEY": "your_openai_api_key",
"LITELLM_API_KEY": "your_litellm_api_key",
"LITELLM_BASE_URL": "https://litellm.example.com"
}
}
}
}You can run a Yahoo Finance MCP Server that exposes practical tools to fetch stock data, news, and historical price information using yfinance. This server is useful for building chat interfaces, dashboards, or automation that needs current financial data and related articles.
You interact with the Yahoo Finance MCP Server through an MCP client. Use the provided tools to retrieve stock details, fetch recent news articles, search Yahoo Finance results, obtain top entities within a sector, or pull historical price history in various chart formats. The server returns structured data and, for price history charts, optionally visual charts that you can embed in your applications.
Choose an installation method that fits your environment: via uv (Python package installer), via Docker, or for local development. Each method provides an MCP configuration you add to your MCP setup.
{
"mcpServers": {
"yfmcp": {
"command": "uvx",
"args": ["yfmcp@latest"]
}
}
}{
"mcpServers": {
"yfmcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]
}
}
}{
"mcpServers": {
"yfmcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/yfinance-mcp",
"yfmcp"
]
}
}
}Ensure you have a compatible runtime for MCP configuration management. If you use uv, Docker, or local development, follow the setup steps that correspond to your choice and replace placeholders with your actual paths or keys where applicable.
You can mix and match installation methods depending on your environment. After starting the MCP server, you can begin querying stock data, company news, and historical price histories using the available tools.
Keep any API keys and access tokens secure. Do not expose your OPENAI_API_KEY or LiteLLM credentials in client-side code or public repositories. Use environment variables to inject secrets in your deployment environment.
- Retrieve stock information for AAPL - Get recent news about TSLA - Search for MSFT to return quotes and related articles - Fetch NVDA price history and display a candlestick chart with volume
Retrieve stock data including company info, financials, trading metrics and governance data. Inputs: symbol (string)
Fetches recent news articles related to a stock symbol with title, content, and source details. Inputs: symbol (string)
Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles. Inputs: query (string), search_type (string)
Get top entities in a sector. Inputs: sector (string), top_type (string), top_n (number, optional)
Fetch historical price data for a given stock symbol over a period and interval. Can return a markdown table or generate charts (price_volume, vwap, volume_profile) with optional base64 WebP output