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
Maintainers
Readme
@opc/a-stock-mcp
MCP Server for China A-Stock Quantitative Analysis — Factor Scoring, Industry Chain Penetration & Daily Trading Signals
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 breakdownget_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 chainsget_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 parametersQuick Start
Installation
npm install -g @opc/a-stock-mcpConfigure 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 startLLMs.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-mcpArchitecture
@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.mdScoring 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 |
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)
- mcp.so — Largest discovery directory (17K+ servers)
- Glama — Quality-focused directory
- Smithery — Hosted deployment & analytics
- PulseMCP — Trending signals
- Cline Marketplace — VS Code extension marketplace
Related Projects
- OPC Quant System — Full Python quant stack
- OPC Ventures — One-Person Company portfolio
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
