yfinance MCP Server

The yfinance MCP Server acts as a real-time financial bridge for AI assistants, allowing them to look up current prices and news for stocks and cryptocurrencies instantly. Instead of an LLM relying on outdated training data or guessing market trends, this tool enables it to pull live data for specific tickers like "AAPL" or "BTC-USD." It is designed to make AI interactions much more practical for anyone tracking their portfolio or staying updated on market-moving headlines. Under the hood, the server provides two primary functions: `get_price_tool` and `get_news_tool`. These tools allow for granular requests, such as retrieving price data over specific periods—ranging from a single day to several months—and fetching a customized number of recent news articles. By leveraging the Model Context Protocol, the server standardizes how this financial data is delivered, ensuring the AI can accurately interpret market fluctuations and news sentiment without the risks of hallucination. For developers and power users, this MCP server is highly versatile and easy to deploy using Smithery, Docker, or the uv package manager. It integrates seamlessly into environments like Claude Desktop, giving an LLM the direct capability to act as a financial analyst. By providing a structured way to feed high-fidelity Yahoo Finance data into a model's context window, it serves as a robust foundation for building specialized agents capable of technical analysis, market reporting, or real-time investment research.

Category: Finance, Crypto & Payments

Tags: cryptocurrency, financial-analysis, market data, stocks, yahoo-finance

Visit yfinance MCP Server

How to install and configure yfinance MCP Server

1. Installation Via Smithery (Automatic for Claude Desktop) bash npx -y @smithery/cli install @Otman404/finance-mcp-server --client claude Using uv (Local Development) bash # Install the package locally uv pip install -e . # Run the server finance-mcp-server Using Docker bash # Build the container docker build -t finance-server . # Run the container docker run -it finance-server

2. Configuration

For Claude Desktop Add one of the following configurations to your claude_desktop_config.json: Using uvx: json "mcpServers": { "finance": { "command": "uvx", "args": ["finance-mcp-server"] } } Using Docker: json { "mcpServers": { "finance": { "command": "docker", "args": ["run", "-i", "--rm", "finance-server"] } } }

For 5ire Using uvx: json { "key": "finance", "command": "uvx", "args": ["finance-mcp-server"] } Using Docker: json { "key": "finance-server", "command": "docker", "args": ["run", "-i", "--rm", "finance-server"] }

3. Available Tools * get_price_tool: Get the price of a stock/cryptocurrency ticker. * ticker (string, Required): Ticker name or alias (e.g., "BTC-USD", "AAPL"). * period (string, Optional): Time period (e.g., "1d", "5d", "1mo"). Defaults to "1d". * get_news_tool: Get the news of a stock/cryptocurrency ticker. * ticker (string, Required): Ticker name or alias. * count (string, Optional): Number of articles to retrieve (default: 5).

4. Example Prompts (No specific text-based example prompts were provided in the content, though the server supports queries regarding current stock/crypto prices and news articles for specific tickers.)

What you can do with yfinance MCP Server

Use Case 1: Personalized Morning Market Briefings Problem: Investors and traders often spend significant time visiting multiple financial news sites and apps to check the status of their specific portfolio holdings every morning. Solution: This MCP allows an LLM to act as a personalized financial assistant. It can automatically fetch the latest prices and news for a specific list of tickers to generate a concise, tailored summary of how the user's "watchlist" is performing. Example: A user asks, "Check the current prices and the 3 most recent news articles for AAPL, MSFT, and BTC-USD. Summarize anything that looks like a major market mover for me."

Use Case 2: Investigating Sudden Market Volatility Problem: When a stock or cryptocurrency experiences a sudden price spike or crash, finding the "why" usually requires manual searching through news feeds and matching timestamps. Solution: By combining the get_price_tool and get_news_tool, an LLM can identify recent price changes and immediately pull the latest headlines to find the catalyst behind the movement. Example: A user notices a notification about a drop and asks, "NVIDIA (NVDA) just dropped 4%. Use the news tool to find out if there was an earnings report, a legal filing, or a macro-economic event in the last few hours that explains this."

Use Case 3: Cryptocurrency Sentiment Analysis Problem: The crypto market is highly driven by sentiment and 24

7 news cycles, making it difficult for traders to stay updated on the relationship between price action and public announcements. Solution: The LLM can pull the latest price trends (e.g., over a 5-day or 1-month period) alongside the most recent 10 news articles to provide a sentiment analysis, helping the user understand if a price trend is supported by news or is purely speculative. Example: "Get the 5-day price trend for Solana (SOL-USD) and the latest 5 news articles. Based on the news, is the current price movement tied to ecosystem growth or just market volatility?"

Use Case 4: Comparative Asset Research Problem: When deciding between two similar investments (like two tech giants or two Layer-1 blockchains), users have to manually toggle between tabs to compare their recent performance and news cycles. Solution: The MCP enables the LLM to pull data for multiple tickers simultaneously. The LLM can then perform a side-by-side comparison of their price performance and the "vibe" of their recent news coverage. Example: "Compare the 1-month price performance…

Key facts

  • Open Source
  • Finance, Crypto & Payments, Web Search & Research
  • cryptocurrency, financial-analysis, market data, stocks, yahoo-finance

Part of MCP Servers

Related MCP servers

  • MCP NPX Fetch — Fetch and transform web content into various formats like HTML, JSON, Markdown, or Plain Text.
  • MCP Mempool — Access Bitcoin network data from mempool.space's API for AI agents and applications.
  • MCP Naver News — Search for news articles using the Naver News API. Requires Naver News API credentials.
  • MCP NIF.PT — Query and analyze Portuguese companies using the NIF.PT public API. Supports search by NIF, company name, and city.
  • MCP Options Order Flow Server — A high-performance MCP server for comprehensive options order flow analysis.
  • MCP Open Library — A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book and…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories