setup_tushare_tokenLABSCO SUMMARY
The batch rewrite is a small thing that fixes a real failure.
Models naturally ask for several codes at once, and the upstream fund endpoints do not accept that — so the server intercepts comma-separated lists, issues the requests one at a time, and stitches the results, which turns a whole class of failed calls into working ones. Setup is easy to get wrong in one place: the token is configured either through the setup tool or a .env file, and it is worth confirming which one is actually in effect before debugging an empty result.
What it is
A Python MCP server that puts Tushare's Chinese market data behind an MCP client. It is organised by domain — basics and quotes, financial statements, funds and ETFs — and runs either as a local stdio server or over Streamable HTTP.
What you get
- Basics and quotes:
get_stock_basic,get_trade_cal,get_stock_company,get_namechange,get_stk_managers, plusdaily,weeklyandmonthlybars - Daily indicators through
get_daily_basic— turnover, PE, PB, market cap — andget_suspend_dfor halts,get_hsgt_top10for northbound flows - Financial statements:
get_income_statement,get_balance_sheet,get_cash_flow,get_forecast,get_express,get_fina_indicator,get_fina_mainbz,get_disclosure_date - Funds and ETFs:
etf_basic,etf_index,etf_share_size,fund_basic,fund_manager,fund_daily,fund_nav,fund_div,fund_portfolioand more - Comma-separated code lists work even where the upstream API does not support them — the server splits the request, loops, and joins the frames back together
setup_tushare_tokenconfigures the credential from inside the conversation, and stores it locally
Requirements
Python 3.10+ and a Tushare token, either set as TUSHARE_TOKEN in a .env file or configured through the setup tool. Data access goes through the tinyshare SDK rather than the official library. Run server.py for Streamable HTTP on port 8000, or with the stdio flag for desktop clients. Trial endpoints are published for evaluating it without a token.
Setup effort
Build from source — git clone https://github.com/buuzzy/tushare_MCP.git tushare_mcp
USE CASES
Comparing several stocks in one question
Pass the codes as a comma-separated list and let the server handle the calls the upstream API will not batch.
Reading a company's fundamentals
Pull the income statement, balance sheet and cash flow, then the ratio indicators, without leaving the chat.
Researching an ETF
Find the fund's basics and the index it tracks, then look at daily share size and net asset value history.
Seeing what a fund actually holds
Pull the top ten holdings and the manager's record rather than reading the fact sheet.
Setting it up without editing files
Configure the token through the setup tool in conversation; it is stored locally for next time.
34 tools
Listed in project docs. Your client may show a different list.
get_stock_basicget_trade_calget_stock_companyget_namechangeget_stk_managersdailyweeklymonthlyget_daily_basicget_suspend_dget_hsgt_top10get_income_statementget_balance_sheetget_cash_flowget_forecastget_expressget_fina_indicatorget_fina_mainbzget_disclosure_dateetf_basicetf_indexetf_share_sizefund_basicfund_companyfund_managerfund_sharefund_dailyfund_adjfund_navfund_divfund_portfoliofund_factor_prostk_minsBEFORE YOU INSTALL
What to know first
Tools you get
34 tools named in the project's documentation.
Requires
- Python 3.10+
- TUSHARE_TOKEN in your environment
INSTALLATION
Connect your client
Server setup
git clone https://github.com/buuzzy/tushare_MCP.git tushare_mcp
cd tushare_mcp
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtPut your Tushare token in a .env file in that folder as TUSHARE_TOKEN=your token, or set it later from the conversation with the setup_tushare_token tool.
MCP Clients
Claude Desktop
{
"mcpServers": {
"tushare": {
"command": "<YOUR_PATH_TO_VENV>/bin/python",
"args": [
"<YOUR_PATH_TO_TUSHARE_MCP>/server.py",
"--stdio"
]
}
}
}The configuration on this page does not set TUSHARE_TOKEN; the project's instructions put it in a .env file. Check which folder the server reads that file from before you rely on it.
Cursor — HTTP
Start the server in HTTP mode from the tushare_mcp folder. It serves MCP at http://localhost:8000/mcp.
python server.pyIn Cursor Settings → Features → MCP, click + Add New MCP Server, set Name to tushare, Type to Streamable HTTP and URL to http://localhost:8000/mcp.