AKShare

v1.0.0Finance & Fintechstable

A financial data server that provides real-time and historical data for A-shares, Hong Kong, and US markets using the AkShare library. It enables users to query market quotes, fundamental information, and technical indicators through the Model Contex

akshare-mcp-servermcpai-integration
Share:
52
Stars
0
Downloads
0
Weekly
0/5

What is AKShare?

AKShare is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to financial data server that provides real-time and historical data for a-shares, hong kong, and us markets using the akshare library. it enables users to query market quotes, fundamental information, a...

A financial data server that provides real-time and historical data for A-shares, Hong Kong, and US markets using the AkShare library. It enables users to query market quotes, fundamental information, and technical indicators through the Model Contex

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A financial data server that provides real-time and historic

Use Cases

Query real-time and historical data for A-shares, Hong Kong, and US markets. Access market quotes and technical indicators.
ttjslbz001

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 8, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx akshare-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use AKShare

AKShare MCP Server wraps the AKShare Python financial data library in an MCP interface, letting AI assistants query real-time and historical market data for Chinese A-shares, Hong Kong stocks, and US equities through natural conversation. It exposes tools for stock quotes, fund data, bond prices, futures, forex rates, and macroeconomic indicators — all sourced from AKShare's broad data aggregation layer. Analysts and developers use it to pull market data directly into Claude or other MCP clients without writing Python queries manually.

Prerequisites

  • Python 3.10 or higher
  • uv package manager (recommended) or pip
  • Git to clone the repository
  • An MCP-compatible client such as Claude Desktop or Cursor
  • An AKShare API key if your chosen data sources require authentication (most public endpoints do not)
1

Clone the repository

Clone the AKShare MCP server repository from GitHub to your local machine.

git clone https://github.com/ttjslbz001/akshare_mcp_server.git
cd akshare_mcp_server
2

Create a virtual environment

Create and activate a Python virtual environment to isolate dependencies.

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
3

Install dependencies with uv

Install the package and its dependencies. Using uv is recommended for faster installs; pip works equally well.

uv pip install -e .
# or with pip:
pip install -e .
4

Verify the server starts

Run the server directly to confirm the installation is correct before wiring it into your MCP client.

python run_server.py
5

Configure your MCP client

Add the server to your MCP client's configuration file. Replace /path/to/akshare_mcp_server with the absolute path where you cloned the repository. The AKSHARE_API_KEY env var is only needed for data sources that require authentication.

{
  "mcpServers": {
    "akshare-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/akshare_mcp_server",
        "run",
        "akshare-mcp"
      ],
      "env": {
        "AKSHARE_API_KEY": "<your_api_key_if_needed>"
      }
    }
  }
}
6

Restart Claude Desktop and verify connection

Restart your MCP client after saving the configuration. The AKShare tools (stock queries, fund queries, bond queries, etc.) should appear in the available tool list.

AKShare Examples

Client configuration (Claude Desktop)

Full claude_desktop_config.json entry for AKShare MCP server using uv to run from a cloned directory.

{
  "mcpServers": {
    "akshare-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/yourname/akshare_mcp_server",
        "run",
        "akshare-mcp"
      ],
      "env": {
        "AKSHARE_API_KEY": ""
      }
    }
  }
}

Prompts to try

These prompts exercise the main data categories the server supports — stock quotes, fund data, futures, forex, and macroeconomic indicators.

- "Get the latest stock quote for Kweichow Moutai (600519)"
- "Show me the historical daily prices for the Shanghai Composite Index for the past 30 days"
- "What are the top 10 performing mutual funds this month?"
- "Fetch current USD/CNY forex rate"
- "Give me recent macroeconomic data for China's CPI"

Troubleshooting AKShare

Server fails to start with ModuleNotFoundError for akshare

Make sure you activated the virtual environment before running the server, and that 'uv pip install -e .' or 'pip install -e .' completed without errors. Run 'pip show akshare' to confirm the package is installed.

Data queries return empty results or timeout

AKShare fetches data from public Chinese financial data sources that can be rate-limited or temporarily unavailable. Try a different data source function, or add a small delay between rapid queries. Some premium data sources require a valid AKSHARE_API_KEY.

Claude Desktop does not see the server tools

Verify the absolute path in 'args' matches where you cloned the repo. On macOS, uv must be on the system PATH or specified as an absolute path (e.g. /Users/yourname/.local/bin/uv). Check Claude Desktop logs in ~/Library/Logs/Claude for connection errors.

Frequently Asked Questions about AKShare

What is AKShare?

AKShare is a Model Context Protocol (MCP) server that financial data server that provides real-time and historical data for a-shares, hong kong, and us markets using the akshare library. it enables users to query market quotes, fundamental information, and technical indicators through the model contex It connects AI assistants to external tools and data sources through a standardized interface.

How do I install AKShare?

Follow the installation instructions on the AKShare GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with AKShare?

AKShare works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is AKShare free to use?

Yes, AKShare is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "akshare-mcp-server": { "command": "npx", "args": ["-y", "akshare-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use AKShare?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides