tushare-mcp-server
Allows GitHub Copilot to access comprehensive Chinese financial market data via Tushare Pro API, enabling queries on A-shares, indices, funds, and more.
tushare-mcp-server
中文文档 | English
A Model Context Protocol (MCP) server for Tushare Pro financial data API. Provides AI assistants (GitHub Copilot, Claude, etc.) with direct access to comprehensive Chinese financial market data — covering A-shares, indices, funds, futures, options, bonds, forex, HK/US stocks, and macroeconomic indicators.
Features
Universal Query —
tushare_querycalls any of the 173 Tushare Pro APIs15 Convenience Tools — Pre-built tools for stocks, indices, financials, funds, and more
Built-in Documentation —
get_api_doc/search_api_docsfor API parameter lookupCategorized Index — 173 APIs organized into 18 categories
Data Coverage
Category | # | Examples |
A-Shares | 37 | stock_basic, daily, weekly, monthly, daily_basic, adj_factor, pro_bar |
Financials | 9 | income, balancesheet, cashflow, fina_indicator, forecast |
Market Reference | 23 | margin, top_list, block_trade, hsgt_top10, pledge_stat |
Indices | 13 | index_basic, index_daily, index_weight, sw_daily, ci_daily |
Money Flow | 8 | moneyflow, moneyflow_hsgt, moneyflow_ind_ths |
Funds | 14 | fund_basic, fund_nav, fund_daily, etf_basic, fund_portfolio |
Futures | 8 | fut_basic, fut_daily, fut_holding, fut_mapping |
Options | 3 | opt_basic, opt_daily, opt_mins |
Bonds / CB | 9 | cb_basic, cb_daily, cb_issue, repo_daily, yc_cb |
HK Stocks | 9 | hk_basic, hk_daily, hk_income, hk_balancesheet |
US Stocks | 8 | us_basic, us_daily, us_income, us_balancesheet |
Macro Economy | 14 | shibor, cn_gdp, cn_cpi, cn_ppi, cn_pmi, libor |
Sector / Concept | 5 | ths_index, ths_daily, dc_index, dc_member |
Others | 13 | fx_daily, sge_daily, news, trade_cal, etc. |
Related MCP server: a-share-mcp
Prerequisites
Python 3.10+
A Tushare Pro account and API token
Quick Start
Install via npx (recommended)
No installation needed — just configure your MCP client:
{
"servers": {
"tushare": {
"type": "stdio",
"command": "npx",
"args": ["-y", "tushare-mcp-server"],
"env": { "TUSHARE_TOKEN": "your_token_here" }
}
}
}Install from source
git clone https://github.com/erwanjun/tushare-mcp-server.git
cd tushare-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install mcp httpxConfiguration
Tushare Token
Set your token via any of these methods:
.envfile (recommended) — create.envin the project root:TUSHARE_TOKEN=your_token_hereEnvironment variable —
export TUSHARE_TOKEN=your_tokenMCP client config — pass via the
envfield (see examples below)
VS Code (GitHub Copilot)
.vscode/mcp.json:
{
"servers": {
"tushare": {
"type": "stdio",
"command": "npx",
"args": ["-y", "tushare-mcp-server"],
"env": { "TUSHARE_TOKEN": "your_token_here" }
}
}
}Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"tushare": {
"command": "npx",
"args": ["-y", "tushare-mcp-server"],
"env": { "TUSHARE_TOKEN": "your_token_here" }
}
}
}Tools
Tool | Description |
| Universal query — call any Tushare Pro API |
| A-share stock list |
| Trading calendar |
| Daily OHLCV (unadjusted) |
| Daily indicators: PE, PB, market cap, turnover |
| Income statement |
| Balance sheet |
| Cash flow statement |
| Financial indicators (ROE, ROA, margins) |
| Index daily bars |
| Stock money flow |
| Concept / sector classification |
| Concept constituents |
| Fund list |
| Fund NAV |
| Shibor interest rates |
| Full API documentation by endpoint name |
| Search API docs by keyword |
Development
# Re-crawl Tushare documentation
python crawl_docs.py
# Rebuild API index
python build_index.pyLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
China A-share data for AI agents: 57 read-only tools plus 6 tools for your own watchlist.
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…
China A-share market data for research, backtesting and AI agents via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with real-time and historical Chinese stock, ETF, index, and futures data via Tushare Pro API, enabling natural language queries for financial analysis and market monitoring.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables users to query Chinese A-share stock data, including stock basics, historical prices, financial reports, and macroeconomic indicators.1MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to access comprehensive Chinese financial market data including stocks, funds, futures, and economic indicators via AKShare.55MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to query real-time A-share stock data, including quotes, fund flows, sector flows, and K-line history, without needing an API key.519MIT