- Home
- MCP servers
- YFinance Trader
YFinance Trader
- python
9
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"luigiajah-mcp-stocks": {
"command": "python3",
"args": [
"/path/to/your/yfinance-trader/main.py"
]
}
}
}You deploy a Python-based MCP server that supplies stock market data and trading capabilities powered by yfinance. You can query real-time quotes, company information, historical prices, search symbols, and inspect insider activity, all through a consistent MCP interface and client integrations.
How to use
You connect your MCP client to the yfinance_trader server, then call its available functions to retrieve stock data or perform lookups. Use the functions to fetch real-time quotes, obtain company overviews with key metrics, pull historical daily prices, search for securities by symbol or name, view analyst recommendations, and review insider transactions. Each tool returns structured data you can display in your app or workflow.
How to install
Prerequisites: you need Python 3.10 or higher installed on your system.
# Ensure Python 3.10+ is available on your system
python3 --version
# Create and activate a virtual environment (optional but recommended)
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# or install the package directly if you have the project files
pip install .
Additional setup and configuration
Integrate the MCP server with Cursor by adding a new MCP Server entry. You will run the server process locally and point Cursor to its command. Use the following configuration as the runtime example.
# Runtime command to start the MCP server locally
python3 /path/to/your/yfinance-trader/main.py
Available tools
get_stock_quote
Fetches real-time stock quote information including symbol, price, change, changePercent, volume, and timestamp.
get_company_overview
Returns company name, sector, industry, market capitalization, P/E ratios, dividend yield, and 52-week highs/lows.
get_time_series_daily
Retrieves historical daily price data for a given symbol, including open, high, low, close, and volume with corresponding dates.
search_symbol
Searches for stocks and other securities by symbol or name, returning a list of matching results with symbol, name, type, and exchange.
get_recommendations
Provides analyst recommendations for a stock across periods, including counts for strong buy, buy, hold, sell, and strong sell.
get_insider_transactions
Returns insider trading activity for a symbol, including date, insider name, position, transaction type, shares, value, and ownership.