jl0703/yfinance-mcp
3.2
If you are the rightful owner of yfinance-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The yfinance-mcp-server is a lightweight Model Context Protocol (MCP) server that provides structured access to Yahoo Finance data for LLM-driven agents.
Tools
8
Resources
0
Prompts
0
yfinance-mcp-server
Lightweight Model Context Protocol (MCP) server exposing Yahoo Finance data for LLM-driven agents.
🚀 Available Tools
This MCP server provides structured access to Yahoo Finance data through the following tools:
| Tool | Description | Request Schema | Response |
|---|---|---|---|
get_snapshot(symbol) | Current price snapshot & metadata | symbol: str | SnapshotResponse |
get_profile(symbol) | Company profile (sector, industry, website, etc.) | symbol: str | ProfileResponse |
get_fundamentals(symbol) | Valuation & fundamental metrics | symbol: str | FundamentalsResponse |
get_history(req) | Historical OHLCV rows | { "symbol", "period", "interval" } | List[HistoricalRow] |
get_news(req) | Recent market news | { "symbol", "lookback_days", "max_items" } | List[NewsItem] |
get_analyst_insights(symbol) | Analyst consensus & target prices | symbol: str | AnalystResponse |
get_quote(symbol) | Combined snapshot + fundamentals + profile | symbol: str | Dict[str, Any] |
get_financial_statements(req) | Income, balance, cash statements | { "symbol", "statement", "quarterly" } | Dict[str, Any] |
📦 Requirements & Setup
- Python 3.13
uv(Astral’s tool)- Dependencies as defined in
pyproject.toml.
🛠️ Installation
Run Locally
# Clone repository
git clone https://github.com/jl0703/yfinance-mcp.git
cd yfinance-mcp
# Install dependencies via uv
uv sync
# Start MCP server (stdio)
uv run server.py
Using Docker
-
Build the Docker image:
docker build -t yfinance-mcp . -
Configure your MCP client:
{ "mcpServers": { "yfinance": { "command": "docker", "args": ["run", "-i", "--rm", "yfinance-mcp"], "transport": "stdio" } } }
Install in Claude Desktop
- In Claude Desktop, go to Settings → Developer → Open App Config File...
- Add an entry for
yfinance_mcp:{ "mcpServers": { "yfinance": { "command": "uv", "args": [ "--directory", "C:\\ABSOLUTE\\PATH\\TO\\PARENT\\FOLDER\\yfinance-mcp", "run", "server.py" ] } } } - Save the file and restart Claude Desktop.
Claude will then detect the tools offered by this MCP server.
Install in Cursor
- In Cursor, open Settings → MCP & Integrations → New MCP Server
- Add an entry for
yfinance_mcp:{ "mcpServers": { "yfinance": { "command": "uv", "args": [ "--directory", "C:\\ABSOLUTE\\PATH\\TO\\PARENT\\FOLDER\\yfinance-mcp", "run", "server.py" ] } } } - Save the config. Cursor should detect and launch or connect to your MCP server.
In your Cursor workspace, you can now issue prompts that invoke tools from yfinance_mcp.