Yahoo Finance MCP Server

A remote MCP server for Yahoo Finance data, deployed on Cloudflare Workers.

README.md

Yahoo Finance MCP Server

A remote MCP (Model Context Protocol) server for Yahoo Finance data, deployed on Cloudflare Workers.

Features

  • 9 tools for accessing Yahoo Finance data
  • Cookie + Crumb authentication for reliable API access
  • SSE and Streamable HTTP transport support
  • Cloudflare Workers deployment with Durable Objects

Tools

Tool Description
get_historical_stock_prices Get OHLCV data for a ticker
get_stock_info Get comprehensive stock information
get_yahoo_finance_news Get latest news for a ticker
get_stock_actions Get dividends and stock splits
get_financial_statement Get income statement, balance sheet, or cashflow
get_holder_info Get institutional, insider, and major holders
get_option_expiration_dates Get available option expiration dates
get_option_chain Get calls/puts option chain
get_recommendations Get analyst recommendations

Setup

npm install

Development

npm run dev

Server runs at http://localhost:5173

Deploy

npm run deploy

Endpoints

Endpoint Description
/ JSON documentation
/sse MCP SSE transport
/mcp MCP Streamable HTTP transport

Usage

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "yahoo-finance": {
      "command": "npx",
      "args": ["mcp-remote", "https://your-worker.workers.dev/sse"]
    }
  }
}

MCP Inspector

npx @modelcontextprotocol/inspector@latest

Connect to http://localhost:5173/sse (local) or https://your-worker.workers.dev/sse (deployed).

Project Structure

src/
├── server.ts           # Worker entry point
├── mcp.ts              # MCP server with tool definitions
└── yahoo-finance-api.ts # Yahoo Finance API client

License

MIT

Tools 9

get_historical_stock_pricesGet OHLCV data for a ticker
get_stock_infoGet comprehensive stock information
get_yahoo_finance_newsGet latest news for a ticker
get_stock_actionsGet dividends and stock splits
get_financial_statementGet income statement, balance sheet, or cashflow
get_holder_infoGet institutional, insider, and major holders
get_option_expiration_datesGet available option expiration dates
get_option_chainGet calls/puts option chain
get_recommendationsGet analyst recommendations

Try it

Get the latest stock information and analyst recommendations for AAPL.
Show me the income statement for Microsoft (MSFT) for the last fiscal year.
What are the upcoming option expiration dates for TSLA?
Fetch the latest news headlines for NVIDIA.
Get the historical OHLCV data for GOOGL for the past month.

Frequently Asked Questions

What are the key features of Yahoo Finance?

Access to 9 distinct tools for financial data retrieval. Supports Cookie and Crumb authentication for reliable API access. SSE and Streamable HTTP transport support. Optimized for Cloudflare Workers deployment with Durable Objects.

What can I use Yahoo Finance for?

Automating financial research reports by pulling real-time stock data into LLM workflows.. Analyzing historical price trends for technical analysis using AI-driven insights.. Comparing financial statements across multiple companies for investment research.. Monitoring institutional and insider holding changes for specific tickers..

How do I install Yahoo Finance?

Install Yahoo Finance by running: npm install

What MCP clients work with Yahoo Finance?

Yahoo Finance works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Yahoo Finance docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare