An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for Claude Desktop. For a detailed guide on setting up and using this tool, check out our Medium tutorial: Tutorial: Using Claude Desktop with YFinance Trader MCP Tool to Access Real-Time Stock Market Data - Real-time stock quotes - Company information and
Add this skill
npx mdskills install SaintDoresh/yfinance-trader-mcp-claudedesktopWell-documented MCP server providing comprehensive stock market data tools with clear setup instructions
1# YFinance Trader MCP Tool for Claude Desktop23An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library, specifically adapted for Claude Desktop.45> **Credit**: This project was inspired by [mcp-stocks](https://github.com/luigiajah/mcp-stocks) by Luigi Ajah, which is a similar implementation for Cursor. This adaptation modifies the original concept to work with Claude Desktop.67## Tutorial89For a detailed guide on setting up and using this tool, check out our Medium tutorial:10[Tutorial: Using Claude Desktop with YFinance Trader MCP Tool to Access Real-Time Stock Market Data](https://medium.com/@saintdoresh/tutorial-using-claude-desktop-with-yfinance-trader-mcp-tool-to-access-real-time-stock-market-data-904cd1e1ba09)1112## Features1314- Real-time stock quotes15- Company information and financial metrics16- Historical price data17- Symbol search functionality18- Analyst recommendations19- Insider transaction tracking2021## Setup22231. Ensure you have Python 3.10 or higher installed24252. Install dependencies:26```bash27pip install -r requirements.txt28```2930## Integration with Claude Desktop31321. Configure your MCP settings in Claude Desktop by adding the following to your MCP configuration:3334```json35{36 "mcpServers": {37 "yfinance-trader": {38 "command": "py",39 "args": ["-3.13", "path/to/your/main.py"]40 }41 }42}43```44452. Replace the path with the full path to your main.py file463. Restart Claude Desktop if needed4748## Available Tools4950### 1. get_stock_quote51Get real-time stock quote information:52```json53{54 "symbol": "AAPL",55 "price": 150.25,56 "change": 2.5,57 "changePercent": 1.67,58 "volume": 1234567,59 "timestamp": "2024-03-20T10:30:00"60}61```6263### 2. get_company_overview64Get company information and key metrics:65```json66{67 "name": "Apple Inc.",68 "sector": "Technology",69 "industry": "Consumer Electronics",70 "marketCap": 2500000000000,71 "peRatio": 25.4,72 "forwardPE": 24.2,73 "dividendYield": 0.65,74 "52WeekHigh": 182.94,75 "52WeekLow": 124.1776}77```7879### 3. get_time_series_daily80Get historical daily price data:81```json82{83 "symbol": "AAPL",84 "timeSeriesDaily": [85 {86 "date": "2024-03-20T00:00:00",87 "open": 150.25,88 "high": 152.30,89 "low": 149.80,90 "close": 151.75,91 "volume": 1234567892 }93 // ... more data points94 ]95}96```9798### 4. search_symbol99Search for stocks and other securities:100```json101{102 "results": [103 {104 "symbol": "AAPL",105 "name": "Apple Inc.",106 "type": "EQUITY",107 "exchange": "NASDAQ"108 }109 // ... more results110 ]111}112```113114### 5. get_recommendations115Get analyst recommendations for a stock:116```json117{118 "symbol": "AAPL",119 "recommendations": [120 {121 "period": "2024-03-15T00:00:00",122 "strongBuy": 15,123 "buy": 20,124 "hold": 8,125 "sell": 2,126 "strongSell": 0127 }128 // ... more periods129 ]130}131```132133### 6. get_insider_transactions134Get insider trading information:135```json136{137 "symbol": "AAPL",138 "transactions": [139 {140 "date": "2024-03-15T00:00:00",141 "insider": "John Doe",142 "position": "Director",143 "transactionType": "Buy",144 "shares": 1000,145 "value": 150250.00,146 "url": "https://finance.yahoo.com/...",147 "text": "Purchase of 1000 shares",148 "startDate": "2024-03-15",149 "ownership": "Direct"150 }151 // ... more transactions152 ]153}154```155156## Sample Queries157158You can ask Claude Desktop questions like:159- "What is the current stock price and daily change for AAPL?"160- "Can you give me a company overview for Microsoft (MSFT)?"161- "Show me the historical price data for Tesla (TSLA) over the last 3 months."162- "Search for stocks related to 'NVDA'."163- "What are the analyst recommendations for Amazon (AMZN)?"164- "Have there been any recent insider transactions for Google (GOOGL)?"165166## Cryptocurrency Support167168Limited cryptocurrency data is available using special ticker formats:169- BTC-USD for Bitcoin170- ETH-USD for Ethereum171- DOGE-USD for Dogecoin172173## Error Handling174175All tools include proper error handling and will return an error message if something goes wrong:176```json177{178 "error": "Failed to fetch quote for INVALID_SYMBOL"179}180```181182## Troubleshooting183184If the MCP server is not working in Claude Desktop:1851. Make sure the server is running - you should see output when you start the script1862. Verify the path in your settings is correct and absolute1873. Make sure Python 3.10+ is in your system PATH1884. Check that all dependencies are installed1895. Try restarting Claude Desktop1906. Check logs for any error messages191192## Differences from the original mcp-stocks project193194- Uses the MCP library directly instead of FastAPI195- Adapted for Claude Desktop instead of Cursor196- Modified error handling and response formats197- Updated configuration approach198199## License200201MIT License
Full transparency — inspect the skill content before installing.