cn-funds-mcp

v1.0.1

China fund & stock data assistant (free API, no API key required). Query fund valuation, NAV, holdings, manager info, stock/index quotes, market capital flow...

1· 259·1 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for smallke/cn-funds-mcp.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "cn-funds-mcp" (smallke/cn-funds-mcp) from ClawHub.
Skill page: https://clawhub.ai/smallke/cn-funds-mcp
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install cn-funds-mcp

ClawHub CLI

Package manager switcher

npx clawhub@latest install cn-funds-mcp
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implementation: the code calls EastMoney/1234567 endpoints to fetch fund, stock, market and manager data and exposes portfolio and reminder management. No unrelated credentials or binaries are requested.
Instruction Scope
SKILL.md requires calling check_reminders at each conversation start and supports importing screenshots via OCR (if the model supports image input). This is consistent with reminder/portfolio features, but it encourages uploading sensitive finance screenshots (personal holdings) which will be parsed and stored locally.
Install Mechanism
There is no install spec in the registry (instruction-only), and package.json only depends on @modelcontextprotocol/sdk. No downloads from untrusted URLs or extract/install steps are present in the manifest.
Credentials
The skill requires no environment variables or external credentials — only network access to public EastMoney/1234567 endpoints. It persistently stores user data in a local data/ directory (data/portfolio.json and data/reminders.json); no secrets are requested.
Persistence & Privilege
always:false (no forced global presence). The skill persists reminders and portfolios to files under its data/ directory and will check reminders at conversation start per SKILL.md. This is expected but means sensitive holdings are kept on disk in plaintext JSON.
Assessment
This skill appears internally consistent and implements what it advertises, but review the following before installing: - Privacy: the skill asks users to upload screenshots for OCR-based import and stores holdings/reminders in data/portfolio.json and data/reminders.json in the skill folder (plain JSON). If those files contain sensitive financial data, ensure the runtime environment has appropriate file permissions or run the skill in a sandbox. - Network endpoints: it fetches data from eastmoney and 1234567 domains (public Chinese finance APIs). If you require stricter data provenance, verify those endpoints yourself and/or inspect responses. - Dependency review: package.json depends on @modelcontextprotocol/sdk; prefer installing from a controlled environment and verify the package version before running. - Test with dummy data first: add sample holdings to confirm behavior and to see where files are written and what reminders trigger. If you are uncomfortable storing real holdings or uploading screenshots, do not use the OCR import and/or run the skill in an isolated container or VM.

Like a lobster shell, security has layers — review code before you run it.

latestvk975mhwyqngfmpq9gb3ay898bn83585x
259downloads
1stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

cn-funds-mcp 使用指南

工具速查

基金查询

工具用途关键参数
search_fund搜索基金(名称/代码/拼音)keyword
get_fund_estimate实时估值(盘中估算净值和涨跌幅)fundCode
get_fund_batch_info批量获取多只基金净值fundCodes(逗号分隔)
get_fund_info基金详情(类型/公司/经理/规模/排名)fundCode
get_fund_valuation_detail当日估值走势(日内分时)fundCode
get_fund_net_value_history历史净值走势fundCode, range
get_fund_accumulated_performance累计收益 vs 沪深300 vs 同类fundCode, range
get_fund_position持仓股票明细fundCode
get_fund_manager_list历任经理列表fundCode
get_fund_manager_detail现任经理简介fundCode

股票/指数

