elsejj/mcp-cn-a-stock

这是一个为大模型提供 A 股数据的的 MCP(Model Content Protocol) 服务。

What it solves

This project provides a Model Context Protocol (MCP) server that allows Large Language Models (LLMs) to access real-time and historical data for Chinese A-share stocks. It bridges the gap between an LLM's general knowledge and specific, up-to-date financial market data, enabling the model to perform professional stock analysis, trend evaluation, and financial health checks.

How it works

The server implements the MCP standard to expose stock data as tools that an LLM can call based on the user's request. It categorizes data into three levels of detail:

  • brief: Provides basic stock information and current market quotes.
  • medium: Includes all basic data plus key financial statements and metrics.
  • full: Includes all the above plus a variety of common technical indicators.

For data storage and processing, it utilizes msd (a database designed for financial time-series data) and py-alpha-lib for calculating financial factors and indicators. It can be deployed as a standalone service via HTTP.

Who it’s for

  • AI Developers: Those building financial assistants or investment advisors using MCP-compatible clients (like CherryStudio or DeepChat).
  • Retail Investors: Users who want to use LLMs to analyze A-share stock trends and fundamentals without manually searching for data.

Highlights

  • Tiered Data Access: Automatically scales the amount of data provided (brief, medium, full) based on the model's needs.
  • Financial Specialization: Uses a time-series database (msd) specifically optimized for financial data.
  • Comprehensive Metrics: Covers basic info, market quotes, financial data, and technical indicators.
  • Easy Integration: Compatible with standard MCP clients for immediate use in AI chat interfaces.

Related

  • Project
  • Project
  • Project
  • Project