← Back to AkShare MCP

Install AkShare MCP

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add --transport sse akshare-mcp http://127.0.0.1:8005/sse

Environment Variables

Set these before running AkShare MCP.

VariableDescriptionRequired
HOSTServer host addressNo
PORTServer port numberNo
TRANSPORTTransport protocol (e.g., sse)No

Available Tools (3)

Once configured, AkShare MCP gives your AI agent access to:

stock_us_histGet historical US stock market data with support for different periods and adjustment types.
symbolperiodstart_dateend_dateadjust
stock_hk_histGet historical Hong Kong stock market data with support for different periods and adjustment types.
symbolperiodstart_dateend_dateadjust
stock_zh_a_histGet historical A-share market data for Shanghai, Shenzhen, and Beijing exchanges.
symbolperiodstart_dateend_dateadjust

Try It Out

After setup, try these prompts with your AI agent:

Get the daily historical stock data for Apple (AAPL) from January 1, 2024 to February 14, 2024 using front-adjusted prices.
Retrieve the historical market data for Tencent Holdings (00700) in Hong Kong for the last month.
Fetch the A-share historical data for Ping An Bank (000001) from the start of 2024 to May 2024.
Compare the performance of AAPL using different adjustment types like front-adjusted versus unadjusted.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Python 3.8+ with pip installed
Alternative installation methods

Run Server

python akshare_mcp_server.py

Keep this setup from going cold

Save the docs, env vars, and workflow around AkShare MCP in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup