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
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-serverclaude_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"] } } }json { "key": "finance", "command": "uvx", "args": ["finance-mcp-server"] } Using Docker: json { "key": "finance-server", "command": "docker", "args": ["run", "-i", "--rm", "finance-server"] }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).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."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?"
Part of MCP Servers