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
  • https://github.com/Otman404/finance-mcp-server
  • Finance, Crypto & Payments, Web Search & Research
  • cryptocurrency, financial-analysis, market data, stocks, yahoo-finance

Part of MCP Servers

Related MCP servers

  • MCP NPX Fetch — MCP NPX Fetch is an MCP server that retrieves online resources and transforms web content into structured formats including HTML,…
  • MCP Mempool — MCP Mempool is an MCP server that exposes the mempool.space WebSocket and REST APIs to AI agents, LLM assistants, and…
  • MCP Naver News — MCP Naver News is an MCP server that connects AI assistants to the Naver News API, enabling automated search and…
  • MCP NIF.PT — MCP NIF.PT is an MCP server that connects LLM clients to the Portuguese NIF.PT public API to retrieve and analyze…
  • MCP Options Order Flow Server — MCP Options Order Flow Server is an MCP server that provides real-time options order flow data, institutional bias tracking, and…
  • MCP Open Library — MCP Open Library is an MCP server that connects AI assistants to the Open Library catalogue API to retrieve book,…

How do I install yfinance MCP Server?

You can install the server for Claude Desktop using Smithery by executing the command npx -y @smithery/cli install @Otman404/finance-mcp-server --client claude. You can also run it via uvx by adding the finance command directly into your MCP configuration file, or build and run the provided Docker container.

What can yfinance MCP Server do?

The server allows AI clients to fetch current and historical price data for stocks and cryptocurrencies through get_price_tool across custom time periods. It also features get_news_tool, which gathers a specified number of recent news articles for any given ticker symbol to help explain price movements.

Which MCP clients work with yfinance MCP Server?

The server works with any Model Context Protocol compliant client, with documented support for Claude Desktop and 5ire. You can configure it inside client settings files using uvx execution or through containerized Docker instances depending on your environment preference.

Is yfinance MCP Server open source?

Yes, yfinance MCP Server is open source and hosted on GitHub under the repository Otman404/finance-mcp-server. Developers can inspect the source code, contribute enhancements, or clone the project locally to build custom tools using Python and Docker.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories