AKShare Chinese Stock Market MCP server

Provides access to Chinese stock market data including historical prices, real-time information, financial statements, and news from sources like Eastmoney, Sina, and Xueqiu.
Back to servers
Setup instructions
Provider
zwldarren
Release date
Apr 08, 2025
Stats
24 stars

AKShare One MCP Server is a service that provides interfaces for accessing China stock market data. It offers tools for retrieving various financial information including historical stock data, real-time data, news, and financial statements through a standardized Model Context Protocol (MCP) interface.

Installation Options

Installing via Smithery

The easiest way to install akshare-one-mcp for Claude Desktop is automatically via Smithery:

npx -y @smithery/cli install @zwldarren/akshare-one-mcp --client claude

Installing via uv

You can install directly from PyPI using uv:

uv pip install akshare-one-mcp

Then add the following configuration:

"mcpServers": {
    "akshare-one-mcp": {
        "command": "uvx",
        "args": ["akshare-one-mcp"]
    }
}

Installing from Source Code

  1. Clone the repository:
git clone https://github.com/zwldarren/akshare-one-mcp.git
cd akshare-one-mcp
  1. Install dependencies using uv:
uv sync
  1. Add the following configuration:
"mcpServers": {
    "akshare-one-mcp": {
        "command": "uv",
        "args": [
            "--directory",
            "/path/to/akshare-one-mcp",
            "run",
            "akshare-one-mcp"
        ]
    }
}

Available Tools

Historical Stock Data

Get historical market data using the get_hist_data tool:

{
  "symbol": "000001",
  "interval": "day",
  "interval_multiplier": 1,
  "start_date": "2023-01-01",
  "end_date": "2023-01-31",
  "adjust": "qfq",
  "source": "eastmoney",
  "indicators_list": ["SMA", "RSI"],
  "recent_n": 20
}

Parameters:

  • symbol (string): Stock code (e.g., '000001')
  • interval (string): Time interval ('minute','hour','day','week','month','year') - default: 'day'
  • interval_multiplier (number): Interval multiplier - default: 1
  • start_date (string): Start date in YYYY-MM-DD format - default: '1970-01-01'
  • end_date (string): End date in YYYY-MM-DD format - default: '2030-12-31'
  • adjust (string): Adjustment type ('none', 'qfq', 'hfq') - default: 'none'
  • source (string): Data source ('eastmoney', 'eastmoney_direct', 'sina') - default: 'eastmoney'
  • indicators_list (list): Technical indicators to add
  • recent_n (number): Number of most recent records to return - default: 100

Real-time Stock Data

Get real-time stock information using the get_realtime_data tool:

{
  "symbol": "000001",
  "source": "xueqiu"
}

Parameters:

  • symbol (string): Stock code
  • source (string): Data source ('xueqiu', 'eastmoney_direct') - default: 'xueqiu'

News Data

Retrieve stock-related news using the get_news_data tool:

{
  "symbol": "000001",
  "recent_n": 5
}

Parameters:

  • symbol (string): Stock code
  • recent_n (number): Number of most recent news items to return

Financial Statements

Balance Sheet

Get company balance sheet data using the get_balance_sheet tool:

{
  "symbol": "000001",
  "recent_n": 4
}

Income Statement

Get company income statement using the get_income_statement tool:

{
  "symbol": "000001",
  "recent_n": 4
}

Cash Flow Statement

Get company cash flow data using the get_cash_flow tool:

{
  "symbol": "000001",
  "source": "sina"
}

Other Tools

Insider Trading Data

Get company insider trading information using the get_inner_trade_data tool:

{
  "symbol": "000001"
}

Time Information

Get current time information using the get_time_info tool, which returns the current time in ISO format, timestamp, and the last trading day.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "akshare-one-mcp" '{"command":"uvx","args":["akshare-one-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "akshare-one-mcp": {
            "command": "uvx",
            "args": [
                "akshare-one-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "akshare-one-mcp": {
            "command": "uvx",
            "args": [
                "akshare-one-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later