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

mcp-stock-analysis-server

v1.0.5

Published

股票分析工具包,提供技术指标计算和新闻分析功能

Downloads

95

Readme

股票分析工具包

这是一个功能强大的股票分析Node.js工具包,可以获取股票数据、计算技术指标、分析新闻情感并预测股票趋势。

功能特点

  • 获取股票价格数据(支持美股和中国股票)
  • 计算多种技术指标:
    • 布林带(BOLL)
    • 指数移动平均线(EMA)
    • 抛物线转向指标(SAR)
    • MACD(9,21,7)
    • 能量潮指标(OBV)
    • RSI指标
    • 成交量分析
  • 分析股票相关新闻的情感倾向
  • 综合技术指标和新闻分析预测股票趋势
  • 模块化设计,易于扩展和集成其他API

快速开始

npx mcp-stock-analysis-serve

基本使用

{
  "mcpServers": {
    "mcp-stock-analysis-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-stock-analysis-server"
      ],
      "env": {
        "NEWS_API_KEY": "api_key"
      }
    }
  }
}

环境变量配置

NEWS_API_KEY=your_newsapi_key

News API

  1. 访问 News API官网
  2. 注册并获取API密钥

API文档

StockAnalysis 类

参数:

  • config (Object): 配置选项
    • apiKey (String): 股票数据API密钥
    • newsApiKey (String): 新闻API密钥
    • dataProvider (String): 数据提供商名称,目前默认使用雅虎财经

方法

analyzeTrend(symbol, options)

分析股票并预测趋势。

参数:

  • symbol (String): 股票代码或名称
  • options (Object): 分析选项
    • period (Number): 分析周期(天数),默认30
    • includeNews (Boolean): 是否包含新闻分析,默认true

返回值:

  • Promise: 包含以下属性的对象
    • symbol (String): 股票代码
    • name (String): 股票名称
    • lastPrice (Number): 最新价格
    • indicators (Object): 技术指标数据
      • boll (Object): 布林带指标
      • ema (Object): EMA指标
      • sar (Object): SAR指标
      • macd (Object): MACD指标
      • obv (Object): OBV指标
      • RSI (Object): RSI指标
      • volume (Object): 成交量指标
    • newsAnalysis (Object): 新闻分析结果
      • sentiment (String): 整体情感倾向
      • score (Number): 情感分数
      • articles (Array): 分析后的文章数据
      • keywords (Array): 热点关键词
    • prediction (Object): 趋势预测结果
      • direction (String): 趋势方向(上涨/下跌/震荡)
      • strength (String): 趋势强度
      • score (Number): 综合评分
      • conclusion (String): 预测结论

注意事项

  • News API在免费计划中也有使用限制

许可证

Apache License 2.0

感谢打赏

alt text

使用效果

alt text