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-northbound-mcp

v1.0.0

Published

MCP server for China A-stock north-bound capital flow monitoring — daily/real-time foreign capital data via Stock Connect

Readme

🏦 opc-northbound-mcp

实时监控外资动向,个人投资者也能获得机构级数据。

MCP Server for China A-Stock Northbound Capital Flow monitoring via Stock Connect (沪深股通北向资金).

npm version license node


✨ 为什么需要北向资金数据?

北向资金是外资通过沪深港通(Stock Connect)进入A股市场的通道,是A股最重要的资金面指标之一。

  • 📊 机构风向标:外资机构的研究能力和资金体量远超散户,北向资金的持续流入/流出直接反映外资对中国市场的真实态度
  • 🔍 个股筛选器:被北向资金持续大额增持的个股,通常拥有扎实的基本面支撑
  • 🏭 行业轮动信号:行业级别的资金流向帮你第一时间捕捉外资的板块配置策略变化
  • ⏱️ 择时参考:北向资金的大幅流入/流出往往是市场拐点的先行指标

以前这些数据只有机构付费终端(Wind、Bloomberg)才能实时获取,现在通过 opc-northbound-mcp, 你和你的 AI 助手可以直接在 Claude、Cursor、Windsurf 等 MCP 客户端中查询和使用。


🚀 快速开始

安装

npm install -g opc-northbound-mcp

在 Claude Desktop 中配置

claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "northbound-flow": {
      "command": "npx",
      "args": ["opc-northbound-mcp"]
    }
  }
}

直接运行

npx opc-northbound-mcp

🛠️ 工具列表

| 工具 | 功能 | 使用场景 | |------|------|---------| | get_daily_flow | 日度北向资金流向 | 每日盘后/盘中查看外资净流入流出 | | get_top_stocks | 北向增持/减持Top N | 发现外资重点买入/卖出的个股 | | get_sector_flow | 行业北向资金流向 | 分析外资的板块配置偏好 | | get_history | 历史北向资金时序 | 回测外资行为模式,发现长期规律 |

get_daily_flow — 日度流向

获取当日沪深股通北向资金净流入数据,含沪股通/深股通分开统计、额度余额与市场情绪评分。

get_top_stocks — 个股排行

获取北向资金增持(或减持)最多的Top N只股票,含净买入金额、持仓占比、连续交易天数。

get_sector_flow — 行业流向

获取行业维度的北向资金流向,识别外资重点配置和撤离的板块。

get_history — 历史数据

获取指定时间区间的北向资金时序数据,支持日/周/月粒度,含统计摘要。

📦 版本

| 版本 | 数据范围 | 适用场景 | |------|---------|---------| | Community Edition (免费) | 参考数据 + 方法论文档 | 学习、原型验证、个人研究 | | Commercial Edition ($29/mo) | 实时数据 + 2014年至今完整历史 | 实盘交易、机构研究、AI量化 |

📧 商业版咨询: [email protected] | 🌐 opc.vc/northbound-mcp


🔧 开发

git clone https://github.com/opc-ventures/northbound-mcp.git
cd northbound-mcp
npm install
npm run build
npm start

技术栈

  • Runtime: Node.js ≥ 18
  • Protocol: Model Context Protocol (MCP)
  • SDK: @modelcontextprotocol/sdk v1.6+
  • Validation: Zod
  • Language: TypeScript (ES2022, Node16 ESM)

📄 License

MIT — Community Edition