Tushare

A Python-based MCP server providing 52 financial data tools across stocks, futures, FX, and more with stdio and HTTP modes.
  • python

39

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can install, configure, and run the Tushare MCP Server to access 52 specialized financial data tools through a Model Context Protocol (MCP) interface. This server aggregates stock, futures, FX, and financial data tools, supports local stdio and remote HTTP modes, and includes smart caching and permission-based access to a wide range of data sources. It is designed for seamless integration with MCP clients and for rapid, multi-tool data queries.

How to use

You interact with the Tushare MCP Server through an MCP client. The server can run in two modes: a local stdio mode for desktop usage and a streamable HTTP mode for debugging or remote access. In both modes, the server provides a standardized set of 52 data tools that let you query stock data, futures data, indices, currencies, financial statements, concept boards, and more. Use the HTTP mode when you need network access and multi-client support; use the stdio mode when you want a tightly integrated local workflow.

How to install

Prerequisites: ensure Python is installed and accessible in your system path. Install the required Python packages for the server.

pip install -r requirements.txt

Additional configuration and usage notes

Token setup: create a .env file in the project root and set your TUSHARE_TOKEN to authorize access to Tushare data sources. For example: TUSHARE_TOKEN=your_token_here.

Running in stdio mode (recommended for Claude Desktop): configure your MCP client to launch the server as a local stdio process. The runtime command is shown here in a representative configuration snippet.

{
  "mcpServers": {
    "tushare": {
      "command": "python",
      "args": ["D:/AI/tushare_MCP/server.py"]
    }
  }
}

Notes on the HTTP mode and local vs remote usage

If you prefer remote access or debugging with network clients, you can start an HTTP server and configure the MCP client to connect via a URL. Example startup commands are provided for both Windows and Unix-like systems, and you will reference the HTTP server in the MCP client configuration.

# Windows
start_http_server.bat

# Linux/macOS
chmod +x start_http_server.sh
./start_http_server.sh

Available tools

analyze_sector_alpha_strategy

Alpha analysis for a sector to compute relative strength and composite score by calculating 2-day and 5-day Alpha and combining them for ranking.

rank_sectors_by_alpha

Rank sectors by Alpha across the top N by a chosen benchmark, showing the strongest sectors.

rank_l2_sectors_by_alpha

Rank secondary sector groups by Alpha using the same benchmark and end date parameters.

rank_l1_sectors_alpha_full

Provide a complete ranking of first-level sectors by Alpha with a defined benchmark.

rank_l1_sectors_alpha_velocity

Analyze the velocity of Alpha rankings for first-level sectors to identify rising trends.

rank_l2_sectors_alpha_velocity

Analyze the velocity of Alpha rankings for second-level sectors to identify rising trends.

get_stock_basic_info

Fetch basic stock information such as code, name, listing date, and industry.

search_stocks

Search for stocks by partial code or name with fuzzy matching.

get_stock_daily

Retrieve A-share daily bar data including open, close, high, low, and volume.

get_stock_weekly

Retrieve A-share weekly bar data for multiple stocks.

get_stock_min

Fetch real-time or replayed minute-level stock data with multiple frequencies.

get_stock_rt_k

Get real-time daily K-line data for Shanghai/Shenzhen/Beijing Stock Exchange unified tick data.

get_etf_daily

Get daily ETF price data for one or more ETFs.

get_index_daily

Fetch daily index data for major A-share indices.

get_share_float

Retrieve restrictions-free release data for tradable shares.

get_stock_repurchase

Get data on stock repurchases by listed companies.

get_pledge_detail

Fetch details of stock pledge by shareholders.

get_block_trade

Obtain block trade data including price, volume, and counterparties.

scan_announcement_signals

Scan company announcements for major positive or negative signals.

get_stock_holder_trade

Get data on shareholder trades and changes in holdings.

get_stock_holder_number

Retrieve counts of stockholders over time.

get_stock_survey

Obtain institutional investor research records.

get_cyq_perf

Daily chip cost and win rate analysis with concentration metrics.

get_margin

Fetch margin financing and securities lending summary by exchange.

get_margin_detail

Fetch margin financing and securities lending details by stock.

get_stock_moneyflow_dc

Get large-cap stock money flow data from 东方财富 source.

get_daily_basic

Retrieve daily fundamental indicators like valuation, turnover, and market cap.

get_top_list

Get daily list of institutional trading activity on the Dragon and Tiger list.

get_top_inst

Fetch institutional transaction details from the Dragon and Tiger list.

get_eastmoney_concept_board

Fetch Eastmoney concept board data including performance and leading stocks.

get_eastmoney_concept_member

Fetch daily component stocks for Eastmoney concept boards.

get_eastmoney_concept_daily

Fetch Eastmoney concept and industry board data with optional indexing.

analyze_concept_alpha_strategy

Analyze Alpha for a single Eastmoney concept board relative to a benchmark.

rank_concepts_by_alpha

Rank Eastmoney concepts by Alpha with hotspot filtering.

rank_concepts_alpha_velocity

Analyze the velocity of Alpha rankings for concepts.

get_concept_moneyflow_dc

Fetch money flow data for Eastmoney concept boards or sectors.

scan_concepts_volume_anomaly

Analyze concept board volume anomalies and return JSON results.

get_concept_moneyflow_dc

Fetch money flow data for Eastmoney concept boards or sectors.

get_concept_moneyflow_dc

Fetch money flow data for Eastmoney concept boards or sectors.

get_concept_moneyflow_dc

Fetch money flow data for Eastmoney concept boards or sectors.

get_concept_moneyflow_dc

Fetch money flow data for Eastmoney concept boards or sectors.

get_concept_moneyflow_dc

Fetch money flow data for Eastmoney concept boards or sectors.

scan_l2_volume_anomaly

Scan Sw industry volume anomalies and generate signals indicating Distribution, Accumulation, or Uncertain.

get_cache_stats

Provide statistics about cached data, including counts and access numbers.

get_global_index

Fetch international index data from global markets.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational