Skip to main content
Glama
guyangjing

低点买入

by guyangjing

低点买入V5.6 MCP服务

将选股技能封装为MCP服务,可接入超级小爱等支持MCP协议的AI助手。

功能

  • scan_low_point: 全市场低点买入扫描

    • EXPMA金叉检测

    • RSI 45-65区间筛选

    • 144日均线支撑确认

    • 多头排列验证

    • 大盘环境检查

    • 自动跳过大跌日

  • market_overview: A股大盘概览

Related MCP server: mcp-stock-quote

技术架构

东方财富公开API → 指标计算 → 六步选股法 → MCP协议 → 超级小爱

无需API Key,使用东方财富免费公开数据。

部署到Vercel(推荐,免费)

1. 准备工作

  • 注册GitHub账号

  • 注册Vercel账号(用GitHub登录)

2. 上传代码到GitHub

# 在电脑上操作
git init
git add .
git commit -m "低点买入V5.6 MCP"
git remote add origin https://github.com/你的用户名/mcp-lowpoint-scanner.git
git push -u origin main

3. 在Vercel部署

  1. 打开 https://vercel.com/new

  2. 导入你的GitHub仓库

  3. 点击 Deploy

  4. 等待部署完成

4. 获取MCP URL

部署成功后,你的MCP服务地址是:

https://你的项目名.vercel.app/mcp

5. 填入超级小爱

  1. 打开超级小爱 → 设置 → MCP服务

  2. 添加新服务:

    • 名称:低点买入

    • 服务器URL:https://你的项目名.vercel.app/mcp

  3. 保存后即可使用

本地开发

node api/mcp.js
# 服务启动在 http://localhost:3000/mcp

测试

# 测试工具列表
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# 执行扫描
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"scan_low_point","arguments":{}}}'

文件结构

mcp-lowpoint-scanner/
├── api/
│   └── mcp.js          # MCP服务器入口
├── lib/
│   ├── eastmoney.js    # 东方财富API客户端
│   ├── indicators.js   # 技术指标计算
│   └── scanner.js      # 选股逻辑
├── package.json
├── vercel.json
└── README.md

扫描逻辑(六步选股法)

  1. 大盘环境检查 - 上证跌超2%则降低评分

  2. 全市场扫描 - 获取所有A股实时数据

  3. 快速预筛选 - 排除ST/退市/新股/停牌/科创板/北交所

  4. 流通市值过滤 - 30亿-500亿

  5. K线深度分析 - 获取200日K线,计算EXPMA/RSI/EMA144

  6. 综合评分排序 - 60分以上入选,同梯队按接近144线排序

注意事项

  • 使用东方财富免费API,无需付费

  • 选股结果仅供参考,不构成投资建议

  • 市场有风险,投资需谨慎

v1.1.0 修复说明

  1. 修复新股过滤bug:原代码错误地检查股票代码(code)是否以C/N开头,实际股票代码为纯数字,新股标识在名称(name)中。已修正为检查stock.name。

  2. 优化Vercel超时:默认候选数从300降至80,避免Vercel免费版(10秒超时)扫描超时。可通过maxCandidates参数调整(范围20-200)。

  3. 添加API重试机制:所有东方财富API调用增加2次重试+超时控制,提升网络不稳定时的成功率。

  4. 更新vercel.json:使用现代rewrites配置替代已废弃的builds/routes语法。

  5. 添加MCP协议头:响应增加MCP-Protocol-Version头,提升与MCP客户端的兼容性。

  6. 优化导入:market_overview工具改用静态导入,去除不必要的动态import。

重要提示

  • Vercel免费版超时限制:单次扫描需在10秒内完成。默认80只候选股约需4-8秒。若市场数据量大或API响应慢可能超时。如需扫描更多股票,建议升级Vercel Pro(60秒超时)或自行部署到其他平台。

  • 东方财富API可用性:该API为非官方公开接口,可能随时变更或限制IP。若部署后持续返回错误,需考虑更换数据源。

  • 交易时段:建议在交易时段(9:30-15:00)使用,非交易时段数据为上一交易日收盘数据。

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to query real-time A-share stock data, including quotes, fund flows, sector flows, and K-line history, without needing an API key.
    54
    5
    17
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to fetch realtime stock quotes, fundamentals, and search for stocks across A-share, Hong Kong, and US markets without requiring API keys.
    5
    22 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to fetch real-time quotes, K-line data, and technical indicators for A-share, Hong Kong, US stocks, funds, futures, and options, plus composite stock analysis, market scanning, and sector breakdowns. It also ships preset prompts and skills for technical analysis, stock screening, market overviews, and portfolio monitoring.
    111 npm
    ISC
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to query real-time quotes, K-line data, technical indicators, sector and fund flows, plus composite analysis across A-share, Hong Kong, US, fund, futures, and options markets. It also bundles ready-made prompts and skills for stock analysis, screening, market overviews, and portfolio monitoring.
    111 npm
    ISC