akshare-jc-mcp
akshare-jc-mcp
Unified MCP server for Chinese stock (A-share) market data.
Why akshare-jc-mcp?
痛点 | 本项目的解决方式 |
多个工具各自独立,LLM要调4-7次才能凑齐数据 | 单个 |
akshare 某些接口不稳定(东方财富断连、概念板块查不到) | 直连 push2delay API + fallback 机制,不依赖 akshare 不稳定接口 |
新闻只有摘要片段,没有正文 | 自动抓取全文,返回完整文章内容 |
技术指标要自己算,代码容易写错 | 服务端预计算 KDJ/MACD/RSI/BOLL/SMA,默认即带回 |
月K/年K数据量过大(336条→150KB)导致 MCP 传输截断 | 按 interval 独立截断:日K默认120条、月K 36条、年K 10条,payload 可控 |
限售解禁和增发数据分散,解禁成本靠猜 | 自动匹配增发数据,按锁定期计算参考增发价 |
Related MCP server: sfc-data-mcp
Install
pip install git+https://github.com/bzetu/akshare-jc-mcpOr for development:
git clone https://github.com/bzetu/akshare-jc-mcp
cd akshare-jc-mcp
pip install -e .MCP Configuration
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"akshare-jc": {
"command": "python3.13",
"args": ["-m", "akshare_jc_mcp"]
}
}
}Requires Python 3.10+ and a working akshare installation (auto-installed as dependency).
Tool: get_data
Parameters
Parameter | Type | Required | Default | Description |
|
| Yes | — | Stock code (e.g. |
|
| Yes | — | List of data features to fetch |
|
| No | 10 | Number of recent news records |
|
| No | 3 | Number of recent financial statement periods |
|
| No |
| K-line interval: |
|
| No |
| Technical indicators for hist_data |
|
| No | 120 | Number of daily K-line bars to return |
|
| No | 36 | Number of monthly K-line bars to return |
|
| No | 10 | Number of yearly K-line bars to return |
Features
Feature | Description | Data Source |
| Recent news with full article text (no URLs) | East Money |
| Insider trading / block trade records | 雪球 |
| Key financial metrics by reporting period | 同花顺 |
| Daily fund flow (main force / super-large / large / medium / small orders) | East Money push API |
| Concept board tags belonging to the stock | East Money push2delay |
| North-bound / South-bound capital flow summary | East Money |
| K-line data with optional technical indicators. Supports | akshare (腾讯) |
| Real-time snap quote | 腾讯 |
| Current system time + last trading day | Sina + local |
| Restricted share unlock schedule (date, volume, ratio) | East Money |
| Additional issuance / private placement history | East Money |
Typical Usage
消息面+基本面查询(一次性获取全部):
get_data(symbol="600733", features=["news", "inner_trade", "financial", "fund_flow", "concept", "hsgt_summary"], news_recent_n=10, recent_n=3)日K技术分析(默认120条,约6个月):
get_data(symbol="600733", features=["hist_data", "realtime"], hist_interval="day", hist_day_n=120, hist_indicators=["KDJ","MACD","RSI","BOLL","SMA"])月K长线趋势(默认36个月=3年):
get_data(symbol="600733", features=["hist_data", "realtime"], hist_interval="month", hist_month_n=36, hist_indicators=["KDJ","MACD","RSI","BOLL","SMA"])年K超长线(默认10年):
get_data(symbol="600733", features=["hist_data", "realtime"], hist_interval="year", hist_year_n=10, hist_indicators=["KDJ","MACD","RSI","BOLL","SMA"])1分钟K盘中超短线(仅交易时段有数据,全天最多480条):
get_data(symbol="600733", features=["hist_data", "realtime"], hist_interval="1min", hist_indicators=["KDJ","MACD","RSI","BOLL","SMA"])限售解禁+增发数据(计算解禁成本):
get_data(symbol="600733", features=["restricted_release", "additional_issuance"])Response Format
JSON array, one entry per feature:
[
{"feature": "news", "data": [...], "error": false, "error_reason": null},
{"feature": "fund_flow", "data": [...], "error": false, "error_reason": null},
...
]error: true means the feature failed — LLM should fall back to web search or inform the user.
Design & Reliability
Problems Solved
Problem | Solution |
LLM makes 4-7 tool calls per request (news + insider_trade + financial + balance_sheet + ...) | Single |
akshare | Rewrote with direct |
akshare concurrent calls trigger eastmoney | Shared |
akshare |
|
Sina financial statements (balance_sheet / income_statement / cash_flow) were too large (~18-26KB each) and semantically duplicate with | Removed; |
LLM was seeing news URLs and trying to fetch them manually |
|
Reliability
All HTTP calls share a single requests.Session to minimize connection overhead. Features that depend on eastmoney APIs fall back to alternative endpoints (push2delay when push2/push2his are unavailable). Total 6-feature fetch (news+inner_trade+financial+fund_flow+concept+hsgt_summary) completes in 2-3s (~15KB).
Development
pip install -e .
python -c "from akshare_jc_mcp.server import mcp; print(mcp.name)"License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/bzetu/akshare-jc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server