Stock MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Stock MCP Serverwhat's the price of 600519?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A股实时行情 MCP Server
通过新浪财经 / 腾讯财经公开行情接口,为 Claude 提供 A 股实时行情和历史K线查询能力。 部署在 Cloudflare Workers(免费)上,代码托管在 GitHub。
功能
get_realtime_quote:查询一只或多只股票的最新价/收盘价、开高低、成交量额、涨跌幅get_history_kline:查询单只股票指定日期区间的历史日K线(开盘/收盘/最高/最低/成交量)
Related MCP server: stock-mcp-server
部署步骤
1. 准备账号
注册 GitHub(已有可跳过)
注册 Cloudflare(免费)
2. 上传代码到 GitHub
在 GitHub 新建一个仓库,例如命名为
stock-mcp-server把本项目文件夹(
stock-mcp-server/)里的所有文件上传到该仓库可以直接在 GitHub 网页用 "Add file → Upload files" 拖拽上传
或用 git 命令行:
git init git add . git commit -m "init" git remote add origin https://github.com/你的用户名/stock-mcp-server.git git push -u origin main
3. 连接 Cloudflare 部署(推荐:网页一键集成,无需命令行)
左侧菜单选择 Workers & Pages → 创建 → Workers
选择 连接到 Git(Connect to Git)
授权并选择你刚创建的 GitHub 仓库
stock-mcp-server部署配置保持默认(Cloudflare 会自动识别
wrangler.toml),点击 保存并部署部署完成后,Cloudflare 会给你一个网址,形如:
https://a-share-stock-quote.你的子域名.workers.dev
之后每次你在 GitHub 更新代码,Cloudflare 会自动重新部署,无需手动操作。
4. 验证部署是否成功
浏览器直接打开(替换成你自己的网址):
https://a-share-stock-quote.你的子域名.workers.dev/quote?codes=300346,002428如果返回类似下面的 JSON,说明部署成功:
[
{"code":"sz300346","name":"南大光电","price":71.43, ...},
{"code":"sz002428","name":"云南锗业","price":124.0, ...}
]5. 把这个 MCP Server 接入 Claude
把部署好的网址(注意路径是 /mcp,不是 /quote)告诉 Claude 或在 claude.ai 的 Connector 设置里添加:
https://a-share-stock-quote.你的子域名.workers.dev/mcp具体添加方式:claude.ai 设置 → Connectors → 添加自定义连接器 → 填入上面的 URL。
本地命令行部署(可选,给熟悉命令行的用户)
npm install
npx wrangler login # 浏览器授权登录 Cloudflare
npx wrangler deploy # 部署调试接口(不经过MCP,直接用浏览器/curl测试)
实时行情:
GET /quote?codes=300346,002428历史K线:
GET /history?code=300346&start=2026-06-01&end=2026-06-29
数据来源说明
实时行情:新浪财经公开接口
hq.sinajs.cn历史K线:腾讯财经公开接口
web.ifzq.gtimg.cn
均为公开免登录接口,仅供个人学习研究使用,请勿用于高频请求或商业用途。
This server cannot be deployed
Maintenance
Related MCP Connectors
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…
China A-share real-time stock quotes and major indices with dual-source fallback.
Read-only China A-share data for AI agents: market, limit-up, capital flow and disclosures.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides real-time market data for A-shares, Hong Kong, and US stocks using the Tencent Finance API. It enables users to manage stock positions and watchlists through an AI assistant.127 npm1ISC
- AlicenseNot gradedqualityCmaintenanceReal-time A-share stock data for AI assistants. Provides real-time stock prices, K-line data, financial indicators, and sector fund flow analysis for Chinese A-share market. Multi-source data validation ensures accuracy.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables users to query Chinese A-share stock data, including stock basics, historical prices, financial reports, and macroeconomic indicators.1MIT
- AlicenseAqualityDmaintenanceEnables 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.510MIT