ashareport
ashareport
ashareport exposes nine A-share (China mainland) stock-data tools — history, realtime quotes, news, balance sheet, income statement, cash flow, inner trades, and financial metrics, plus a local time tool — as a command line program and as a stdio MCP server.
How the data tools work (read this first)
The original design runs a Python market-data library in-process. This TypeScript rebuild uses an endpoint executor instead: set
export ASHAREPORT_API_URL="https://your-data-endpoint.example"and each data tool POSTs JSON {tool, source, params} to
{ASHAREPORT_API_URL}/<tool> and returns the endpoint's JSON answer.
With the variable unset, data tools return an error:
upstream data endpoint not configured: set ASHAREPORT_API_URL ....
get_time_info is fully local and needs no endpoint.
Source fallback is implemented locally, in the documented order:
Domain | Source order |
historical | eastmoney → eastmoney_direct → sina → ths |
realtime | eastmoney_direct → eastmoney → xueqiu → ths (xueqiu/ths skipped when no symbol is given) |
news | eastmoney → ths |
statements / metrics | sina → eastmoney_direct |
The requested source is tried first, then the domain order when
fallback is not false, stopping at the first non-empty result. If
every source fails, the error lists each source and its error.
Defaults: interval day, adjust none, recent_n 100 for
historical data and 10 for the other recent-N tools.
indicators_list is passed through to the endpoint, not computed
locally. get_time_info walks back from today skipping Saturday and
Sunday to find the last trading day; exchange holidays are not
modelled.
Related MCP server: ashare-mcp
Install
npx @reneturcios/ashareport get_time_info
docker run -i ghcr.io/cloudcorprecords/ashareport # MCP serverCLI
ashareport get_hist_data --symbol 600519 --interval day --recent-n 20
ashareport get_realtime_data --symbol 600519
ashareport get_realtime_data # market-wide, symbol optional
ashareport get_news_data --symbol 600519
ashareport get_balance_sheet --symbol 600519
ashareport get_income_statement --symbol 600519
ashareport get_cash_flow --symbol 600519
ashareport get_inner_trade_data --symbol 600519
ashareport get_financial_metrics --symbol 600519
ashareport get_time_info
ashareport --versionExit codes: 0 success, 1 tool error, 2 usage error.
MCP server
npx -y @reneturcios/ashareport mcp{
"mcpServers": {
"ashareport": {
"command": "npx",
"args": ["-y", "@reneturcios/ashareport", "mcp"],
"env": { "ASHAREPORT_API_URL": "https://your-data-endpoint.example" }
}
}
}Tools
Tool | Required | Other parameters |
|
|
|
| — ( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| — |
|
|
|
| — | — (local: ISO time, Unix timestamp, last trading day) |
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner, fake-fetch only, no network
npm run dev # run the CLI from source via tsxLicense
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for real-time China A-share stock quotes, indices and market data.
China A-share market data over MCP: 22 tools for quotes, K-line, financials, money flow, top-trader boards, sectors, macro, convertible bonds and factor screening. Five tools need no API key, so you can connect and try it immediately.
China A-share & equity research MCP server (回声投研) for market quotes, filings, financials, fund flows, concepts & sentiment.
China A-share market data for research, backtesting and AI agents via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenance基于Model Context Protocol (MCP) 的A股实时行情查询服务器,支持查询A股实时价格、历史K线数据、财务信息及市场概况。8MIT
- AlicenseNot gradedqualityDmaintenanceProduction-grade MCP server for Chinese A-share market data, offering 30 tools including real-time quotes, K-lines, fund flows, and financial reports, with stdio and HTTP transport support.10MIT
- AlicenseAqualityDmaintenanceProvides access to Chinese A-share market financial data, including historical K-line, real-time quotes, financial statements, shareholder information, and technical indicators, via MCP protocol.123MIT
- AlicenseNot gradedqualityCmaintenanceProvides read-only access to Chinese A-share stock market data such as quotes, K-lines, financials, capital flows, news, and research reports via a stdio MCP server for DeepSeek Harness and other MCP clients.2GPL 3.0