The YFinance Trader MCP tool acts as a financial bridge, giving AI assistants like Claude the ability to check the stock market in real-time. In its simplest form, it allows a user to ask their AI about current stock prices, company backgrounds, or the latest trends in popular cryptocurrencies like Bitcoin. Instead of a user having to leave their conversation to manually look up a ticker symbol, the AI uses this tool to fetch the most up-to-date financial data instantly. Moving beyond basic price checks, the tool provides a deep well of corporate and market intelligence. It can retrieve comprehensive company overviews—including metrics like P/E ratios and market caps—and pull historical daily price data to help analyze long-term trends. It also surfaces professional sentiment by fetching analyst recommendations and tracking insider transactions, making it an ideal companion for anyone using an AI to research investment opportunities or understand complex market movements. For developers and AI power users, this tool is specifically optimized for the Claude Desktop environment using the Model Context Protocol. It operates as a Python-based server that exposes structured functions such as `get_stock_quote`, `get_time_series_daily`, and `search_symbol`. These functions return clean JSON data that the LLM can easily parse, reason over, and synthesize into actionable insights. By integrating this server, developers transform a standard language model into a data-driven financial assistant capable of handling precise, real-time market queries with robust error handling.
Category: Finance, Crypto & Payments
Tags: cryptocurrency, finance, market data, stocks, yfinance
bash pip install -r requirements.txt%APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS): json { "mcpServers": { "yfinance-trader": { "command": "py", "args": ["-3.13", "path/to/your/main.py"] } } } Note: - Replace path/to/your/main.py with the full absolute path to the main.py file in the project directory. - Ensure the Python command (py or python) matches your system's executable. - Restart Claude Desktop after saving the configuration.get_company_overview, get_recommendations, and get_stock_quote, Claude can synthesize a stock's fundamental health, current valuation, and expert sentiment into a single readable summary. Example: A user asks: "Generate a research brief for NVIDIA (NVDA). Include its current PE ratio, a summary of recent analyst recommendations, and its performance relative to its 52-week high."
get_insider_transactions tool extracts recent trades by directors and officers. This allows users to quickly see if "insiders" are betting on their own company or unloading shares, providing a layer of "conviction" analysis that technical charts alone can't provide. Example: A trader notices a stock is dipping and asks: "Have there been any recent insider buy transactions for Google (GOOGL) that suggest the leadership is confident despite the price drop?"get_company_overview for multiple symbols, Claude can create a comparison table. It can look at Market Cap, Dividend Yield, and Forward PE ratios to help the user identify which stock offers better value based on their specific investment criteria. Example: A user asks: "Compare the dividend yield and P/E ratios of Chevron (CVX) and ExxonMobil (XOM). Which one looks more undervalued based on historical averages?"
get_time_series_daily tool provides historical price data. Claude can use this to calculate volatility, identify trends over the last 3 months, or determine if a stock is currently "oversold" relative to its recent trading range. Example: A user asks: "Based on the…Part of MCP Servers