YFinance Trader
An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for Claude Desktop.
What is YFinance Trader?
YFinance Trader is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp (model context protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for claude desktop.
An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for Claude Desktop.
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An MCP (Model Context Protocol) tool that provides stock mar
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx yfinance-trader-mcp-toolConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use YFinance Trader
YFinance Trader MCP Tool is a Python-based MCP server that wraps the yfinance library to give Claude Desktop (and other MCP clients) real-time and historical stock market data capabilities. It exposes tools for fetching live quotes, company overviews, daily historical OHLCV data, analyst recommendations, insider transactions, and symbol searches — including cryptocurrency tickers like BTC-USD. Investors and analysts who want to ask their AI assistant about stock prices, compare companies, or pull historical price series without leaving their chat interface will find this a lightweight, no-API-key-required bridge to Yahoo Finance data.
Prerequisites
- Python 3.10 or later installed and available in your PATH
- pip for installing Python dependencies
- Claude Desktop (the primary supported MCP client for this tool)
- The yfinance-trader repository cloned to your local machine
Clone the repository
Download the YFinance Trader MCP Tool source code to your local machine.
git clone https://github.com/SaintDoresh/YFinance-Trader-MCP-ClaudeDesktop.git
cd YFinance-Trader-MCP-ClaudeDesktopInstall Python dependencies
Install the required Python packages including yfinance and the MCP SDK.
pip install -r requirements.txtNote the absolute path to main.py
You will need the absolute path to main.py when configuring Claude Desktop. Run the following command to get it.
# On macOS/Linux
pwd
# Then append /main.py to the output
# On Windows (PowerShell)
(Get-Item .\main.py).FullNameAdd the server to Claude Desktop configuration
Open claude_desktop_config.json (on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json) and add the yfinance-trader server block, using the absolute path to main.py and your Python executable.
{
"mcpServers": {
"yfinance-trader": {
"command": "python3",
"args": ["/absolute/path/to/YFinance-Trader-MCP-ClaudeDesktop/main.py"]
}
}
}Restart Claude Desktop
Close Claude Desktop completely and reopen it so it picks up the new MCP server configuration. The yfinance-trader server will start automatically on launch.
YFinance Trader Examples
Client configuration (Claude Desktop)
Add this block to claude_desktop_config.json on macOS at ~/Library/Application Support/Claude/claude_desktop_config.json, replacing the path with the real absolute path on your system.
{
"mcpServers": {
"yfinance-trader": {
"command": "python3",
"args": ["/Users/yourname/YFinance-Trader-MCP-ClaudeDesktop/main.py"]
}
}
}Prompts to try
Once connected, use these prompts in Claude Desktop to query live and historical market data.
- "What is the current stock price and daily change for AAPL?"
- "Give me a company overview for Microsoft (MSFT) including P/E ratio and dividend yield."
- "Show me Tesla's historical price data for the last 3 months."
- "What are the analyst buy/hold/sell recommendations for Amazon (AMZN)?"
- "Search for the ticker symbol for Nvidia."
- "What is the current price of Bitcoin? Use the ticker BTC-USD."
- "Show me recent insider transactions for Meta (META)."Troubleshooting YFinance Trader
Claude Desktop shows the server as failed to start
Verify that the path in the args array is the absolute path to main.py (not a relative path). Also confirm that the 'python3' command works in your terminal and points to Python 3.10+. On Windows, you may need to use 'python' instead of 'python3', or provide the full path to the Python executable.
ModuleNotFoundError for yfinance or other packages
Run 'pip install -r requirements.txt' again from the cloned project directory. If you have multiple Python environments, ensure you install dependencies in the same environment that the 'python3' command in your config points to. Consider using a virtual environment and pointing to its Python binary.
Stock data returns empty or stale results
yfinance pulls data from Yahoo Finance, which may rate-limit requests or return empty data for some tickers during off-market hours. Try a major ticker like AAPL first to verify the integration is working. Cryptocurrency tickers require the -USD suffix format (e.g., BTC-USD, ETH-USD).
Frequently Asked Questions about YFinance Trader
What is YFinance Trader?
YFinance Trader is a Model Context Protocol (MCP) server that mcp (model context protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for claude desktop. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install YFinance Trader?
Follow the installation instructions on the YFinance Trader GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with YFinance Trader?
YFinance Trader works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is YFinance Trader free to use?
Yes, YFinance Trader is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
YFinance Trader Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to YFinance Trader? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up YFinance Trader in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use YFinance Trader?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.