Objective
Standardize the **first step (data foundation)** in the technical analysis workflow:
- Use only
tushare-mcp(viamcporter) to obtain data - Minimal validation (no heavy cleaning)
- Write data to disk under
results/project-name/data/raw/ - Provide a summary that can go directly into Step 2 technical analysis
Data scope (default)
- Instrument: user-specified (A-share format
XXXXXX.SH/SZ) - Daily bars: past 1 year (
tushare_daily) - Technical factors: past 1 year (
tushare_stk_factor_pro) - Capital flows: past 3 months (
tushare_moneyflow)
Core rules
- Single data source: prioritize and by default use only
tushare-mcp - API call method:
mcporter call tushare-pro.<tool> - Disk-writing conventions:
results/<project-name>/data/raw/ - Minimal validation: only check record counts, key fields, latest trading day, and latest close
- Summary must output: latest trading day, latest close, 20-day change, record counts, completeness
Standard execution template
1) Daily bars
mcporter call tushare-pro.tushare_daily \
ts_code=603067.SH start_date=2025-03-01 end_date=2026-03-05 _limit=5000
2) Technical factors
mcporter call tushare-pro.tushare_stk_factor_pro \
ts_code=603067.SH start_date=2025-03-01 end_date=2026-03-05 _limit=5000
3) Capital flows
mcporter call tushare-pro.tushare_moneyflow \
ts_code=603067.SH start_date=2025-12-01 end_date=2026-03-05 _limit=5000
Suggested output file naming
<ts_code>_daily_1y.json<ts_code>_stk_factor_pro_1y.json<ts_code>_moneyflow_3m.json
Minimal checklist
- All three datasets returned successfully
- Daily bar/factor record counts greater than 0
- Latest trading day identifiable
- Latest close price readable
- 20-day change calculable
Failure fallback (lightweight)
- If
tushare_stk_factor_prois unavailable: clearly report the error reason (permissions/API unavailable), keep daily bars and capital flows, and continue the workflow. - If
mcporteris not configured withtushare-pro: first fix the MCP registration and token, then retry.
Delivery summary template
- Instrument: 603067.SH
- Latest trading day: YYYYMMDD
- Latest close: XX.XX
- 20-day change: XX.XX%
- Record counts: daily bars N / factors N / capital flows N
- Completeness: complete / partially missing (note the reason)