npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

yfinance-mcp

v1.0.5

Published

MCP server for Yahoo Finance data - stock quotes, historical prices, financials, company info, and news

Readme

Yahoo Finance MCP Server

npm version

A Model Context Protocol (MCP) server that provides access to Yahoo Finance data including stock quotes, historical prices, financial statements, company information, symbol search, and news.

Installation

Claude Code

claude mcp add yfinance-mcp -- npx yfinance-mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "yfinance-mcp": {
      "command": "npx",
      "args": ["yfinance-mcp"]
    }
  }
}

Available Tools

get_quote

Get real-time stock quote data including price, change, volume, and key metrics.

Parameters:

  • symbol (string, required): Stock ticker symbol (e.g., "AAPL", "GOOGL")

Example response:

{
  "symbol": "AAPL",
  "name": "Apple Inc.",
  "price": 273.08,
  "change": -0.68,
  "changePercent": -0.25,
  "volume": 20667651,
  "marketCap": 4052613332992,
  "peRatio": 36.56
}

get_historical

Get historical OHLCV (Open, High, Low, Close, Volume) price data.

Parameters:

  • symbol (string, required): Stock ticker symbol
  • period (string, optional): Time period - "1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "max" (default: "1mo")
  • interval (string, optional): Data interval - "1d", "1wk", "1mo" (default: "1d")

get_financials

Get company financial statements (income statement, balance sheet, or cash flow).

Parameters:

  • symbol (string, required): Stock ticker symbol
  • statement (string, required): Type of statement - "income", "balance", "cashflow"
  • quarterly (boolean, optional): Get quarterly data instead of annual (default: false)

get_company_info

Get company profile including sector, industry, description, and key statistics.

Parameters:

  • symbol (string, required): Stock ticker symbol

search_symbols

Search for stock symbols by company name or keywords.

Parameters:

  • query (string, required): Search query (company name or keywords)

get_news

Get latest news for a stock symbol.

Parameters:

  • symbol (string, required): Stock ticker symbol

Development

Run in development mode

pnpm dev

Run tests

pnpm test           # Run tests in watch mode
pnpm test -- --run  # Run tests once

Run tests with coverage

pnpm test:coverage

Lint and format

pnpm lint       # Check for linting errors
pnpm lint:fix   # Fix linting errors
pnpm format     # Format code with Prettier

Build

pnpm build

Tech Stack

  • TypeScript
  • MCP SDK (@modelcontextprotocol/sdk)
  • yahoo-finance2
  • Zod for input validation
  • Vitest for testing
  • ESLint + Prettier for code quality

License

MIT