Ashare MCP Server

Ashare-MCP 是一个基于 [mpquant/Ashare](https://github.com/mpquant/Ashare) 的股票行情数据服务,通过 MCP (Model Context Protocol) 提供 A 股市场的行情数据查询功能。

Local serverstdioPython

What is the Ashare MCP MCP server?

Connect Ashare MCP to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Ashare-MCP 是一个基于 mpquant/Ashare 的股票行情数据服务,通过 MCP (Model Context Protocol) 提供 A 股市场的行情数据查询功能。. The ashare mcp mcp server is what makes that connection.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • pandas — requests
  • code — 证券代码,如'sh000001'或'000001.XSHG'
  • end_date — 结束日期,格式为'YYYY-MM-DD'
  • count — 获取的K线数量
  • frequency — K线周期,可选值:'1m', '5m', '15m', '30m', '60m', '1d', '1w', '1M'
  • fields — 返回字段列表

Installation

git on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Ashare MCP's toolset — pandas, code, end_date and 3 more — is a fair guide to whether it matches your workflow. It is maintained by RusianHu; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
pandasrequests
code证券代码,如'sh000001'或'000001.XSHG'
end_date结束日期,格式为'YYYY-MM-DD'
count获取的K线数量
frequencyK线周期,可选值:'1m', '5m', '15m', '30m', '60m', '1d', '1w', '1M'
fields返回字段列表

How to install the Ashare MCP MCP server

{
  "mcpServers": {
    "ashare": {
      "command": "uvx",
      "args": ["git"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Ashare MCP to pandas.
  • Use Ashare MCP to code.
  • Use Ashare MCP to end date.

Frequently asked questions

It connects Ashare MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (pandas, code, end_date, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Ashare MCP directly.