雅虎财经 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
提供雅虎财经的非官方API,支持CLI、MCP和Agent Skill
雅虎财经 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
提供雅虎财经的非官方API,支持CLI、MCP和Agent Skill
雅虎财经 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/gadicc/yahoo-finance2
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"----": {
"command": "npx",
"args": ["-y", "yahoo-finance2"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 雅虎财经 执行以下任务... Claude: [自动调用 雅虎财经 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"____": {
"command": "npx",
"args": ["-y", "yahoo-finance2"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill.
Copyright (c) 2021 by Gadi Cohen and Pilwon Huh. MIT licensed.
You are reading the latest Development docs. For the v2 docs, click here. The dev docs are in the process of being updated for the upcoming v3 - for more info see UPGRADING.
Live Demo on CodeSandbox (Updated 2024-06-17; NextJS with both RSC and Hook-Relay examples)
NB: Recently the repo was renamed from node-yahoo-finance2 to yahoo-finance2, and the following branches were named, master to main, and devel to dev. See UPGRADING.md#dev for the git commands to update your local installation.
$ npm install -g yahoo-finance2 $ yahoo-finance search MSFT '{ "someOption": true }'
See the [CLI docs](./docs/cli.md) for stdout/stderr behavior and exit codes.
See the [MCP docs](./docs/mcp.md) to expose yahoo-finance2 tools to MCP clients
such as Codex, Claude, Cursor, and VS Code.
**Importing**
ts // or: const YahooFinance = require("yahoo-finance2").default; import YahooFinance from "yahoo-finance2";
const yahooFinance = new YahooFinance();
const results = await yahooFinance.search("Apple");
const quote = await yahooFinance.quote('AAPL'); const { regularMarketPrice as price, currency } = quote; ```
Available modules: chart, fundamentalsTimeSeries, historical, insights, options, quote, quoteSummary (submodules: assetProfile, balanceSheetHistory, balanceSheetHistoryQuarterly, calendarEvents, cashflowStatementHistory, cashflowStatementHistoryQuarterly, defaultKeyStatistics, earnings, earningsHistory, earningsTrend, financialData, fundOwnership, fundPerformance, fundProfile, incomeStatementHistory, incomeStatementHistoryQuarterly, indexTrend, industryTrend, insiderHolders, insiderTransactions, institutionOwnership, majorDirectHolders, majorHoldersBreakdown, netSharePurchaseActivity, price, quoteType, recommendationTrend, secFilings, sectorTrend, summaryDetail, summaryProfile, symbol, topHoldings, upgradeDowngradeHistory), recommendationsBySymbol, screener, search, trendingSymbols.
Extras: quoteCombine.
See the Explanatatory Documentation and Full API Documentation.
Particularly, make sure to read the notes there on ERROR HANDLING. Be aware that if a stock gets delisted, Yahoo removes all related data, including historical (and chart) data from periods before the delisting occurred (i.e. queries that worked before will start failing, and there is no way to retrieve this data again).
CLI (Command line interface)
```bash $ npx yahoo-finance2 --help $ npx yahoo-finance2 search AMZN $ npx yahoo-finance2 quoteSummary GOOGL $ npx yahoo-finance2 quoteSummary NVDA '{"modules":["assetProfile", "secFilings"]}'
Working with yahoo-finance2 is a joy if you're using TypeScript (but you don't have to), with type checking and auto completion:

Try it yourself on our Live CodeSandbox.
This project is neither created nor endorsed by Yahoo Inc. Yahoo does not provide any official API to developers, nor makes any guarantees regarding service availability or API consistency. In practice however, the open source community has kept this project (and it's predecessor) working well since 2013.
Nevertheless, we make no guarantees and you use this package at your own risk. The developers (and obviously Yahoo) cannot be held responsible for any losses you may incur as a result of using this service. Use of this package is considered acknowledgement and acceptance of these terms and of its license.
提供便捷的雅虎财经数据访问
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,雅虎财经 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | yahoo-finance2 |
| 原始描述 | 开源MCP工具:Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill。⭐731 · HTML |
| Topics | financeyahoomcp-server |
| GitHub | https://github.com/gadicc/yahoo-finance2 |
| License | MIT |
| 语言 | HTML |
收录时间:2026-05-30 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端