A Rust MCP server for TuShare stock market data

A Rust MCP server for TuShare stock market data

tsrs-mcp-server•byhanxuanliang

An MCP server implemented in Rust that wraps TuShare APIs and exposes stock market data query tools, runnable over stdio or Streamable HTTP.

License: MIT•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Provides an MCP tool, limit_step, that retrieves stocks advancing in consecutive limit-up streaks by date range and streak counts.
  • •Provides an MCP tool, ths_hot, for Tonghuashun app hot-list data including stock info, rank, heat and concepts.
  • •Provides MCP tools for limit-up/down board data, concept themes, and concept constituent stocks via Kpl data.
  • •Provides MCP tools for money flow data and A-share minute-level trading data.

BEST FOR

  • •Querying Chinese stock market limit-up streak and board data through an MCP client.
  • •Retrieving hot-list, concept theme, and money flow data for market analysis in an AI assistant.
  • •Fetching A-share minute-level transaction data by stock code and frequency.

ABOUT TSRS-MCP-SERVER

A Rust MCP server for TuShare stock market data is cataloged as an MCP server attributed to hanxuanliang. An MCP server implemented in Rust that wraps TuShare APIs and exposes stock market data query tools, runnable over stdio or Streamable HTTP. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for A Rust MCP server for TuShare stock market data are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What modes can the server run in?

It runs over stdio by default, and can also run in Streamable HTTP mode.

Does it require a TuShare API token?

Yes, a TuShare token must be set before running the server.

上游原版 README

在 GitHub 查看同一版本原文

README.md · ea91e36f3aa8 · 采集于 2026-11-13 09:52:50 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

tsrs-mcp-server

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

项目简介

本项目是一个Rust实现的MCP服务器,封装了TuShare的API接口,提供了多个股票市场数据查询工具。项目使用了以下主要技术:

  • Rust
  • Model Context Protocol (MCP)
  • Poem MCP Server
  • TuShare API
  • 过程宏 (Procedural Macros)

功能特性

项目提供了以下MCP工具:

工具名称功能描述主要参数返回数据
limit_step获取每天连板个数晋级的股票trade_date, start_date, end_date, nums股票代码、名称、交易日期、连板次数
ths_hot获取同花顺App热榜数据trade_date股票信息、排名、热度、概念等
kpl_list获取涨跌停板数据tag, start_date, end_date涨跌停详细信息、成交数据等
kpl_concept获取开盘啦概念题材列表trade_date题材代码、名称、涨停数量等
kpl_concept_cons获取开盘啦概念题材的成分股trade_date, ts_code题材成分股详细信息
limit_cpt_list获取每天涨停股票最多的概念板块trade_date, start_date, end_date板块代码、名称、连板数据等
moneyflow_ths获取同花顺个股资金流向数据ts_code, trade_date, start_date, end_date资金流向详细数据
moneyflow_cnt_ths获取同花顺概念板块每日资金流向trade_date, start_date, end_date板块资金流向数据
stk_mins获取A股分钟数据ts_code, freq, start_date, end_date分钟级别的交易数据

项目结构

项目包含以下主要组件:

  • ts-derive: 提供用于TuShare API的过程宏实现
  • ts-model: 包含数据模型
  • src: 主程序实现

环境配置

在运行之前,需要设置TuShare的API token:

  • 复制 .env.example 为 .env
  • 在 .env 文件中设置你的TuShare token:
TUSHARE_TOKEN=your_token_here

构建

前提条件:安装 Rust 和 Cargo。

cargo build --release

./target/release/tsrs-mcp-server

运行

你可以在release中找到对应平台下的编译产物, 例如 tsrs-mcp-server-<tag>-aarch64-apple-darwin.tar.gz。

服务器支持两种运行模式:

  1. Stdio模式(默认):直接下载release产物。执行: ./tsrs-mcp-server stdio
  2. Stream模式:提供Streamable HTTP模式。endpoint: http://127.0.0.1:8999

运行方式如下图配置(仅展示在chatwise的配置):

chatwise-config

鸣谢

感谢以下项目和库, 尤其是 poem-mcpserver 对MCP编写的极强便捷性支持, 没有它, 本项目没有如此简便的实现方式。 同时感谢 TuShare API 提供的数据接口。 最后要感谢 rust, 没有 procedural macros, 本项目的模版实现将变得异常机械化。

License

本项目采用 MIT 许可证。详见 LICENSE 文件。

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for A Rust MCP server for TuShare stock market data from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/tsrs-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics