home / mcp / tushare mcp server

Tushare MCP Server

Provides MCP-enabled access to Tushare financial data via HTTP and local streams for AI assistants.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "buuzzy-tushare_mcp": {
      "url": "https://stock-mcp.pricetrade.top/mcp",
      "headers": {
        "TUSHARE_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

You can use the Tushare MCP Server to connect AI assistants with comprehensive A-share financial data through the MCP protocol. It exposes stock, fund, and finance data via HTTP and local stdio modes, enabling seamless querying and data-driven AI interactions.

How to use

You access the MCP server using either an HTTP endpoint or a local stdio configuration. The HTTP option is designed for remote clients like Cursor or Claude Desktop with Streamable HTTP support. The stdio option is for local integration where the AI runs on the same machine.

How to install

Prerequisites: you need Python 3.10 or newer.

# 1. Clone the project
git clone <repository-url> tushare_mcp
cd tushare_mcp

# 2. Create a virtual environment
python3 -m venv venv
source venv/bin/activate  # macOS/Linux
# venv\\Scripts\\activate   # Windows

# 3. Install dependencies
pip install -r requirements.txt

Configuration and running

Configure your environment to provide your token when needed. You can place the token in a configuration file or rely on the MCP tooling to set it.

Available tools

get_stock_basic

Fetches the A-share basic information list including code, name, and listing date.

get_trade_cal

Retrieves the trading calendar for major exchanges.

get_stock_company

Obtains basic information about listed companies (registered capital, legal person, overview).

get_namechange

Returns historical name change records for companies.

get_stk_managers

Provides key members of a company's management.

get_daily

Delivers daily A-share price data (open, high, low, close, volume).

get_weekly

Provides weekly price data.

get_monthly

Provides monthly price data.

get_daily_basic

Gives daily indicators such as turnover, PE, PB, and market cap.

get_suspend_d

Daily suspension and resumption information.

get_hsgt_top10

Top ten stocks transferred via Shanghai-Hong Kong and Shenzhen-Hong Kong connect.

get_income_statement

Profit and loss statement data.

get_balance_sheet

Balance sheet data.

get_cash_flow

Cash flow statement data.

get_forecast

Forecast of upcoming earnings results.

get_express

Express performance brief for earnings.

get_fina_indicator

Financial indicators such as EPS, ROE, gross margin.

get_fina_mainbz

Composition of main business.

get_disclosure_date

Dates for financial disclosures.

etf_basic

Basic information for domestic ETFs.

etf_index

ETF indexes tracked or associated with ETFs.

etf_share_size

Daily ETF share size and total market.

fund_basic

Public fund data, including on-exchange and off-exchange funds.

fund_company

Public fund management company directory.

fund_manager

Fund managers directory and resumes.

fund_share

Size and share history for public funds.

fund_daily

Daily行情 for on-exchange funds and ETFs.

fund_adj

Fund adjustment factors (adjusted prices).

fund_nav

Net asset value history for public funds.

fund_div

Dividend history for funds.

fund_portfolio

Top ten holdings for public funds.

fund_factor_pro

Technical factor data for funds (MACD/RSI, etc.).

stk_mins

Minute-level行情 for ETFs/stocks.