development
location
documentation
public
finance
MCP
What is yfinance?
💹The MCP YFinance Stock Server provides real-time and historical stock data in a standard format, powering dashboards, AI agents,and research tools with seamless financial insights.
Documentation
Installation & Setup
Run the following commands in your terminal:
curl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Create and navigate to your project directory
mkdir mcp-yfinance-server
cd mcp-yfinance-server\n\n# Initialize a new project
uv init\n\n# Create and activate the virtual environment
uv venv
source .venv/bin/activate\n\n# On Windows: .venv\Scripts\activate
Running the MCP Server
Once your environment is ready, start the stock server:
cp ../yf_serve.py .
uv run source/yf_server.py
MCP Tool Reference
The server exposes many tools for AI agents and CLI users. Here are some important tools:
add_to_watchlist: Add a stock ticker to your personal watchlist.
analyze_stock: Perform a 1-month technical trend analysis (RSI, MACD, MAs).
get_stock_price: Retrieve the current price for a given ticker symbol.