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

opc-financial-report-mcp

v1.0.0

Published

MCP server for China A-stock financial report analysis — income statement, balance sheet, cash flow insights

Readme

opc-financial-report-mcp

A股财务报告分析 MCP Server — 内置申万行业基准数据,支持核心指标提取、行业对比、财务风险检测。

工具列表

| 工具 | 功能 | |------|------| | get_key_metrics | 计算/格式化 ROE、毛利率、资产负债率、营收增速,可选行业基准对比 | | compare_peers | 目标公司与内置行业基准对比,输出分位评估 | | detect_red_flags | 多维度风险扫描:高负债、现金流异常、应收账款暴增、ROE 暴跌、毛利率骤降 | | list_industries | 列出 30 个内置申万行业 |

安装

cd opc/mcp-factory/financial-report
npm install
npm run build

配置 (Hermes Agent)

~/.hermes/config.yaml 添加:

tools:
  mcp:
    - name: financial-report
      command: node
      args:
        - /Volumes/exData/code/hermes/opc/mcp-factory/financial-report/dist/index.js

使用示例

1. 提取核心指标

// get_key_metrics — 原始数据模式
{
  "stock_code": "600519",
  "stock_name": "贵州茅台",
  "industry": "食品饮料",
  "revenue": 1505,
  "net_profit": 747,
  "total_equity": 2150,
  "gross_profit": 1380,
  "total_assets": 2727,
  "total_liabilities": 493
}
// get_key_metrics — 直接指标模式
{
  "stock_code": "000858",
  "stock_name": "五粮液",
  "industry": "食品饮料",
  "roe": 25,
  "gross_margin": 75,
  "debt_ratio": 20,
  "revenue_yoy": 16
}

2. 行业对比

{
  "stock_code": "600519",
  "stock_name": "贵州茅台",
  "industry": "食品饮料",
  "roe": 30,
  "gross_margin": 92,
  "debt_ratio": 19,
  "revenue_growth": 16
}

3. 财务风险检测

{
  "stock_code": "000002",
  "stock_name": "万科A",
  "industry": "房地产",
  "debt_ratio": 78,
  "debt_ratio_prev": 75,
  "cash_flow_ratio": -0.5,
  "receivables_ratio": 45,
  "receivables_ratio_prev": 25,
  "roe": 2,
  "roe_prev": 10,
  "gross_margin": 15,
  "gross_margin_prev": 22
}

内置行业 (30 个)

银行、食品饮料、医药生物、电子、计算机、房地产、汽车、机械设备、化工、电力设备、非银金融、交通运输、有色金属、建筑装饰、钢铁、通信、传媒、农林牧渔、纺织服装、国防军工、家用电器、轻工制造、商贸零售、公用事业、建筑材料、社会服务、煤炭、石油石化、环保、美容护理

风险检测维度

| 类别 | 检测内容 | 严重程度阈值 | |------|----------|-------------| | 高负债 | 资产负债率 >80% | 🔴 critical | | 高负债 | 资产负债率 >70% 或 超行业 20pp | 🟡 warning | | 现金流 | 经营现金流/净利润 <0 | 🔴 critical | | 现金流 | 现金流覆盖率 <0.3 | 🟡 warning | | 应收账款 | 应收/营收 >50% | 🔴 critical | | 应收账款 | 应收/营收 >30% 或同比激增 >15pp | 🟡/🔴 | | 盈利能力 | ROE <0 或 ROE 同比腰斩 | 🔴 critical | | 盈利能力 | ROE <3% 或毛利率骤降 | 🟡 warning |

技术栈

  • TypeScript + Node.js
  • @modelcontextprotocol/sdk (MCP)
  • Zod (运行时校验)
  • Stdio transport

License

MIT