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
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.
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.
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.
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.