tsrs-mcp-server
9
This project is an MCP server implemented in Rust, offering a variety of stock market data query tools by encapsulating the TuShare API. It provides various features through a user-friendly interface and supports different running modes for flexibility.
tsrs-mcp-server
This is a Model Context Protocol (MCP) based data server for TuShare, offering a variety of stock market data query interfaces.
Project Introduction
This project is an MCP server implemented in Rust, encapsulating the TuShare API interface and providing several stock market data query tools. Key technologies include:
- Rust
- Model Context Protocol (MCP)
- Poem MCP Server
- TuShare API
- Procedural Macros
Features
The project offers the following MCP tools:
- limit_step: Retrieves stocks with daily board advancement.
- ths_hot: Gets data of hot rankings on Tonghuashun App.
- kpl_list: Retrieves data on price limits.
- kpl_concept: Obtains list of concept topics from Kaipan.
- kpl_concept_cons: Gets constituent stocks of concept themes.
- limit_cpt_list: Retrieves concepts with most daily limit-up stocks.
- moneyflow_ths: Gets cash flow of individual stocks.
- moneyflow_cnt_ths: Retrieves daily cash flow of concept sectors.
- stk_mins: Retrieves minute-level data of A shares.
Project Structure
ts-derive
: Provides procedural macros for TuShare API.ts-model
: Contains data models.src
: Main program implementation.
Environment Configuration
Before running, set the TuShare API token:
- Copy
.env.example
to.env
- Set your TuShare token in the
.env
file:
Building
Prerequisites: Install Rust and Cargo.