Atlas / MCP servers / zhewenzhang / Tushare

TushareBLOCK

mcp/zhewenzhang/tushare
Verdict
BLOCK
Grade
F
Trust score
48 /100
Exposed tools
66 66r · 0w · 0d
Transport
streamable-http
License
MIT
Stars
48
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

基于 MCP (Model Context Protocol) 的 Tushare 金融数据服务器,提供 52 个专业金融数据分析工具。

🎯 项目特性

  • ✅ 52个专业工具 - 涵盖股票、期货、外汇、财务等10大类
  • ✅ 双模式支持 - stdio 模式和 HTTP SSE 模式
  • ✅ 智能缓存 - 自动缓存管理,提升查询效率
  • ✅ 权限管理 - 支持不同 Tushare 权限级别
  • ✅ 开箱即用 - 自动工具发现和注册

📦 快速开始

1. 安装依赖

pip install -r requirements.txt

2. 配置 Tushare Token

在项目根目录创建 .env 文件:

TUSHARE_TOKEN=your_token_here

获取 Token: https://tushare.pro/user/token

3. 选择运行模式

方式 A: stdio 模式(推荐用于 Claude Desktop)

配置文件: %APPDATA%\Claude\claude_desktop_config.json (Windows) 或 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)

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

启动: 重启 Claude Desktop 即可自动启动

方式 B: Streamable HTTP 模式(推荐用于调试和远程访问)

启动服务器:

# Windows
start_http_server.bat

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

配置文件: 同上 Claude Desktop 配置文件

