- Home
- MCP servers
- China Stock
China Stock
- python
22
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
China Stock MCP Server provides an MCP API to access Chinese stock market data. It offers historical and real-time quotes, financial statements, indicators, news, and more, designed to be easily integrated with AI assistants and client applications.
How to use
You connect to the server with an MCP client to query a wide range of Chinese stock market data. The server supports both local stdio mode for development and HTTP mode for remote access. You can fetch historical data, real-time quotes, financial statements, key financial metrics, news, and various analytical indicators. Use the available tools to combine data sources, indicators, and reports in your workflows.
How to install
Prerequisites: ensure you have Python 3.12 or later and a runtime tool for managing the MCP server. You will also need a compatible MCP client to issue queries.
# Docker method (recommended for quick start)
docker pull ghcr.io/xinkuang/china-stock-mcp:latest
docker run -p 8081:8081 ghcr.io/xinkuang/china-stock-mcp:latest
# The server will be available at http://localhost:8081/mcp
Additional notes and configuration
The server can run in HTTP mode or stdio mode. The HTTP mode exposes a live MCP endpoint at a configurable address, while stdio mode runs locally for direct MCP client access. For HTTP mode, the server URL is the endpoint you will connect to, for example http://localhost:8081/mcp.
MCP connection details
If you want to connect to a locally running instance via HTTP, use the endpoint at http://localhost:8081/mcp. For local development, you can start the server with the stdio command uv run -m china_stock_mcp and connect your MCP client to the local process.
Security and deployment notes
When exposing the server over HTTP, ensure port 8081 is accessible only to trusted clients or protected behind a gateway. Use appropriate authentication and rate limiting as part of your deployment strategy.
Available tools
get_hist_data
Fetch historical stock data for a given symbol, interval, date range, and optional indicators. Supports multiple data sources and a list of technical indicators.
get_realtime_data
Retrieve live quote data for a specified symbol from supported data sources.
get_news_data
Obtain news and announcements related to a specific stock symbol.
get_balance_sheet
Get the company balance sheet data for a given symbol.
get_income_statement
Get the income statement for a specified stock.
get_cash_flow
Fetch the cash flow statement for a stock.
get_fund_flow
Retrieve fund flow data for the last 100 trading days.
get_inner_trade_data
Obtain internal shareholder trading data.
get_financial_metrics
Get key financial metrics from three major financial statements.
get_time_info
Return current ISO time, timestamp, and the most recent trading day.
get_stock_basic_info
Fetch basic stock information for A shares and Hong Kong listings.
get_macro_data
Retrieve a single macroeconomic indicator.
get_investor_sentiment
Analyze sentiment between retail and institutional investors for a stock.
get_shareholder_info
Get shareholder composition details for a stock.
get_product_info
Provide product or business structure information for a company.
get_profit_forecast
Obtain earnings forecast data including projected net profit and earnings per share.
get_stock_fhps_detail
Fetch dividend and distribution details for a stock.
get_stock_cyq
Get chip/ownership distribution data for a stock.
get_stock_research_report
Retrieve research report data for a stock.
get_stock_circulate_stock_holder
Get information on circulating stockholders.
get_stock_management_change
Access executive changes data for a stock.
get_stock_restricted_release_queue
Fetch data on restricted stock releases.
get_stock_a_code_name
Get code-name mappings for all A-share stocks.
get_stock_value
Obtain valuation data for a stock.
get_stock_volatility
Compute volatility metrics from minute-level history.
get_all_cni_indices
List all indices with basic information and caching behavior.
get_cni_index_hist
Fetch daily history data for a specified index.
get_cni_index_detail
Get component stocks for a given index on a specific date.
get_stock_technical_rank
Analyze technical rank indicators like high/low breakouts and volume patterns.
get_stock_board_industry_summary
Get real-time summaries for all stock board industries.