Tsrs MCP Server

tushare rust mcp server

Local serverstdio

What is the Tsrs MCP server?

Connect Tsrs to Claude, Cursor or any other MCP client and it stops being a tab you switch to. tushare rust mcp server. The tsrs mcp server is what makes that connection.

What the server does

这是一个基于 Model Context Protocol (MCP) 的TuShare数据服务器,提供了一系列股票市场数据查询接口。

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Rust — Model Context Protocol (MCP)
  • ts-derive — 提供用于TuShare API的过程宏实现
  • ts-model — 包含数据模型
  • src — 主程序实现
  • limit_step — 获取每天连板个数晋级的股票
  • ths_hot — 获取同花顺App热榜数据
  • kpl_list — 获取涨跌停板数据
  • kpl_concept — 获取开盘啦概念题材列表
  • kpl_concept_cons — 获取开盘啦概念题材的成分股
  • limit_cpt_list — 获取每天涨停股票最多的概念板块
  • moneyflow_ths — 获取同花顺个股资金流向数据
  • moneyflow_cnt_ths — 获取同花顺概念板块每日资金流向

Credentials and setup notes

Configuration is passed through the environment: TUSHARE_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 13 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Tsrs.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Tsrs's toolset — Rust, ts-derive, ts-model and 10 more — is a fair guide to whether it matches your workflow. It is maintained by hanxuanliang; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
RustModel Context Protocol (MCP)
ts-derive提供用于TuShare API的过程宏实现
ts-model包含数据模型
src主程序实现
limit_step获取每天连板个数晋级的股票
ths_hot获取同花顺App热榜数据
kpl_list获取涨跌停板数据
kpl_concept获取开盘啦概念题材列表
kpl_concept_cons获取开盘啦概念题材的成分股
limit_cpt_list获取每天涨停股票最多的概念板块
moneyflow_ths获取同花顺个股资金流向数据
moneyflow_cnt_ths获取同花顺概念板块每日资金流向
stk_mins获取A股分钟数据

Configuration

VariableDescriptionRequired
TUSHARE_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Tsrs to Rust.
  • Use Tsrs to ts-derive.
  • Use Tsrs to ts-model.

Frequently asked questions

Rust 和 Cargo 用于构建,运行前需在 `.env` 中设置 TuShare API token。