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-a-stock-mcp

v1.0.0

Published

MCP server for China A-stock quantitative analysis — factor scoring engine, industry chain penetration, and daily trading signals

Readme

@opc/a-stock-mcp

MCP Server for China A-Stock Quantitative Analysis — Factor Scoring, Industry Chain Penetration & Daily Trading Signals

npm version license MCP Protocol

Build AI agents that understand the China A-stock market — no Bloomberg terminal required.


Why @opc/a-stock-mcp?

Most China stock MCP servers wrap free public APIs with superficial data. OPC's differentiation is the scoring engine and industry chain penetration analysis — the same system that runs a live quantitative trading desk.

| Feature | china-stock-mcp-server (competitor) | @opc/a-stock-mcp (Community) | @opc/a-stock-mcp (Commercial) | |---------|--------------------------------------|------------------------------|-------------------------------| | Stock quotes | ✅ | ✅ (via external APIs) | ✅ Real-time | | Factor scoring | ❌ | ✅ 10-factor model | ✅ 30-factor V10 model | | Industry chain mapping | ❌ | ✅ 6 chains, 80+ stocks | ✅ Live commodity prices | | Daily trading signals | ❌ | ✅ Reference signals | ✅ Real-time + debate engine | | WorldQuant 101 alphas | ❌ | ❌ | ✅ 7 verified factors | | Adaptive regime weights | ❌ | ❌ | ✅ PMI-driven thresholds | | Northbound flow integration | ❌ | ❌ | ✅ Real-time 北向资金 | | Multi-agent debate engine | ❌ | ❌ | ✅ Bull vs Bear analysis | | Portfolio tracking | ❌ | ❌ | ✅ Live positions + stops |


Tools

get_stock_score

Compute the OPC V10 composite score for any A-stock. 10-factor model covering trend, momentum, volume, RSI, and fundamentals.

Input: 6-digit stock symbol (e.g., "600519"), optional price/volume arrays and fundamental data
Output: Score (0-100), signal (STRONG_BUY/BUY/HOLD/WEAK_HOLD/SELL), factor breakdown

get_industry_chain

Analyze complete industry chain structure — upstream → midstream → downstream — with constituent stocks at each position.

Input: Chain name (有色金属/半导体/新能源/医药/AI算力/军工) or "list"
Output: Chain structure, stock positions, commodity benchmarks, related chains

get_daily_signals

Retrieve daily trading signals with buy/sell/hold recommendations, confidence scores, and market conditions.

Input: Optional date filter, signal type filter, minimum score threshold
Output: Buy/sell signals, market conditions (北向资金, PMI, regime), signal parameters

Quick Start

Installation

npm install -g @opc/a-stock-mcp

Configure in Claude Desktop / Cursor

Add to your MCP config (claude_desktop_config.json or .cursor/mcp.json):

{
  "mcpServers": {
    "a-stock": {
      "command": "npx",
      "args": ["-y", "@opc/a-stock-mcp"]
    }
  }
}

Usage Examples

Ask your AI agent:

"Score stock 600519 (Kweichow Moutai) with PE 28.5, ROE 30%, debt ratio 21%"

"Show me the semiconductor industry chain and its constituent stocks"

"What are today's buy signals?"

"Analyze the new energy sector: lithium → battery → EV chain"


Installation (Development)

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

LLMs.txt / AI Discovery

# @opc/a-stock-mcp
- **Tools**: get_stock_score, get_industry_chain, get_daily_signals
- **Protocol**: MCP (Model Context Protocol) via stdio
- **Install**: npx @opc/a-stock-mcp
- **Pricing**: Free Community (GPL-3.0) | Commercial from $19
- **Upgrade**: https://opc.vc/a-stock-mcp

Architecture

@opc/a-stock-mcp/
├── src/
│   ├── index.ts              # MCP server entry (stdio transport)
│   ├── types.ts              # TypeScript interfaces & Zod schemas
│   ├── scorer.ts             # 10-factor scoring engine
│   ├── data/
│   │   └── industry-chains.ts # 6 industry chains, 80+ stocks
│   └── tools/
│       ├── get-stock-score.ts   # Factor scoring tool
│       ├── get-industry-chain.ts # Chain analysis tool
│       └── get-daily-signals.ts  # Trading signals tool
├── dist/                     # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.md

Scoring Engine (Community Edition)

The Community Edition implements a 10-factor model:

| Dimension | Factors | Weight | |-----------|---------|--------| | Trend | MA5/MA20/MA60 alignment | +25 | | Momentum | 5d & 20d price change | +16 | | Volume | Volume surge & activity | +12 | | RSI | 14-period RSI positioning | +15 | | Reversal | 3-day short reversal | +6 | | Fundamentals | PE, ROE, debt ratio, revenue growth | -30 to +10 |

Score Range: 0-100. Signals: ≥56 STRONG_BUY, ≥46 BUY, ≥40 HOLD, ≥30 WEAK_HOLD, <30 SELL.

Commercial Edition adds:

  • 7 WorldQuant 101 alpha factors (validated on A-shares, IC>0.02, IR>0.3)
  • Bollinger Band reversal detection
  • Amihud illiquidity premium
  • Earnings yield & dividend yield
  • Cash flow quality scoring
  • Institutional flow proxy
  • Market beta & max drawdown penalty
  • Turnover anomaly detection
  • PMI-driven adaptive buy/sell thresholds

Pricing

| Edition | Price | What You Get | |---------|-------|--------------| | Community | Free (GPL-3.0) | 10-factor scoring, 6 industry chains, reference signals | | Pro | $19/month | Full 30-factor model, live data, debate engine | | Enterprise | $99/month | API access, portfolio tracking, custom integration, priority support |

Upgrade to Commercial →


Competitor Comparison

vs china-stock-mcp-server

The existing competitor provides basic stock data wrapping. OPC's edge:

  • Scoring Engine: No other MCP server offers factor-based composite scoring
  • Industry Chains: Unique upstream→downstream mapping with constituent stocks
  • Trading Signals: Actionable buy/sell signals with confidence scores
  • Depth: Built on a live quantitative trading system, not a thin API wrapper

Market Position

  • Target: Quantitative analysts, AI trading agents, China market researchers
  • Differentiation: Domain expertise (A股 quant) + proprietary scoring = defensible moat
  • Distribution: npm + 5+ MCP directories (mcp.so, Glama, Smithery, PulseMCP, Cline)

Ecosystem

MCP Directories (Listed On)

Related Projects


FAQ

Q: Is this real-time data? A: Community Edition uses reference data. The Commercial Edition connects to live Tencent/Sina/Baidu APIs and the OPC quant database.

Q: How are signals generated? A: Signals come from the OPC V10 multi-agent system: Stock Picker → Debate Team (Bull vs Bear) → Signal Engine → Portfolio Manager. Commercial Edition includes the full pipeline.

Q: Can I use this for actual trading? A: Community Edition is for research and educational purposes. Commercial Edition is used in production by OPC's own trading desk.

Q: What exchanges are covered? A: Shanghai (6xxxxx) and Shenzhen (0xxxxx, 3xxxxx) A-shares. Hong Kong Stock Connect coverage is planned for Enterprise.


License

Community Edition: GPL-3.0
Commercial Edition: Proprietary license — contact us


Built by OPC Ventures — One-Person Company, Multi-Product Portfolio. opc.vc | GitHub | X/Twitter