Get the FREE Ultimate OpenClaw Setup Guide →

akshare

An AKShare-based financial data MCP (Model Context Protocol) server that equips AI assistants with powerful access to financial datasets. 最懂 A 股的 MCP——AkShare-MCP-Server!

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jadenmong-akshare-mcp-server node src/server.js

How to use

This MCP server provides access to AKShare-backed financial data through a standardized MCP interface. The HTTP-based version (recommended) runs without requiring a local Python AKShare installation, while a Python-enabled version is also available for more comprehensive data. You can query stock data (historical, real-time, and list), fund data, futures (Python version only), and macroeconomic indicators (Python version only) using a consistent toolset across HTTP and Python variants. The server exposes a set of tools that map to AKShare functions, allowing AI assistants or clients to request data by tool name and arguments, and receive standardized responses suitable for downstream processing.

To use it, start the server with the provided npm scripts, then send requests through the MCP channel (e.g., Claude Desktop integration or your own client) using the available tool names such as get_stock_historical_data, get_stock_realtime_data, get_stock_list, get_fund_list, get_fund_info, get_futures_info (Python version only), and get_economic_data (Python version only). The HTTP version ensures quick deployment with no Python dependencies, while the Python version yields broader data coverage at the cost of requiring a Python environment and AKShare installation.

How to install

Prerequisites:

  • Node.js v18.0.0 or higher
  • Git
  • (Optional) Python 3.8 or higher if you plan to use the Python version of the server

Installation steps:

  1. Clone the repository git clone https://github.com/jadenmong/akshare-mcp-server.git cd akshare-mcp-server

  2. Install Node.js dependencies npm install

  3. Start the server

    • HTTP version (recommended, no Python dependencies): npm start
    • Python version (requires Python and AKShare): npm run start:python
  4. Verify the server is running by checking the console output or hitting a test endpoint as documented in the project.

Prerequisites recap:

  • Ensure Node.js >= 18 is installed on your machine.
  • If you opt for the Python version, ensure Python >= 3.8 and AKShare are installable in your environment.

Additional notes

Tips and notes:

  • The HTTP version avoids Python dependencies and uses AKShare via HTTP endpoints; the Python version fetches data directly through the AKShare library.
  • If using Claude Desktop integration, configure the MCP server with the Node.js path to src/server.js as shown in the example config.
  • Common issues include Node.js version mismatches, Python dependency installation failures, and misconfigured server paths. Check your Node and Python environments, verify the server.js path, and ensure network access when retrieving data from AKShare.
  • For debugging, you can run npm start with verbose logging (e.g., DEBUG=akshare:* npm start) to surface detailed logs.
  • Environment variables can be added under the env section of the MCP configuration to tailor runtime behavior (e.g., port or API keys if extended).

Related MCP Servers

Sponsor this space

Reach thousands of developers