yahoo-finance-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yahoo-finance-mcp-serverShow me the current stock price for AAPL."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Yahoo Finance MCP Server
An MCP server that exposes the full Yahoo
Finance data surface to AI agents, backed by the
yfinance library. No API key
required.
Note on the "Yahoo Finance API": Yahoo retired its official public finance API years ago. This server uses
yfinance, which wraps Yahoo's internalquery1/query2.finance.yahoo.comendpoints (handling cookie/crumb auth for you). It is the most complete free way to access Yahoo's data, but it is unofficial — endpoints can change or rate-limit without notice.
What the agent can see
Every major data category Yahoo Finance serves is exposed as a tool:
Tool | Data |
| Fast price snapshot (last/open/high/low, volume, market cap, 52-wk range) |
| Full company/security profile ( |
| ISIN identifier |
| OHLCV history by period or date range, any interval (1m → 3mo) |
| Batch historical prices for many symbols at once |
| Dividends, splits, capital gains |
| Income statement / balance sheet / cash flow (annual & quarterly) |
| Earnings calendar & dates, EPS/revenue estimates, EPS trend & growth |
| Recommendations, price targets, upgrades/downgrades |
| Major / institutional / mutual-fund holders + insider activity |
| Historical shares outstanding |
| ESG risk scores |
| Available option expiry dates |
| Calls & puts (strike, IV, OI, volume, bid/ask) for an expiry |
| Recent related news articles |
| Recent SEC filings with document links |
| ETF/mutual-fund holdings, allocations, sector weights, bond ratings |
| Resolve a name → symbol; matching quotes + news |
| Enumerate instruments by type (stock/etf/index/currency/crypto/…) |
| Sector overview, top companies/ETFs, industries |
| Industry overview, top performing/growth companies |
| Market open/closed status & index summary by region |
| Preset screens (day_gainers, most_actives, …) |
| Custom numeric screen (e.g. market cap > $1B) |
Tickers use Yahoo symbols: AAPL, MSFT, BTC-USD, ^GSPC, EURUSD=X.
Installation
Requires Python 3.10+.
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Running
The server speaks MCP over stdio:
yahoo-finance-mcp
# or
python -m yahoo_finance_mcpClaude Desktop / Claude Code config
Add to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"yahoo-finance": {
"command": "/absolute/path/to/yahoo-finance-mcp-server/.venv/bin/python",
"args": ["-m", "yahoo_finance_mcp"]
}
}
}Or, with Claude Code:
claude mcp add yahoo-finance -- /absolute/path/to/.venv/bin/python -m yahoo_finance_mcpDeployment (HTTP, port 8081)
For remote/agent access the server can run over streamable HTTP instead of stdio. Transport and binding are controlled by env vars:
Var | Default | Purpose |
|
|
|
|
| bind address |
|
| listen port |
Run it directly:
MCP_TRANSPORT=streamable-http MCP_PORT=8081 python -m yahoo_finance_mcp
# endpoint: http://<host>:8081/mcpAutomated deploy via SSH
deploy/deploy.sh ships the code to a remote host, installs it, and (re)starts
it on port 8081 with a health check. It authenticates over SSH using these
GitHub repository secrets:
Secret | Meaning |
| remote endpoint (host/IP) |
| SSH port |
| SSH username |
| SSH password |
Python is auto-provisioned. The script needs Python ≥ 3.10. It first scans
the remote for any installed interpreter that qualifies (python3.10–3.13,
including /usr/local/bin). If none is found — e.g. on Raspberry Pi OS
Bullseye, which ships only Python 3.9.2 — it installs build deps and compiles
CPython (default 3.11.9, override with PYTHON_BUILD_VERSION) to
/usr/local via make altinstall. This one-time bootstrap takes ~15–40 min on
a Pi; subsequent deploys detect the installed interpreter and skip it.
Building requires root: it works if the deploy user has passwordless sudo,
otherwise it falls back to sudo -S using DEPLOY_SSH_PASSWORD. You can still
set PYTHON_BIN to force a specific interpreter; it's used if it qualifies.
The .github/workflows/deploy.yml workflow runs the script on every push to
main (and on manual workflow_dispatch). To run it by hand:
DEPLOY_SSH_HOST=1.2.3.4 DEPLOY_SSH_PORT=22 \
DEPLOY_SSH_USER=pi DEPLOY_SSH_PASSWORD=secret \
PYTHON_BIN=python3.11 \
./deploy/deploy.shThe script clones/updates the repo, builds a venv, stops any prior instance on
the port, starts the server detached (setsid, survives disconnect, logs to
server.log), then verifies POST /mcp returns 200.
Notes & limitations
Unofficial data source. Yahoo may rate-limit or change responses. Tools return a structured
{"error": ...}payload instead of crashing when a call fails, so the agent can react.Intraday history is range-limited by Yahoo (e.g.
1mdata only for the last few days).Data is provided for informational purposes; respect Yahoo's Terms of Service. Not investment advice.
Development
pip install -e .
python -c "from yahoo_finance_mcp.server import mcp; print(len(mcp._tool_manager.list_tools()), 'tools')"This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/christianGRogers/yahoo-finance-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server