yfinance-agent-mcp: Yahoo Finance MCP server for AI trading-research agents

yfinance-agent-mcp is a read-only Model Context Protocol server that gives AI agents market data from Yahoo Finance through yfinance: quotes, price history with ready-made indicators, news, screeners, earnings and economic calendars, fundamentals, analyst views, options and live prices.
It is built for agents that follow news and trends and prepare trading decisions: answers are small, timestamped and honest about delays, and failures come back as actionable errors instead of empty data.
uvx yfinance-agent-mcp
Documentation · Tools · Changelog
Why this server
- 13 tools that cover all of yfinance, shaped for agents rather than one tool per library method.
- Answers that fit in context. Price history comes with returns, SMA 20/50/200, RSI 14, ATR 14 and the 52-week range instead of thousands of raw bars; every response stays under 20,000 characters by default.
- Freshness you can check. Every answer carries
as_of; quotes add market_state, quote_source and delay_min, because many exchanges are delayed by 15 minutes.
- Errors an agent can act on:
rate_limited (with the seconds to wait), not_found, invalid_argument (with the valid values) and upstream_error, never a silent empty result.
- Gentle with Yahoo. One shared session, a process-wide rate limit, a pause after HTTP 429, and a short-lived cache with its own expiry times.
- Safe with news. Publisher text arrives in fields marked
untrusted, so agents treat headlines as data, not instructions.
- Read-only. It cannot place orders.
Quick start
You need uv. uvx downloads and runs the server; it talks MCP over stdio.
Claude Code
claude mcp add yfinance -- uvx yfinance-agent-mcp
Or install the plugin, which adds the server and a market-research skill:
/plugin marketplace add n-kostadinov/yfinance-agent-mcp
/plugin install yfinance@yfinance-agent-mcp
On Claude Code 2.1.275 or later this works in one step: /plugin install yfinance --marketplace n-kostadinov/yfinance-agent-mcp.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"yfinance": {
"command": "uvx",
"args": ["yfinance-agent-mcp"]
}
}
}
Cursor
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"yfinance": {
"command": "uvx",
"args": ["yfinance-agent-mcp"]
}
}
}
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"yfinance": {
"type": "stdio",
"command": "uvx",
"args": ["yfinance-agent-mcp"]
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"yfinance": {
"command": "uvx",
"args": ["yfinance-agent-mcp"]
}
}
}
More clients, including the Claude Agent SDK, are covered in the client guides.
Tools