Skip to content

yahoo-finance2

JS API for Yahoo Finance

158,202
Weekly Downloads
build.protocol_tooling.mcp#yahoo#finance#financial#data#stock#price#quote#historical#eod#end-of-day

Install yahoo-finance2 in your MCP client

yahoo-finance2 is a Model Context Protocol server. Add it to your MCP client config once, restart, and the server's tools become available to your AI assistant. The same JSON snippet below works across all four major clients — only the config file path differs.

  1. Locate your client's MCP config file.
    • Cursor: ~/.cursor/mcp.json
    • Claude Desktop (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json
    • Claude Desktop (Windows): %APPDATA%\Claude\claude_desktop_config.json
    • VS Code: Settings → Extensions → MCP
    • Windsurf: Settings → MCP Servers
  2. Add yahoo-finance2 to the mcpServers map — paste the snippet below into your config file. If you already have other MCP servers, merge the entry into the existing mcpServers object.
  3. Restart your client so it picks up the new server.
  4. Verify — ask the assistant to list available tools; yahoo-finance2's tools should appear.
{
  "mcpServers": {
    "yahoo-finance2": {
      "command": "npx",
      "args": [
        "-y",
        "yahoo-finance2"
      ]
    }
  }
}

Install yahoo-finance2 in Cursor

Open ~/.cursor/mcp.json in your editor, paste the snippet above into mcpServers, save, and restart Cursor. yahoo-finance2 will show up in the assistant's tool list on next launch.

Install yahoo-finance2 in Claude Desktop (macOS)

Open ~/Library/Application Support/Claude/claude_desktop_config.json in your editor, paste the snippet above into mcpServers, save, and restart Claude Desktop (macOS). yahoo-finance2 will show up in the assistant's tool list on next launch.

Install yahoo-finance2 in Claude Desktop (Windows)

Open %APPDATA%\Claude\claude_desktop_config.json in your editor, paste the snippet above into mcpServers, save, and restart Claude Desktop (Windows). yahoo-finance2 will show up in the assistant's tool list on next launch.

Install yahoo-finance2 in VS Code

Open Settings → Extensions → MCP in your editor, paste the snippet above into mcpServers, save, and restart VS Code. yahoo-finance2 will show up in the assistant's tool list on next launch.

npm package: yahoo-finance2

Transport

yahoo-finance2 supports the following MCP transports. Most AI clients use stdio by default for locally-installed servers.

stdio

From the yahoo-finance2 README

# yahoo-finance2 Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill. Copyright (c) 2021 by Gadi Cohen and Pilwon Huh. [MIT licensed](./LICENSE). [![npm](https://img.shields.io/npm/v/yahoo-finance2)](https://www.npmjs.com/package/yahoo-finance2) [![Tests](https://github.com/gadicc/yahoo-finance2/actions/workflows/test-release.yaml/badge.svg)](https://github.com/gadicc/yahoo-finance2/actions/workflows/test-release.yaml) [![coverage](https://img.shields.io/codecov/c/github/gadicc/yahoo-finance2)](https://codecov.io/gh/gadicc/yahoo-finance2) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.

Other Model Context Protocol servers in the same space as yahoo-finance2. Each one adds different capabilities to your AI assistant — pick based on the data sources or workflows you need.

Browse the full MCP server directory or use Stork's one-line install to let your agent pick the right server automatically.