工具用途关键参数
get_stock_trend日内分时走势secid(如 1.600519
get_stock_quote实时行情报价secids(逗号分隔)

大盘/资金

工具用途关键参数
get_market_overviewA股大盘概况(上证/深证)
get_market_capital_flow大盘资金流向(主力/大小单)
get_sector_capital_flow板块资金排行timeType, code
get_northbound_capital沪深港通资金流向

持仓管理

工具用途关键参数
save_portfolio保存/更新持仓记录fundCode, shares, costPrice
remove_portfolio删除持仓记录fundCode
get_portfolio查看持仓列表
get_portfolio_profit一键查询今日收益和总收益

定时提醒

工具用途关键参数
set_reminder设置定时提醒(每个交易日触发)time(HH:MM), type, message
get_reminders查看所有提醒设置
remove_reminder删除某个提醒id
check_reminders检查是否有到期提醒

提醒类型 type:

  • profit_report — 持仓收益播报(触发后查询 get_portfolio_profit,给出加仓/减仓建议)
  • market_report — 大盘行情播报(触发后查询大盘概况 + 资金流向)
  • custom — 自定义提醒(配合 message 参数)

常用参数说明

基金代码 fundCode: 6 位数字,如 161725(招商白酒)、110011(易方达中小盘)

证券ID secid: 格式为 市场.代码

市场代码含义示例
1.上交所1.000001(上证指数)、1.600519(贵州茅台)
0.深交所0.399001(深证成指)、0.000858(五粮液)
116.港股116.01810(小米集团)

时间范围 range: m=1月, q=3月, hy=6月, y=1年, 2y=2年, 3y=3年, 5y=5年

主动行为(重要)

每次对话开始时,必须先调用 check_reminders

无论用户说了什么,在回复用户之前,先调用 check_reminders 检查是否有到期提醒。如果有到期提醒,按以下规则执行:

  1. profit_report 到期时

    • 调用 get_portfolio_profit 获取收益数据
    • 调用 get_market_overview 获取大盘背景
    • 以友好的语气向用户播报今日持仓收益总览
    • 对每只基金给出操作建议:
      • 今日跌幅 > 2%:提示"可考虑适当加仓摊低成本"
      • 今日涨幅 > 3%:提示"涨幅较大,可考虑部分止盈"
      • 持仓总亏损 > 10%:提示"亏损较大,建议评估是否继续持有"
      • 持仓总盈利 > 20%:提示"盈利可观,建议分批止盈锁定收益"
    • 最后询问用户是否需要调整持仓
  2. market_report 到期时

    • 调用 get_market_overview + get_market_capital_flow + get_northbound_capital
    • 播报大盘指数、资金流向、北向资金动态
  3. custom 到期时

    • 向用户展示自定义提醒内容

如果没有到期提醒,则正常处理用户的请求。

典型场景

用户不知道基金代码

先用 search_fund 搜索,再用返回的 code 调用其他工具。

用户问"今天大盘怎么样"

依次调用 get_market_overview + get_market_capital_flow,综合播报大盘点位、涨跌、成交额、资金流向。

用户问"我今天赚了多少"

直接调用 get_portfolio_profit,返回每只基金的今日收益和汇总。如果没有持仓记录,引导用户用 save_portfolio 添加。

用户告知持仓信息

解析出基金代码、份额、成本价,逐只调用 save_portfolio 保存。名称参数可省略,工具会自动查询填充。

用户想快速导入持仓(截图识别)

如果当前模型支持图片识别(OCR),主动提示用户:可以直接上传基金APP(如天天基金、支付宝、蚂蚁财富等)的持仓截图,AI 会自动识别图片中的基金代码、基金名称、持有份额、成本净值等信息,然后逐只调用 save_portfolio 批量导入持仓,无需手动逐个输入。

处理流程:

  1. 识别截图中的每只基金信息(代码、份额、成本价)
  2. 对于识别不完整的字段(如只有名称没有代码),用 search_fund 补全基金代码
  3. 逐只调用 save_portfolio 保存
  4. 保存完成后汇总展示已导入的持仓列表,并提示用户确认是否有遗漏或错误

用户问某只基金的全面分析

组合调用: get_fund_info + get_fund_estimate + get_fund_position + get_fund_accumulated_performance,从基本面、估值、持仓、历史收益多维度分析。

用户说"帮我设置每天下午提醒收益"

调用 set_reminder,参数 time="14:30", type="profit_report"。之后每个交易日 14:30 后的首次对话会自动触发收益播报和操作建议。

提醒触发后的播报示例

下午好!现在是 14:30,为您播报今日持仓收益:

持仓总览:3 只基金,总成本 15000.00 元,当前市值 14520.00 元 今日收益:-180.00 元 | 持仓总收益:-480.00 元(-3.20%)

各基金明细:

  • 招商白酒A (161725):今日 -1.22%,持仓亏损 -11.07%,建议评估是否继续持有
  • 易方达蓝筹 (005827):今日 +0.35%,持仓盈利 +5.20%,继续持有
  • 广发纳斯达克 (270042):今日 +1.80%,持仓盈利 +15.30%,走势良好

需要调整持仓吗?

注意事项

  • 估值数据仅在 A 股交易时段(9:30-15:00)更新,非交易时段返回的是收盘数据
  • get_fund_estimate 返回的是估算值,非最终净值,需提示用户
  • 持仓数据持久化在 data/portfolio.json,跨会话保留
  • 收益计算:今日收益 = 份额 ×(估值 - 昨日净值),持仓收益 = 份额 ×(估值 - 成本价)

作者

smallke | smallkes@qq.com

Comments

Loading comments...