YFinance Trader MCP Tool
An MCP (Model Context Protocol) tool that provides stock market data and trading capabilities using the yfinance library.
Features
- Company information and financial metrics
- Symbol search functionality
- Insider transaction tracking
Setup
- Ensure you have Python 3.10 or higher installed
- Install dependencies:
Integration with Cursor
- In Cursor, go to Settings > MCP
- Click "+ Add New MCP Server"
- Fill in the form:
- Name: "yfinance-trader" (or any name you prefer)
- Command: `python3 /path/to/your/yfinance-trader/main.py`
Example command:
(Replace with your actual path to main.py)
- Click "Add" and restart Cursor if needed
Available Tools
1. get_stock_quote
Get real-time stock quote information:
2. get_company_overview
Get company information and key metrics:
3. get_time_series_daily
Get historical daily price data:
4. search_symbol
Search for stocks and other securities:
5. get_recommendations
Get analyst recommendations for a stock:
6. get_insider_transactions
Get insider trading information:
Error Handling
All tools include proper error handling and will return an error message if something goes wrong:
Troubleshooting
If the MCP server is not working in Cursor:
- Verify the path in your settings is correct and absolute
- Make sure Python 3.10+ is in your system PATH
- Check that all dependencies are installed
- Try restarting Cursor
- Check Cursor's logs for any error messages
License
MIT License