mcp-eastmoney
mcp-eastmoney is an MCP server that provides real-time (delayed ~15 min) and historical China A-share stock market data via Eastmoney's free public APIs — no API key required. It offers five tools:
get_stock_quote: Retrieve live price, change %, open/high/low/close, volume, turnover rate, and P/E ratio for any A-share stock by its 6-digit code.search_stock: Find A-share stocks by company name, Chinese pinyin abbreviation, or stock code — returns up to 20 results.main_fund_rank: View top stocks ranked by main capital net inflow (super-large, large, medium, and small orders), filterable by market (all, Shanghai, Shenzhen, ChiNext, STAR Market).sector_fund_flow: Analyze capital flow across industry or concept sectors, including rise/fall %, net inflow amounts, and the leading gainer stock per sector (up to 50 results).get_kline: Fetch historical OHLCV candlestick data across daily, weekly, monthly, or intraday (5/15/30/60 min) timeframes — useful for trend analysis, backtesting, and technical indicator calculations (up to 500 data points).
Click on "Install 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., "@mcp-eastmoneyWhat's the current price of 300750?"
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.
mcp-eastmoney
🇨🇳 让 Claude / Cursor / Codex 等 MCP 客户端直接查询 A 股实时数据 — 免 API Key、开箱即用
中文
mcp-eastmoney 是基于 Model Context Protocol 的 A 股数据服务器,让 AI 助手能直接调用东方财富的实时行情、主力资金、板块资金流和 K 线数据。
✨ 特性
🆓 完全免费 — 使用东方财富公开延时接口(
push2delay.eastmoney.com),无需 API Key🇨🇳 中文金融场景 — 全 A 股市场覆盖(沪深京),返回结构化中文字段
⚡ 5 个核心 Tool — 实时行情、股票搜索、主力资金排名、板块资金流、历史 K 线
🔌 标准 MCP 协议 — 兼容 Claude Desktop / Cursor / Cline / Continue 等所有 MCP 客户端
🐍 Python + uv —
uvx mcp-eastmoney一键运行
🛠️ 提供的 Tools
Tool | 说明 | 示例 |
| 获取实时行情(价格、涨跌、成交量、PE、换手率) |
|
| 按关键词/拼音/代码搜索股票 |
|
| 主力资金净流入排名(超大单/大单/中单/小单) |
|
| 行业/概念板块资金流向 + 领涨股 |
|
| 历史 K 线(日/周/月线,前复权) |
|
🚀 快速开始
1. 通过 uvx 安装(推荐)
uvx mcp-eastmoney2. 通过 pip 安装
pip install mcp-eastmoney
mcp-eastmoney3. 接入 Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows):
{
"mcpServers": {
"eastmoney": {
"command": "uvx",
"args": ["mcp-eastmoney"]
}
}
}重启 Claude Desktop,即可看到 5 个新工具。
📚 完整集成教程:
examples/CLAUDE_DESKTOP.md— 含故障排查 + 50+ 实战 prompts (sample_prompts.md)
4. 接入 Cursor
在 Cursor 设置 → MCP 中添加:
{
"mcpServers": {
"eastmoney": {
"command": "uvx",
"args": ["mcp-eastmoney"]
}
}
}💬 使用示例
向 Claude 提问:
你: 帮我看一下宁德时代现在的股价和主力资金情况
Claude (自动调用
get_stock_quote+main_fund_rank): 宁德时代(300750)当前 ¥394.85,涨 3.31%,成交 162.79亿。今日主力净流入 19.74亿,居全市场第一,其中超大单净流入 15.04亿,机构资金高度集中…
你: 今天哪些行业板块资金流入最多?
Claude (调用
sector_fund_flow):
有色金属:+144.09亿(领涨股 金钼股份 +10.0%)
电力设备:+91.76亿(领涨股 宁德时代)
工业金属:+83.69亿…
📊 返回数据样例
{
"code": "300750",
"name": "宁德时代",
"price": 394.85,
"change": 12.65,
"change_pct": 3.31,
"open": 389.99,
"high": 399.54,
"low": 383.30,
"prev_close": 382.20,
"volume": 414208,
"amount": "162.79亿",
"turnover_rate": 0.97,
"pe": 12.65
}⚠️ 数据说明
数据来源于东方财富延时接口(约 15 分钟延迟),仅供研究参考
不构成任何投资建议
接口由东方财富免费提供,请合理控制请求频率
🤝 贡献
欢迎 PR!计划中的功能:
资金日历、龙虎榜
财务报表数据
北向资金 / 港股 / 美股
技术指标计算(MA/MACD/KDJ)
📜 License
MIT
Related MCP server: stock-mcp-server
English
mcp-eastmoney is an MCP (Model Context Protocol) server that exposes China's A-share stock market data to AI assistants — powered by Eastmoney's free public APIs.
✨ Features
🆓 Zero config — uses Eastmoney's free delayed-quote endpoints, no API key needed
🇨🇳 A-share native — covers Shanghai / Shenzhen / Beijing exchanges with proper Chinese fields
⚡ 5 core tools — real-time quotes, stock search, capital flow ranking, sector flow, K-line history
🔌 Standard MCP — works with Claude Desktop, Cursor, Cline, Continue, and any MCP client
🐍 Python + uv — one-line install:
uvx mcp-eastmoney
🛠️ Available Tools
Tool | Description |
| Real-time quote (price, change, volume, PE, turnover) |
| Search by keyword / pinyin / code |
| Main capital net inflow ranking (super-large / large / medium / small orders) |
| Industry / concept sector capital flow with leading stocks |
| Historical OHLCV (daily / weekly / monthly, forward-adjusted) |
🚀 Quick Start
Install with uvx:
uvx mcp-eastmoneyAdd to Claude Desktop config:
{
"mcpServers": {
"eastmoney": {
"command": "uvx",
"args": ["mcp-eastmoney"]
}
}
}⚠️ Disclaimer
Data is delayed (~15 min) and provided "as-is" by Eastmoney. Not financial advice. Use responsibly.
📜 License
MIT
Available Tools
5 toolsget_klineB
获取个股K线数据(日/周/月/分钟级)。Historical K-line data — daily, weekly, monthly, or intraday (5/15/30/60 min). 用于趋势分析、回测、技术指标计算。
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 6位股票代码 | |
| period | No | daily | |
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must bear the burden of disclosing behavioral traits. It mentions historical data but fails to describe rate limits, data freshness, error handling, or any limitations. The description adds little beyond the basic purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with only two sentences covering both languages. It is front-loaded with the core purpose. However, it could be more structured (e.g., listing use cases or parameter hints) to improve scanability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description covers the tool's purpose and periods but lacks important details like return format (e.g., OHLCV fields) and whether data is adjusted. This is a moderate gap for a historical data tool that an AI agent needs to effectively use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is low (33%: only code has a description). The description repeats the period enum values already in the schema but does not explain the meaning of limit (e.g., number of trading days or bars) or provide examples. It adds no new semantic information beyond what the schema already conveys.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves historical K-line data for individual stocks, specifying supported periods (daily, weekly, monthly, intraday) and listing use cases like trend analysis and backtesting. It is distinct from sibling tools such as get_stock_quote or main_fund_rank, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for technical analysis and backtesting but does not explicitly state when to use this tool versus alternatives (e.g., get_stock_quote for real-time quotes). No exclusions or complementary tools are mentioned, leaving guidance minimal.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stock_quoteA
获取A股个股实时行情(价格、涨跌幅、成交量、换手率、市盈率等)。Get real-time quote for an A-share stock — price, change %, volume, turnover rate, P/E. 数据来源东方财富,延迟约15分钟。
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 6位股票代码,如 600519(贵州茅台)、300750(宁德时代) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description mentions data source (东方财富) and 15-minute delay, which adds some behavioral context. No further details on auth, rate limits, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, bilingual, front-loaded with key information. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one parameter, no output schema, and no annotations, the description adequately covers purpose, data fields, data source, and delay. Could be slightly more detailed on return format, but sufficient for a simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter. The description does not add new information beyond what the schema already provides (code and example). Baseline score 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it gets real-time quote for A-share stocks, listing specific fields (price, change%, volume, turnover rate, P/E). It distinguishes from siblings like get_kline (k-line data) and search_stock (search).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives. Usage is implied (fetch current quote), but no exclusions or when-not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
main_fund_rankB
主力资金净流入排行榜。Top stocks ranked by main capital net inflow. 可按市场过滤:all / sh(沪市) / sz(深市) / cyb(创业板) / kcb(科创板)。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| market | No | all |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as data freshness, return format, pagination, or access restrictions, leaving the agent with limited operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded with the core purpose, though the bilingual repetition adds minor redundancy. Overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and minimal annotations, the description lacks details on output structure, sorting, or pagination, leaving the tool's behavior incompletely specified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description adds meaning to the 'market' parameter by listing allowed values. However, it does not mention the 'limit' parameter, so partial compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it returns a ranking of stocks by main capital net inflow and lists market filter options, distinguishing it from sibling tools like get_kline and sector_fund_flow.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the ranking purpose but provides no explicit guidance on when to use this tool versus alternatives like sector_fund_flow, nor does it state prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_stockA
按名称、代码或拼音搜索A股股票。Search A-share stocks by name / code / pinyin (e.g. '宁德', 'NDSD', '300750').
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | 搜索关键词 | |
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description only states the search functionality without disclosing behavioral traits such as result format, pagination, or behavior on no match. It does not contradict annotations (none present).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise—two short sentences including a bilingual explanation and an example. Every word is relevant and contributes to clarity without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description could be more complete by indicating what the tool returns (e.g., a list of matching stocks). It adequately covers input semantics but leaves the output unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50% (only 'keyword' has a description). The description adds value by explaining what types of keywords are accepted (name/code/pinyin) and giving examples, but it does not clarify the 'limit' parameter's purpose or its default behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool searches A-share stocks by name, code, or pinyin, with an example. It is distinct from sibling tools like get_kline or get_stock_quote, which focus on retrieving specific data rather than searching.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool should be used to find stocks when given a keyword, but does not provide explicit guidance on when to use it versus alternatives, nor does it mention any prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sector_fund_flowA
板块资金流向排行(行业板块或概念板块)。Sector fund flow ranking. kind: industry(行业) / concept(概念)。返回涨跌幅、主力净流入、领涨股。
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | industry | |
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses what the tool returns (涨跌幅、主力净流入、领涨股), but does not mention side effects, rate limits, or other behavioral traits. It is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: two sentences conveying purpose, kind options, and return fields. No unnecessary words; front-loaded with both languages.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with 2 parameters and no output schema, the description covers the main purpose and key return fields. It could mention the order of ranking or data format, but it is reasonably complete for its complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explains the 'kind' parameter with Chinese/English context and the two enum values, adding value beyond the schema. However, it does not discuss the 'limit' parameter, so it is not fully compensatory.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it is for sector fund flow ranking, specifies the two kinds (industry/concept), and lists the returned fields (change percentage, main net inflow, leading stock). This distinguishes it from siblings like get_kline or main_fund_rank which are for individual stocks or different rankings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies it is for sector-level flow ranking, but does not explicitly state when to use this tool versus similar tools like main_fund_rank. No when-not-to-use or alternative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
get_kline - First observed
get_stock_quote - First observed
main_fund_rank - First observed
search_stock - First observed
sector_fund_flow
TDQS
Each tool has a clearly distinct purpose: historical data, real-time quote, fund flow ranking, stock search, and sector fund flow. No overlap or ambiguity.
All tool names follow a consistent snake_case verb_noun pattern (e.g., get_kline, search_stock, sector_fund_flow), making them predictable.
5 tools is appropriate for a stock data server. It covers essential functionalities without being excessive or too sparse.
The tool set covers core stock market operations: historical data, real-time quotes, search, and fund flow analysis for stocks and sectors. No obvious gaps for its data-focused purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
Read-only China A-share data for AI agents: market, limit-up, capital flow and disclosures.
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…
China A-share market data for research, backtesting and AI agents via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time quotes, fund flows, and corporate announcements for Chinese A-share stocks. It enables users to search for stocks, analyze financial indicators, and summarize quarterly reports through natural language.-
- 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 gradedqualityDmaintenanceProvides AI assistants with real-time and historical Chinese stock, ETF, index, and futures data via Tushare Pro API, enabling natural language queries for financial analysis and market monitoring.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables users to query Chinese A-share stock data, including stock basics, historical prices, financial reports, and macroeconomic indicators.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/27dream/mcp-eastmoney'
If you have feedback or need assistance with the MCP directory API, please join our Discord server