yfinance by rizkydwicmt/yfinance-mcp-server
npx skills add https://github.com/rizkydwicmt/yfinance-mcp-server --skill yfinance从 Yahoo Finance 获取实时和历史金融数据。此 MCP 服务器提供 12 种工具,涵盖股票价格、公司基本面、分析师推荐、期权链、股息、市场波动股和新闻。
tool_get_stock_price — 当前价格与交易指标tool_get_stock_price(symbol: "AAPL")
tool_get_stock_price(symbol: "BBCA.JK")
返回:当前价格、涨跌幅百分比、开盘价、当日最高/最低价、成交量、52周价格范围、市值、市盈率、股息收益率、方向指示(▲/▼)。
tool_get_stock_info — 公司详情tool_get_stock_info(symbol: "MSFT")
返回:行业板块、细分行业、公司全名、市值、市盈率、市净率、利润率、收入增长率、分析师目标价、业务描述。
tool_get_history — 历史 OHLCV 数据tool_get_history(symbol: "AAPL", period: "1mo", interval: "1d")
tool_get_history(symbol: "BBCA.JK", period: "1y", interval: "1wk")
tool_get_history(symbol: "BTC-USD", period: "5y", interval: "1mo")
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3motool_get_financials — 财务报表tool_get_financials(symbol: "AAPL", statement_type: "income", quarterly: false)
tool_get_financials(symbol: "MSFT", statement_type: "balance_sheet", quarterly: true)
tool_get_financials(symbol: "GOOG", statement_type: "all")
income, balance_sheet, cash_flow, alltool_get_recommendations — 分析师评级tool_get_recommendations(symbol: "TSLA")
返回:推荐趋势(强烈买入、买入、持有、卖出、强烈卖出)、目标价格范围(最低、平均、中位数、最高)以及近期的评级上调/下调。
tool_get_options — 期权链tool_get_options(symbol: "AAPL")
tool_get_options(symbol: "TSLA", expiration: "2025-03-21")
返回:看涨期权和看跌期权的行权价、最后价格、买价、卖价、成交量、未平仓合约、隐含波动率。列出可用的到期日。
tool_get_dividends — 股息历史tool_get_dividends(symbol: "JNJ")
tool_get_dividends(symbol: "BBCA.JK")
返回:当前收益率、除息日、支付率以及历史股息支付记录。
tool_compare_stocks — 并排比较tool_compare_stocks(symbols: "AAPL,MSFT,GOOG")
tool_compare_stocks(symbols: "BBCA.JK BBRI.JK BMRI.JK")
最多比较 10 只股票,指标包括:价格、涨跌幅百分比、市值、市盈率、股息收益率、利润率、收入增长率、分析师评级。股票代码可以用逗号或空格分隔。
tool_get_market_movers — 热门波动股tool_get_market_movers(mover_type: "gainers")
tool_get_market_movers(mover_type: "losers")
tool_get_market_movers(mover_type: "most_active")
tool_screen_stocks — 股票筛选器tool_screen_stocks(sector: "Technology", min_market_cap: 1000000000)
tool_screen_stocks(max_pe_ratio: 15, min_dividend_yield: 0.03)
tool_screen_stocks(sector: "Healthcare", exchange: "NMS")
所有筛选条件均为可选且可组合使用:
Technology, Healthcare, Financial Services, Energy 等。1000000000 = 10亿美元)25)0.03 = 3%)NMS (NASDAQ), NYQ (NYSE) 等。tool_search_stocks — 查找股票代码tool_search_stocks(query: "Apple", max_results: 5)
tool_search_stocks(query: "semiconductor ETF")
tool_search_stocks(query: "bank indonesia")
通过名称、股票代码或关键词搜索股票、ETF、共同基金、指数。
tool_get_news — 最新新闻tool_get_news(symbol: "AAPL", max_items: 5)
tool_get_news(symbol: "TSLA")
返回:每篇文章的标题、发布者、链接、发布时间和缩略图。
此服务器适用于 Yahoo Finance 支持的任何股票代码:
| 市场 | 示例 |
|---|---|
| 美国股票 | AAPL, MSFT, GOOG, TSLA, AMZN |
| 印度尼西亚 (IDX) | BBCA.JK, BBRI.JK, TLKM.JK, BMRI.JK |
| 日本 (TSE) | 7203.T (丰田), 6758.T (索尼) |
| 英国 (LSE) | SHEL.L, AZN.L, HSBA.L |
| 香港 (HKEX) | 0700.HK (腾讯), 9988.HK (阿里巴巴) |
| ETF | SPY, QQQ, VTI, VOO, ARKK |
| 加密货币 | BTC-USD, ETH-USD, SOL-USD |
| 指数 | ^GSPC (标普500), ^IXIC (纳斯达克), ^JKSE (IDX) |
| 外汇 | USDIDR=X, EURUSD=X, GBPUSD=X |
tool_search_stocks → 查找股票代码tool_get_stock_info → 了解公司概况tool_get_financials → 分析基本面tool_get_recommendations → 查看分析师情绪tool_get_history → 回顾价格趋势tool_compare_stocks → 比较您的持仓tool_get_stock_price → 检查当前价格tool_get_news → 获取各持仓的最新动态tool_get_market_movers → 寻找热门股票tool_screen_stocks → 按条件筛选tool_get_stock_info → 深入研究候选股票包含的 install.sh 脚本可自动化所有步骤 — uv 设置、Python 3.12 虚拟环境、包安装、mcporter 配置以及 OpenClaw 技能注册:
# 在您的服务器上克隆仓库
git clone https://github.com/rizkydwicmt/yfinance-mcp-server.git
cd yfinance-mcp-server
# 运行安装程序
chmod +x install.sh
./install.sh
安装程序将:
pyproject.tomluvyfinance-mcp-server 及其所有依赖项yfinance 添加到您的 mcporter 配置(自动检测)SKILL.md 安装到 OpenClaw 技能目录使用环境变量自定义安装程序行为:
# 更改项目位置
YFINANCE_PROJECT_DIR=/opt/mcp/yfinance ./install.sh
# 使用不同的 Python 版本
YFINANCE_PYTHON_VERSION=3.11 ./install.sh
# 自定义虚拟环境位置
YFINANCE_VENV_DIR=/opt/venvs/yfinance ./install.sh
# 指定 mcporter 配置文件路径
MCPORTER_CONFIG=/etc/clawd/mcporter.json ./install.sh
# 自定义 OpenClaw 目录
CLAWD_DIR=/opt/clawd ./install.sh
# 跳过 mcporter / 技能步骤
SKIP_MCPORTER=true ./install.sh
SKIP_SKILL=true ./install.sh
# 1. 克隆仓库
git clone https://github.com/rizkydwicmt/yfinance-mcp-server.git
cd yfinance-mcp-server
# 2. 安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# 3. 创建虚拟环境并安装
uv venv .venv --python 3.12
uv pip install -e . --python .venv/bin/python
# 4. 添加到 mcporter.json
# {"mcpServers": {"yfinance": {"command": "/path/to/.venv/bin/yfin-mcp"}}}
# 5. 安装技能
mkdir -p ${CLAWD_DIR}/skills/yfinance
cp SKILL.md ${CLAWD_DIR}/skills/yfinance/SKILL.md
# 检查工具是否加载
mcporter --config ${CLAWD_DIR}/config/mcporter.json list yfinance --schema
# 实时测试
mcporter --config ${CLAWD_DIR}/config/mcporter.json call yfinance.tool_get_stock_price symbol=AAPL
每周安装次数
71
仓库
GitHub 星标数
1
首次出现
2026年2月24日
安全审计
安装于
codex70
opencode70
kimi-cli69
gemini-cli69
amp69
github-copilot69
Access real-time and historical financial data from Yahoo Finance. This MCP server provides 12 tools covering stock prices, company fundamentals, analyst recommendations, options chains, dividends, market movers, and news.
tool_get_stock_price — Current Price & Trading Metricstool_get_stock_price(symbol: "AAPL")
tool_get_stock_price(symbol: "BBCA.JK")
Returns: current price, change %, open, day high/low, volume, 52-week range, market cap, P/E, dividend yield, direction (▲/▼).
tool_get_stock_info — Company Detailstool_get_stock_info(symbol: "MSFT")
Returns: sector, industry, full name, market cap, P/E, P/B, profit margins, revenue growth, analyst price targets, business description.
tool_get_history — Historical OHLCV Datatool_get_history(symbol: "AAPL", period: "1mo", interval: "1d")
tool_get_history(symbol: "BBCA.JK", period: "1y", interval: "1wk")
tool_get_history(symbol: "BTC-USD", period: "5y", interval: "1mo")
1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max1m, , , , , , , , , , , , tool_get_financials — Financial Statementstool_get_financials(symbol: "AAPL", statement_type: "income", quarterly: false)
tool_get_financials(symbol: "MSFT", statement_type: "balance_sheet", quarterly: true)
tool_get_financials(symbol: "GOOG", statement_type: "all")
income, balance_sheet, cash_flow, alltool_get_recommendations — Analyst Ratingstool_get_recommendations(symbol: "TSLA")
Returns: recommendation trends (strongBuy, buy, hold, sell, strongSell), price targets (low, mean, median, high), and recent upgrades/downgrades.
tool_get_options — Options Chaintool_get_options(symbol: "AAPL")
tool_get_options(symbol: "TSLA", expiration: "2025-03-21")
Returns: calls and puts with strike, last price, bid, ask, volume, open interest, implied volatility. Lists available expiration dates.
tool_get_dividends — Dividend Historytool_get_dividends(symbol: "JNJ")
tool_get_dividends(symbol: "BBCA.JK")
Returns: current yield, ex-date, payment rate, and historical dividend payments.
tool_compare_stocks — Side-by-Side Comparisontool_compare_stocks(symbols: "AAPL,MSFT,GOOG")
tool_compare_stocks(symbols: "BBCA.JK BBRI.JK BMRI.JK")
Compares up to 10 stocks on: price, change %, market cap, P/E, dividend yield, margins, revenue growth, analyst rating. Symbols can be comma or space separated.
tool_get_market_movers — Top Moverstool_get_market_movers(mover_type: "gainers")
tool_get_market_movers(mover_type: "losers")
tool_get_market_movers(mover_type: "most_active")
tool_screen_stocks — Stock Screenertool_screen_stocks(sector: "Technology", min_market_cap: 1000000000)
tool_screen_stocks(max_pe_ratio: 15, min_dividend_yield: 0.03)
tool_screen_stocks(sector: "Healthcare", exchange: "NMS")
All filters are optional and combinable:
Technology, Healthcare, Financial Services, Energy, etc.1000000000 = $1B)25)0.03 = 3%)NMS (NASDAQ), NYQ (NYSE), etc.tool_search_stocks — Find Tickerstool_search_stocks(query: "Apple", max_results: 5)
tool_search_stocks(query: "semiconductor ETF")
tool_search_stocks(query: "bank indonesia")
Searches stocks, ETFs, mutual funds, indices by name, ticker, or keyword.
tool_get_news — Latest Newstool_get_news(symbol: "AAPL", max_items: 5)
tool_get_news(symbol: "TSLA")
Returns: title, publisher, link, publish time, and thumbnail for each article.
This server works with any ticker supported by Yahoo Finance :
| Market | Examples |
|---|---|
| US Stocks | AAPL, MSFT, GOOG, TSLA, AMZN |
| Indonesia (IDX) | BBCA.JK, BBRI.JK, TLKM.JK, BMRI.JK |
| Japan (TSE) | 7203.T (Toyota), 6758.T (Sony) |
| UK (LSE) | SHEL.L, AZN.L, HSBA.L |
| Hong Kong (HKEX) | 0700.HK (Tencent), 9988.HK (Alibaba) |
| ETFs | SPY, QQQ, VTI, VOO, ARKK |
| Crypto | BTC-USD, ETH-USD, SOL-USD |
| Indices | ^GSPC (S&P 500), ^IXIC (NASDAQ), ^JKSE (IDX) |
| Forex | USDIDR=X, EURUSD=X, GBPUSD=X |
tool_search_stocks → find the tickertool_get_stock_info → understand the companytool_get_financials → analyze fundamentalstool_get_recommendations → check analyst sentimenttool_get_history → review price trendstool_compare_stocks → compare your holdingstool_get_stock_price → check current pricestool_get_news → stay updated on each positiontool_get_market_movers → find trending stockstool_screen_stocks → filter by criteriatool_get_stock_info → deep dive on candidatesThe included install.sh automates everything — uv setup, Python 3.12 venv, package install, mcporter config, and OpenClaw skill registration:
# Clone the repository on your server
git clone https://github.com/rizkydwicmt/yfinance-mcp-server.git
cd yfinance-mcp-server
# Run the installer
chmod +x install.sh
./install.sh
The installer will:
pyproject.toml in the project directoryuv if not already presentyfinance-mcp-server + all dependenciesyfinance to your mcporter config (auto-detected)SKILL.md to OpenClaw skills directoryCustomize the installer behavior with environment variables:
# Change project location
YFINANCE_PROJECT_DIR=/opt/mcp/yfinance ./install.sh
# Use a different Python version
YFINANCE_PYTHON_VERSION=3.11 ./install.sh
# Custom venv location
YFINANCE_VENV_DIR=/opt/venvs/yfinance ./install.sh
# Specify mcporter config path
MCPORTER_CONFIG=/etc/clawd/mcporter.json ./install.sh
# Custom OpenClaw directory
CLAWD_DIR=/opt/clawd ./install.sh
# Skip mcporter / skill steps
SKIP_MCPORTER=true ./install.sh
SKIP_SKILL=true ./install.sh
# 1. Clone repository
git clone https://github.com/rizkydwicmt/yfinance-mcp-server.git
cd yfinance-mcp-server
# 2. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# 3. Create venv + install
uv venv .venv --python 3.12
uv pip install -e . --python .venv/bin/python
# 4. Add to mcporter.json
# {"mcpServers": {"yfinance": {"command": "/path/to/.venv/bin/yfin-mcp"}}}
# 5. Install skill
mkdir -p ${CLAWD_DIR}/skills/yfinance
cp SKILL.md ${CLAWD_DIR}/skills/yfinance/SKILL.md
# Check tools load
mcporter --config ${CLAWD_DIR}/config/mcporter.json list yfinance --schema
# Live test
mcporter --config ${CLAWD_DIR}/config/mcporter.json call yfinance.tool_get_stock_price symbol=AAPL
Weekly Installs
71
Repository
GitHub Stars
1
First Seen
Feb 24, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykFail
Installed on
codex70
opencode70
kimi-cli69
gemini-cli69
amp69
github-copilot69
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
51,800 周安装
执行加速器:克服分析瘫痪,快速决策与发布的速度框架 | 创业生产力工具
150 周安装
Docker容器化开发指南:镜像构建、安全实践与编排最佳实践
150 周安装
散文风格诊断技能:识别小说句子写作问题,提升写作质量与故事表现力
150 周安装
GitHub Copilot CLI 委托技能:非交互式命令、模型选择与安全权限指南
153 周安装
Claude Code 多智能体编排系统 - 基于 Git 的轻量级任务追踪与工作流管理
150 周安装
Next.js useSearchParams Suspense 模式详解:解决URL参数读取与服务器端渲染问题
151 周安装
2m5m15m30m60m90m1h1d5d1wk1mo3mo