b

buuzzy

@buuzzy/tushare_MCP
0 Stars 457 次浏览 buuzzy 更新于 2026-08-23

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "Tushare_mcp": {
      "type": "sse",
      "url": "https://tushare-mcp.onrender.com/sse"
    },
    "hotlist_mcp": {
      "type": "sse",
      "url": "https://hotlist-mcp.onrender.com/sse"
    }
  }
}

服务介绍

Tushare_MCP

Intelligent Stock Data Assistant Based on Model Context Protocol (MCP)


Python Version

This project is developed based on the financial data interfaces provided by Tushare, with supported capabilities including:

  1. Tool invocation, such as stock market data, in-depth financial data, and index data.
  2. Secure Tushare Token configuration and status check mechanism.
  3. Standardized HTTP API interfaces through FastAPI encapsulation, facilitating integration with other applications.

json
{
"mcpServers": {
"Tushare_mcp": {
"url": "https://tushare-mcp.onrender.com/sse",
"type": "sse"
},
"hotlist_mcp": {
"url": "https://hotlist-mcp.onrender.com/sse",
"type": "sse"
}
}
}

👉Quick Experience Guide with cherry studio

20250515 Update

Added hotlist.py, a powerful tool module focused on tracking hot lists and deep thematic exploration!

With hotlist.py, you can easily achieve:

  • Single tool query: Quickly obtain concept sector lists, limit-up and limit-down stock lists, or real-time app hot lists for specific dates and markets (such as KPL, Tonghuashun, Dongfangcaifu).
  • Intersection analysis capability: Combine concept/theme and constituent stock data from different platforms to efficiently identify potential sectors or individual stocks recognized by multiple authoritative sources.
  • Insight into abnormal data: By combining constituent stocks of concept sectors with limit-up, limit-down, and hot list data, accurately filter out stocks that are performing strongly or showing key signals within specific themes.
  • Trend analysis support: Query market data for a particular concept sector over a period of time, or track the frequency of a stock/sector appearing on historical hot lists to assist in judging the sustainability of its popularity and changes in capital attention.

You can ask the AI assistant questions of the following types (and more):

  • "What are the popular concept sectors on Tonghuashun today?"
  • "Which stocks hit the limit-up yesterday?"
  • "Which stocks are both part of Theme A on KPL and Concept B on Tonghuashun?"
  • "In the Tonghuashun concept of Artificial Intelligence, which component stocks hit the limit-up today?"
  • "Query the daily price change of the New Energy Vehicle sector index over the past month."
  • "Help me count how many times a certain stock has appeared on the Tonghuashun hot stock list in the past week."

✨ Supported Capabilities

  • Comprehensive stock data query:
    • Provides basic stock information, real-time quotes (daily, indicators), and historical price change queries.
    • Supports intelligent search by stock code or name.
  • In-depth financial data analysis:
    • Obtain detailed financial statements of listed companies, including income statements, balance sheets, and cash flow statements.
    • Query key financial indicator data.
  • Index and market data coverage:
    • Supports querying basic information of major indices, obtaining constituent stocks, and global index quotes.
  • Shareholder and company fundamental information:
    • Query number of shareholders, top ten shareholder information, daily share capital value, and equity pledge details.
  • Popular lists and thematic data (provided by hotlist.py):
    • KPL (KaiPianLa) data:
      • Concept theme list query (can be filtered by date, code, name).
      • Concept theme constituent stock query (can be filtered by date, theme code, stock code).
      • Obtain limit-up, limit-down, broken board, natural limit-up, and auction list data.
    • Daily limit-up and limit-down statistics:* Obtain detailed statistical data on daily stock limit up (U), limit down (D), and board breaking (Z).
  • Tonghuashun (THS) Data:
    • Query list of sector indices (concepts, industries, regions, etc.).
    • Query component stocks of concept sectors.
    • Daily market data for sector indices.
    • Tonghuashun App hotlist data (hot stocks, concept sectors, ETFs, etc.).
  • Eastmoney Data:
    • Daily concept sector data query (can be filtered by code, name, date range).
    • Daily component stocks of concept sectors.

❌ Unsupported Capabilities

  • News, research reports, and other information data
  • More granular technical data (minute lines, Tick quotes)
  • Macroeconomic data, futures, options, and other non-stock data

🚀 Quick Start

Environment Requirements

Installation Steps

  1. Clone the repository:
    bash
    git clone
    cd

  2. Create and activate a virtual environment (recommended):
    bash
    python -m venv venv
    source venv/bin/activate # Linux/macOS

    venv/Scripts/activate # Windows

  3. Install dependencies:
    bash
    pip install -r requirements.txt

Configure Tushare Token

This project requires a Tushare API Token to function properly. You can configure the Token in the following ways:

  1. Using a .env file (recommended, secure):

    • Create a file named .env in the root directory of the project (this file is ignored by .gitignore and will not be committed to the repository).

    • Add the following content to the .env file, replacing <Your TUSHARE_TOKEN> with your actual Token:

      TUSHARE_TOKEN=

  2. Using environment variables:
    Before running server.py, set an environment variable named TUSHARE_TOKEN.
    bash
    export TUSHARE_TOKEN="" # Linux/macOS

    set TUSHARE_TOKEN="" # Windows (cmd)

    $env:TUSHARE_TOKEN="" # Windows (PowerShell)

Start the Service

bash
python server.py

Add the corresponding Servers in the MCP service of AI IDE software (such as Cursor or Trae).

📄 Open Source License

MIT License - see LICENSE file for details

Local Environment Notes

The Python environment is managed by the operating system or external tools (like Homebrew). To protect the system-level Python installation, directly installing packages into the global environment using pip3 install is generally not allowed. It is necessary to complete this through activating a virtual environment (assuming you have created one).

bash
python3 -m venv venv

bash
source venv/bin/activate

相关 MCP 服务