tushare-mcp-server
Provides AI assistants with access to Chinese financial market data via the Tushare Pro API, covering stocks, indices, funds, futures, options, bonds, forex, and macroeconomic indicators.
README
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 APIs - 15 Convenience Tools — Pre-built tools for stocks, indices, financials, funds, and more
- Built-in Documentation —
get_api_doc/search_api_docsfor API parameter lookup - Categorized 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. |
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 httpx
Configuration
Tushare Token
Set your token via any of these methods:
.envfile (recommended) — create.envin the project root:TUSHARE_TOKEN=your_token_here- Environment variable —
export TUSHARE_TOKEN=your_token - MCP 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 |
|---|---|
tushare_query |
Universal query — call any Tushare Pro API |
get_stock_list |
A-share stock list |
get_trade_calendar |
Trading calendar |
get_daily_bars |
Daily OHLCV (unadjusted) |
get_daily_basic |
Daily indicators: PE, PB, market cap, turnover |
get_income |
Income statement |
get_balancesheet |
Balance sheet |
get_cashflow |
Cash flow statement |
get_fina_indicator |
Financial indicators (ROE, ROA, margins) |
get_index_daily |
Index daily bars |
get_moneyflow |
Stock money flow |
get_concept |
Concept / sector classification |
get_concept_detail |
Concept constituents |
get_fund_basic |
Fund list |
get_fund_nav |
Fund NAV |
get_shibor |
Shibor interest rates |
get_api_doc |
Full API documentation by endpoint name |
search_api_docs |
Search API docs by keyword |
Development
# Re-crawl Tushare documentation
python crawl_docs.py
# Rebuild API index
python build_index.py
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。