# yfinance agent MCP

> yfinance agent MCP is an open-source MCP server for finance and payments. Read-only Yahoo Finance data server giving AI research agents quotes, history and news. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Website:** https://n-kostadinov.github.io/yfinance-agent-mcp/
- **Repository:** https://github.com/n-kostadinov/yfinance-agent-mcp
- **MCP Registry name:** io.github.n-kostadinov/yfinance-agent-mcp
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments), [stock market data](https://ai-powered.com/categories/stock-market-data)
- **Listing updated:** 2026-11-27

## About

Gives an AI assistant a set of read-only market data tools backed by Yahoo Finance through the yfinance library. Instead of one tool per library method, the 13 tools are shaped around what an agent needs: symbol lookup, quotes, price history with indicators, news, screeners, earnings calendars, fundamentals, analyst views, options and live prices.

Answers are kept compact so they fit in a model's context window. Price history arrives with returns, moving averages, RSI, ATR and the 52-week range rather than thousands of raw bars. Every response carries a timestamp, and quote responses add market state and delay information, since many exchanges report prices with a delay.

Failures are returned as specific error types such as rate limiting with a wait time, or invalid arguments with the accepted values, so an agent can recover on its own. Publisher text in news results is flagged as untrusted, and the server has no order placement capability.

## Features

- **Thirteen market data tools:** Covers symbol search, quotes, fundamentals, options, news, screeners and calendars in one server.
- **Indicator-ready price history:** Returns returns, moving averages, RSI, ATR and 52-week range alongside recent bars.
- **Timestamped freshness fields:** Each answer includes an as-of time, and quotes include market state and delay.
- **Actionable error responses:** Rate limit, invalid argument, not found and upstream errors each explain what to do next.
- **Rate limiting and caching:** Shared session, process-wide rate limit and per-category cache expiry to limit load on Yahoo.
- **Read-only by design:** The server cannot place trades, and news text is marked untrusted for agents.

## Good for

- Pulling quotes and recent news for a watchlist before a research session
- Screening stocks for analyst upgrades or unusual volume inside an agent workflow
- Comparing valuation and growth metrics across several tickers
- Checking whether the market is open and how major indices are moving
- Building a research agent that writes a decision record from news and price data

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add yfinance-agent-mcp -- uvx yfinance-agent-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add yfinance-agent-mcp -- uvx yfinance-agent-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.yfinance-agent-mcp]
command = "uvx"
args = ["yfinance-agent-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user yfinance-agent-mcp uvx -- yfinance-agent-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "yfinance-agent-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-agent-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 12 of 13 tools read data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `search_symbols` (name suggests: reads): Find Yahoo symbols for a company name or asset.
- `get_quotes` (name suggests: reads): Price, change, day range, volume and freshness for up to 25 symbols.
- `get_market_overview` (name suggests: reads): Market open status and index performance.
- `get_price_history` (name suggests: reads): Indicators and latest bars for a symbol.
- `get_news` (name suggests: reads): Latest news for symbols or a topic.
- `screen_securities`: Candidates from predefined screens or a custom query.
- `get_sector_industry` (name suggests: reads): Leaders, ETFs and industries of a sector or industry.
- `get_events` (name suggests: reads): Earnings, IPO, economic and split calendars.
- `get_fundamentals` (name suggests: reads): Financial statements, valuation history and key ratios.
- `get_analyst_view` (name suggests: reads): Price targets, ratings and estimates.
- `get_options` (name suggests: reads): Calls and puts around the current price.
- `get_ticker_dataset` (name suggests: reads): Holders, insider trades, dividends, splits, filings and fund holdings.
- `get_live_quotes` (name suggests: reads): Current price from Yahoo's streaming feed.

## FAQ

### Does the server place trades?

No. It is read-only and cannot place orders; trading would need a separate tool that the user controls.

### How do I install yfinance agent MCP?

Run it with uvx yfinance-agent-mcp, or add the command to an MCP client such as Claude Desktop, Cursor, VS Code or Windsurf.

### Is the market data real-time?

Quotes include market_state, quote_source and delay_min fields, because many exchanges are delayed by 15 minutes or more.

### Which license applies?

The server is released under the MIT license. The underlying yfinance library is Apache 2.0 licensed.

### Is yfinance agent MCP free?

Yes. yfinance agent MCP is open source, so you can use and self-host it for free.

### How do I add yfinance agent MCP to Claude Code?

Run this command in your terminal: claude mcp add yfinance-agent-mcp -- uvx yfinance-agent-mcp

### What are the best alternatives to yfinance agent MCP?

The closest alternatives to yfinance agent MCP are Yahoo Finance, Yahoo Finance MCP Server, Yahoo Finance (stocks, options, financials), yfinance-ai: Yahoo Finance and Yahoo Finance Scraper.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Yahoo Finance](https://ai-powered.com/mcp/yahoo-finance-2): Yahoo Finance is an open-source MCP server for finance and payments.
- [Yahoo Finance MCP Server](https://ai-powered.com/mcp/yahoo-finance-mcp-server): Yahoo Finance MCP Server is a paid MCP server for finance and payments.
- [Yahoo Finance (stocks, options, financials)](https://ai-powered.com/mcp/yahoo-finance-stocks-options-financials): Yahoo Finance (stocks, options, financials) is a paid MCP server for finance and payments.
- [yfinance-ai: Yahoo Finance](https://ai-powered.com/mcp/yfinance-ai-yahoo-finance): yfinance-ai: Yahoo Finance is an open-source MCP server for finance and payments.
- [Yahoo Finance Scraper](https://ai-powered.com/mcp/yahoo-finance-scraper): Yahoo Finance Scraper is a freemium MCP server for web search and scraping.
- [Finance: Stock, ETF & Crypto Data](https://ai-powered.com/mcp/finance-stock-etf-and-crypto-data): Finance: Stock, ETF & Crypto Data is a paid MCP server for finance and payments.
- [Benethos Yahoo Finance MCP](https://ai-powered.com/mcp/benethos-yahoo-finance-mcp): Benethos Yahoo Finance MCP is an open-source MCP server for finance and payments.
- [FinanceQuery](https://ai-powered.com/mcp/financequery): FinanceQuery is an open-source MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/yfinance-agent-mcp
