Skip to main content
Glama
27dream

mcp-eastmoney

by 27dream

mcp-eastmoney

🇨🇳 让 Claude / Cursor / Codex 等 MCP 客户端直接查询 A 股实时数据 — 免 API Key、开箱即用

Python 3.10+ License: MIT MCP

English | 中文


中文

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 + uvuvx mcp-eastmoney 一键运行

🛠️ 提供的 Tools

Tool

说明

示例

get_stock_quote

获取实时行情(价格、涨跌、成交量、PE、换手率)

get_stock_quote(code="300750")

search_stock

按关键词/拼音/代码搜索股票

search_stock(keyword="宁德")

main_fund_rank

主力资金净流入排名(超大单/大单/中单/小单)

main_fund_rank(market="all", limit=10)

sector_fund_flow

行业/概念板块资金流向 + 领涨股

sector_fund_flow(kind="industry", limit=10)

get_kline

历史 K 线(日/周/月线,前复权)

get_kline(code="600519", period="daily", count=30)

🚀 快速开始

1. 通过 uvx 安装(推荐)

uvx mcp-eastmoney

2. 通过 pip 安装

pip install mcp-eastmoney
mcp-eastmoney

3. 接入 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):

  1. 有色金属:+144.09亿(领涨股 金钼股份 +10.0%)

  2. 电力设备:+91.76亿(领涨股 宁德时代)

  3. 工业金属:+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

get_stock_quote

Real-time quote (price, change, volume, PE, turnover)

search_stock

Search by keyword / pinyin / code

main_fund_rank

Main capital net inflow ranking (super-large / large / medium / small orders)

sector_fund_flow

Industry / concept sector capital flow with leading stocks

get_kline

Historical OHLCV (daily / weekly / monthly, forward-adjusted)

🚀 Quick Start

Install with uvx:

uvx mcp-eastmoney

Add 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 tools
get_klineB

获取个股K线数据(日/周/月/分钟级)。Historical K-line data — daily, weekly, monthly, or intraday (5/15/30/60 min). 用于趋势分析、回测、技术指标计算。

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes6位股票代码
periodNodaily
limitNo

TDQS

B3.3/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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分钟。

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes6位股票代码,如 600519(贵州茅台)、300750(宁德时代)

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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(科创板)。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
marketNoall

TDQS

B3.1/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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').

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordYes搜索关键词
limitNo

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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(概念)。返回涨跌幅、主力净流入、领涨股。

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNoindustry
limitNo

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

  1. 5 tool updatesv0.1.0
    • First observedget_kline
    • First observedget_stock_quote
    • First observedmain_fund_rank
    • First observedsearch_stock
    • First observedsector_fund_flow

TDQS

A3.8/5.0
Disambiguation5/5

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.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern (e.g., get_kline, search_stock, sector_fund_flow), making them predictable.

Tool Count5/5

5 tools is appropriate for a stock data server. It covers essential functionalities without being excessive or too sparse.

Completeness5/5

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

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Real-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.
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables users to query Chinese A-share stock data, including stock basics, historical prices, financial reports, and macroeconomic indicators.
    1
    MIT

Latest Blog Posts

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