get_priceLABSCO SUMMARY
One tool, eight intervals, no signup.
This is a thin, honest wrapper: a single get_price call covering intraday minutes through monthly bars for the Chinese A-share market, with no credential to obtain and two sources behind it for resilience. If you need fundamentals, orders or anything outside price history, it is not here.
What it is
An MCP server over the Ashare market-data library that answers one question well: give me the last N candles for this Chinese A-share ticker. It accepts both common code formats and falls back between two upstream feeds, Sina Finance and Tencent Finance, so a single flaky source does not end the query.
What you get
- Price bars for a ticker at any of eight intervals —
1m,5m,15m,30m,60m,1d,1w,1M— returned with the code, the data and a processing message —get_price - Either code convention accepted: the TDX form
sh000001or the JoinQuant form000001.XSHG - History anchored to a date: pass
end_dateasYYYY-MM-DDandcountto walk back from it, instead of only getting the latest bars - A
fieldslist to trim the returned columns when you only need close or volume
Requirements
No account and no key — the two upstream feeds are public. Python 3.8 or newer, installed straight from the repository with pip install git+https://github.com/RusianHu/Ashare-mcp.git; the README also gives the proxy form of that command for networks that need one. Run it as python -m ashare_mcp over stdio, or fastmcp serve ashare_mcp for HTTP. Defaults are count 10 and frequency 1d, so an unqualified call returns ten daily bars.
Setup effort
One command — pip install git+https://github.com/RusianHu/Ashare-mcp.git
USE CASES
Pulling recent index levels into an analysis
Ask for the last few daily bars of an index by its TDX code and get back structured data rather than a scraped page.
Looking at a stock around a specific date
Set end_date to the day you care about and count to how far back you want, so the window ends where your question does.
Checking intraday movement
Switch frequency to 15m or 5m for the same ticker to see how a session actually developed instead of one closing print.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation. The documentation's example code calls get_price_ashare_mcp rather than get_price.
Requires
python on PATH
INSTALLATION
Connect your client
Add the block to your client, or run the command directly.
Server setup
Configuration file
{
"mcpServers": {
"ashare-mcp": {
"command": "python",
"args": [
"-m",
"ashare_mcp"
],
"alwaysAllow": [
"get_price"
],
"disabled": false
}
}
}pip
pip install git+https://github.com/RusianHu/Ashare-mcp.git