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. - yfinancegettickerinfo - Retrieve stock data including company info, financials, trading metrics and governance data. - symbol (string): The stock symbol. - yfinancegettickernews - Fetches recent news articles related to a specific stock symbol with
Add this skill
npx mdskills install narumiruna/yfinance-mcpWell-documented financial data MCP server with clear tool descriptions and multiple deployment options
1# Yahoo Finance MCP Server23A simple MCP server for Yahoo Finance using [yfinance](https://github.com/ranaroussi/yfinance). This server provides a set of tools to fetch stock data, news, and other financial information.45<a href="https://glama.ai/mcp/servers/@narumiruna/yfinance-mcp">6 <img width="380" height="200" src="https://glama.ai/mcp/servers/@narumiruna/yfinance-mcp/badge" />7</a>89## Tools1011- **yfinance_get_ticker_info**1213 - Retrieve stock data including company info, financials, trading metrics and governance data.14 - Inputs:15 - `symbol` (string): The stock symbol.1617- **yfinance_get_ticker_news**1819 - Fetches recent news articles related to a specific stock symbol with title, content, and source details.20 - Inputs:21 - `symbol` (string): The stock symbol.2223- **yfinance_search**2425 - Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles.26 - Inputs:27 - `query` (string): The search query (ticker symbol or company name).28 - `search_type` (string): Type of search results to retrieve (options: "all", "quotes", "news").2930- **yfinance_get_top**3132 - Get top entities (ETFs, mutual funds, companies, growth companies, or performing companies) in a sector.33 - Inputs:34 - `sector` (string): The sector to get.35 - `top_type` (string): Type of top companies to retrieve (options: "top_etfs", "top_mutual_funds", "top_companies", "top_growth_companies", "top_performing_companies").36 - `top_n` (number, optional): Number of top entities to retrieve (default 10).3738- **yfinance_get_price_history**3940 - 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.41 - Inputs:42 - `symbol` (string): The stock symbol.43 - `period` (string, optional): Time period to retrieve data for (e.g. '1d', '1mo', '1y'). Default is '1mo'.44 - `interval` (string, optional): Data interval frequency (e.g. '1d', '1h', '1m'). Default is '1d'.45 - `chart_type` (string, optional): Type of chart to generate. If not specified, returns price data as markdown table. Options:46 - "price_volume": Candlestick chart with volume bars47 - "vwap": Volume Weighted Average Price chart with VWAP overlay48 - "volume_profile": Candlestick chart with volume profile showing volume distribution by price level (displayed as a histogram on the right side)49 - Output:50 - If `chart_type` is not specified: Returns historical price data as a markdown table51 - If `chart_type` is specified: Returns a base64-encoded WebP image for efficient token usage5253## Usage5455You can use this MCP server via uv (Python package installer), Docker, or local development.5657### Via uv58591. [Install uv](https://docs.astral.sh/uv/getting-started/installation/)602. Add the following configuration to your MCP server configuration file:6162```json63{64 "mcpServers": {65 "yfmcp": {66 "command": "uvx",67 "args": ["yfmcp@latest"]68 }69 }70}71```7273### Via Docker7475Add the following configuration to your MCP server configuration file:7677```json78{79 "mcpServers": {80 "yfmcp": {81 "command": "docker",82 "args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]83 }84 }85}86```8788### Local Development8990For local development, add the following configuration to your MCP server configuration file:9192```json93{94 "mcpServers": {95 "yfmcp": {96 "command": "uv",97 "args": [98 "run",99 "--directory",100 "/path/to/yfinance-mcp",101 "yfmcp"102 ]103 }104 }105}106```107108Replace `/path/to/yfinance-mcp` with the actual path to your local repository.109110## Demo Chatbot111112This repository includes a demo chatbot built with [Chainlit](https://github.com/Chainlit/chainlit) that provides a conversational interface to the Yahoo Finance MCP server.113114### Features115116- Interactive chat interface for querying stock information117- Automatic display of financial charts and data visualizations118- Support for both OpenAI and LiteLLM backends119- Tool calling integration with the MCP server120121### Setup1221231. Install demo dependencies:124125```bash126uv sync --extra dev127```1281292. Configure environment variables:130131```bash132# Recommended: start from the template133cp .env.example .env134135# For OpenAI136OPENAI_API_KEY=your_openai_api_key137DEFAULT_MODEL=gpt-4.1138139# For LiteLLM (alternative)140LITELLM_API_KEY=your_litellm_api_key141LITELLM_BASE_URL=your_litellm_base_url142DEFAULT_MODEL=gpt-4.1143```1441453. Run the demo:146147```bash148uv run chainlit run demo.py149```150151The chatbot will be available at `http://localhost:8000`.152153### Example Queries154155- "Get AAPL stock information"156- "Show me recent TSLA news"157- "Display NVDA price history for the past month"158- "Show me a candlestick chart for MSFT over the last 3 months"159
Full transparency — inspect the skill content before installing.