{
"mcpServers": {
"tushare-http": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}

🛠️ 模式对比

📊 工具分类

Tushare MCP 工具完整列表 本文档列出了所有支持的MCP工具,共 52个工具,分为10个类别。

📊 一、Alpha策略分析工具 (6个) 行业Alpha分析 analyzesectoralpha_strategy

功能:分析单个板块相对强度Alpha,计算2日和5日Alpha收益 参数:sectorcode(板块代码,必填)、benchmarkcode(基准指数,默认000300.SH)、enddate(结束日期,YYYYMMDD格式,默认今天) 说明:计算2天和5天的区间收益率,计算超额收益Alpha = 板块收益 - 基准收益,综合得分 = Alpha2 × 60% + Alpha5 × 40% ranksectorsbyalpha

功能:申万一级行业Alpha排名,显示前N名强势板块 参数:benchmarkcode(基准指数,默认000300.SH)、enddate(结束日期,YYYYMMDD格式,默认今天)、topn(显示前N名,默认10) 说明:自动分析所有31个申万一级行业,按综合得分降序排列 rankl2sectorsby

Read from source at commit 5e8c8793279cOBSERVED · 2026-10-08
Advertisement
02

Exposed tools (66)

66 read · 0 write · 0 destructive.

ToolRiskDescription
analyze_concept_alpha_strategyread
analyze_sector_alpha_strategyread
analyze_sector_healthread
collect_stock_dataread
collect_stock_sector_mappingread
filter_stocksread
get_block_traderead
get_cache_statsread获取缓存统计信息
get_concept_moneyflow_dcread
get_cyq_perfread
get_daily_basicread
get_eastmoney_concept_boardread
get_eastmoney_concept_dailyread
get_eastmoney_concept_memberread
get_etf_dailyread
get_fina_indicatorread
get_fut_basicread
get_fut_holdingread
get_fut_minread
get_fut_wsrread
get_fx_dailyread
get_global_indexread
get_income_statementread
get_index_dailyread
get_index_rt_kread
get_industry_index_codesread
get_limit_cpt_listread
get_limit_listread
get_marginread
get_margin_detailread
get_nh_indexread
get_pledge_detailread
get_share_floatread
get_stock_auctionread
get_stock_basic_inforead
get_stock_dailyread
get_stock_holder_numberread
get_stock_holder_traderead
get_stock_intraday_historyread
get_stock_minread
get_stock_moneyflow_dcread
get_stock_repurchaseread
get_stock_rt_kread
get_stock_sector_mappingread
get_stock_surveyread
get_stock_weeklyread
get_stocks_by_sectorread
get_sw_industry_dailyread
get_sw_industry_membersread
get_top_instread
get_top_listread
inst_track_scanread
macro_scanread
rank_concepts_alpha_velocityread
rank_concepts_by_alpharead
rank_l1_sectors_alpha_fullread
rank_l1_sectors_alpha_velocityread
rank_l2_sectors_alpha_velocityread
rank_l2_sectors_by_alpharead
rank_sectors_by_alpharead
scan_announcement_signalsread
scan_concepts_volume_anomalyread
scan_l2_volume_anomalyread
scan_realtime_strong_sectorsread
search_global_indexesread
search_stocksread
03

Trust audit

BLOCKgrade F · trust 48/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)FAIL
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
UNDECLARED (1 observation(s))
Network
declared (4 observation(s))
Shell
declared (1 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (17)

HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
start_http_server.sh:64
echo "[错误] 无法终止进程,可能需要 sudo 权限"
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
start_http_server.sh:65
echo "请使用 sudo 运行此脚本,或手动终止进程后重试:"
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
start_http_server.sh:66
echo "  sudo kill -9 $PID"
Why it matters. asks for elevated privileges
HIGHPrompt injection · prompt.zero_width · CWE-94, CWE-1427
scripts/diagnose_output.txt:1
python : Traceback (most recent call last):
Why it matters. invisible characters in instruction text
Fix. strip non-printing characters
MEDIUMCode injection · code.dynamic_import · CWE-78, CWE-94, CWE-95
tools/__init__.py:41
module = importlib.import_module(f'tools.{module_name}')
MEDIUMFilesystem / path · fs.destructive · CWE-22, CWE-59
Dockerfile:10
&& rm -rf /var/lib/apt/lists/*
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
server_http.py:303
print(f"📍 MCP 端点:  http://127.0.0.1:8000/mcp", file=sys.stderr)
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
server_http.py:304
print(f"📍 健康检查: http://127.0.0.1:8000/health", file=sys.stderr)
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
server_http.py:305
print(f"📍 工具列表: http://127.0.0.1:8000/tools", file=sys.stderr)
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
start_http_server.bat:107
echo   - MCP 端点:    http://127.0.0.1:8000/mcp
MEDIUMPrompt injection · scope.undeclared_system · CWE-94, CWE-1427
<declared scope>
system use found in code, not declared in the description
Why it matters. the description does not admit a capability the code has
Fix. declare system use in the description, or remove it
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
cache/cache_manager.py:94
return hashlib.md5(key_str.encode('utf-8')).hexdigest()
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
cache/cache_manager.py:101
return hashlib.md5(data_str.encode('utf-8')).hexdigest()
LOWInformation disclosure · disclose.log_secret · CWE-209, CWE-532
test_inst_track.py:18
print(f"Token set: {token[:5]}...")
LOWInformation disclosure · disclose.log_secret · CWE-209, CWE-532
test_scan_announcement_signals.py:353
print(f"✅ 已检测到 Tushare Token: {token[:8]}...{token[-4:]}")
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
README.md:68
"url": "http://127.0.0.1:8000/mcp"
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
mcp, tushare, python-dotenv, pandas, starlette, uvicorn, httpx
Why it matters. 7 requirement(s) not pinned with ==
Fix. pin exact versions

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha 5e8c8793279cfull audit observations/trust-audit/mcp-server/zhewenzhang__tushare.json · Report an issue / request a re-scan
04

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-085e8c8793279cBLOCKF48first audit
05

Questions

What tools does Tushare expose?

66 in total: 66 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Tushare safe to connect to an agent?

No — not without reading the findings first. The audit graded it F (48/100) and found 4 critical or high issues in the source. Each one is listed on this page with the file and line it is on.

What credentials does Tushare need?

It reads TUSHARE_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Tushare run?

It speaks streamable-http, so it runs as a service you connect to over the network.

How current is this page?

The grade is for one exact copy of the source (5e8c8793279c), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement