LabscoMCP early access ↗
RusianHuMCP SERVER

Ashare-MCP

Fetch A-share price bars — minute through monthly — for Shanghai and Shenzhen tickers, with Sina and Tencent as interchangeable data sources.

by RusianHu ↗Equity & Fund Market DataCommunity

LABSCO 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 sh000001 or the JoinQuant form 000001.XSHG
  • History anchored to a date: pass end_date as YYYY-MM-DD and count to walk back from it, instead of only getting the latest bars
  • A fields list 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