Content
# QMT MCP Server
## Project Introduction
- MCP Server based on the QMT platform stock market data, used to provide stock market data download and query functions.
## Features
- Get stock details
- Download historical stock data
- Query stock market data
## Tool Functions
- `get_current_time_tool`: Get current time
- `get_instrument_detail_tool`: Get stock details
- `download_history_data_tool`: Download historical market data for a specific stock
- `download_history_data2_tool`: Download historical market data for multiple stocks
- `get_market_data_ex_tool`: Get market data for multiple stocks
## Sample Display
- Q: How has China Mobile A-shares performed in the last three months? Please provide a comprehensive analysis from multiple perspectives using the data.
To analyze the performance of China Mobile A-shares in the last three months in detail, I need to obtain the relevant data first. The stock code for China Mobile A-shares is 600941.SH, and I will obtain the details and historical market data for this stock.
View result from get_instrument_detail_tool
Now I will download the historical data of China Mobile A-shares for the last three months. Considering that today is April 16, 2025, I will obtain the daily data from January 16, 2025 to the present:
View result from download_history_data_tool
Now I will get the detailed market data of China Mobile A-shares:
View result from get_market_data_ex_tool
Let's get the current time to determine the latest trading day:
View result from get_current_time_tool
Now that I have obtained the detailed data of China Mobile A-shares (600941.SH) for the last three months, let me conduct a comprehensive analysis of its performance.
Analysis of China Mobile A-shares performance in the last three months
1. Stock price trend analysis
Overall trend:
Starting price (January 16, 2025): Opening price 108.40 yuan, closing price 109.29 yuan
Latest price (April 15, 2025): Opening price 110.43 yuan, closing price 111.75 yuan
Cumulative increase in three months: 2.25% (from 109.29 yuan to 111.75 yuan)
Phased performance:
January: The stock price fluctuated slightly, maintaining in the range of 107-111 yuan
February: There was a significant increase, reaching a phased high of 114.50 yuan on February 21
End of February to March: Experienced a wave of decline, falling to a phased low of 105.66 yuan on March 12
Late March to April: Stabilized and rebounded, reaching 112.60 yuan on April 9, followed by a slight correction
2. Trading volume analysis
Trading volume changes:
Average daily trading volume: Approximately 162,000 lots
High trading volume dates:
February 10: 345,000 lots (stock price rose from 108.14 yuan to 110.00 yuan)
February 21: 352,000 lots (stock price rose from 110.37 yuan to 114.50 yuan)
March 21: 355,000 lots (stock price rose from 105.00 yuan to 106.65 yuan)
April 7: 368,000 lots (stock price fell from 108.99 yuan and rebounded to 108.45 yuan)
April 8: 323,000 lots (stock price rose sharply to 111.60 yuan)
Relationship between trading volume and price:
Trading volume increased significantly during significant increases: such as February 10, February 21, April 8, etc.
Trading volume was relatively small during price adjustments: such as mid-March to late March
3. Price volatility analysis
Fluctuation range:
Highest price: 114.50 yuan (February 21, 2025)
Lowest price: 105.00 yuan (March 20, 2025)
Maximum amplitude: 9.05% (difference between the highest and lowest points)
Average intraday fluctuation range: 1.58%
Volatility:
Average daily volatility in the last three months: 0.77%
Volatility in February was higher than in January and March, reflecting more active market sentiment
4. Technical indicator analysis
Trend line:
Short-term trend: Showing an upward trend since April
Mid-term trend: Formed a "V" shaped reversal pattern, bottoming out in mid-March and starting to rebound
Support and resistance levels:
Main support level: Around 105 yuan (repeatedly tested without effectively breaking through)
Main resistance level: 112-115 yuan range (high point area in February)
Trading volume indicators:
Trading volume increases when the price rises, indicating strong bullish power
Recent trading volume has remained at a high level, indicating increased market attention to the stock
5. Comparison with market analysis
Although it is not possible to directly obtain the Shanghai Composite Index data for the same period, it can be inferred based on the price trend characteristics:
China Mobile's performance in January-February was stronger than the broader market (the overall market performance in February was better)
Synchronized adjustment with the market in early to mid-March
Followed the overall market rebound since early April, with relatively positive performance
6. Important time node analysis
Key dates and performance:
February 21: A single-day increase of 3.74%, with a significant increase in trading volume
February 22-26: Declined for 3 consecutive trading days, with a cumulative decline of approximately 6%
March 20-21: Strong rebound after hitting a phased low, with a single-day increase of 1.57%
April 8-9: Increased for two consecutive trading days, with a cumulative increase of 3.83%
7. Investment value assessment
Observations based on data:
The price is fluctuating upward, showing a steady upward trend overall
The trading activity is moderate, without obvious abnormal fluctuations
The recent increase in trading volume accompanied by price increases indicates increased market confidence
Potential factors:
As a leader in the communications industry, China Mobile has a strong market position
The development of 5G business and potential emerging technology applications may be the driving factors for the recent stock price increase
Relatively stable price fluctuations reflect investors' long-term optimism about the stock
8. Comprehensive conclusion
China Mobile A-shares showed an overall trend of first suppressing and then rising in the last three months: relatively stable in January, a significant increase followed by a correction in February, an adjustment in March, and a stabilization and rebound again since April. The overall cumulative increase was 2.25%, the volatility was moderate, and the trading activity was high. From a technical perspective, the stock has completed a complete adjustment-rebound cycle and is currently in an upward channel, and is expected to continue to break through the previous high in the short term. With the recent increase in trading volume, market interest in the stock is increasing, and the future performance is worth paying attention to.
- Q: How have PetroChina, Sinopec, and CNOOC performed in the A-share market in the last three months?
Let me check the performance data of PetroChina, Sinopec, and CNOOC in the A-share market for the last three months for you. First, I need to obtain the stock codes of these companies and then download the relevant historical data.
The stock code of PetroChina in the A-share market is 601857.SH; the stock code of Sinopec is 600028.SH; the stock code of CNOOC in the A-share market is 600938.SH.
Let me confirm these codes and get stock information first:
View result from get_instrument_detail_tool
View result from get_instrument_detail_tool
View result from get_instrument_detail_tool
Now let me get the current time to determine the time range for the last three months:
View result from get_current_time_tool
According to the current time of April 21, 2025, I will obtain the stock data from January 21, 2025 to the present (approximately 3 months):
View result from download_history_data2_tool
Now I will get the market data of these stocks:
View result from get_market_data_ex_tool
Based on the data obtained, I can now analyze the performance of PetroChina, Sinopec, and CNOOC in the A-share market in the last three months.
PetroChina (601857.SH) performance analysis for the last three months
Starting price (January 21, 2025): Opening price was 8.53 yuan
Ending price (April 21, 2025): Closing price was 7.94 yuan
Three-month increase/decrease: (7.94 - 8.53) / 8.53 ≈ -6.92%
Highest price during the period: 8.56 yuan (January 21)
Lowest price during the period: 7.33 yuan (April 7)
Trend analysis: The overall trend is stable first and then declines. There was a relatively large drop in early April, followed by a slight rebound
Sinopec (600028.SH) performance analysis for the last three months
Starting price (January 21, 2025): Opening price was 6.18 yuan
Ending price (April 21, 2025): Closing price was 5.66 yuan
Three-month increase/decrease: (5.66 - 6.18) / 6.18 ≈ -8.41%
Highest price during the period: 6.19 yuan (January 21)
Lowest price during the period: 5.25 yuan (April 7)
Trend analysis: The overall trend is downward. There was also a significant drop in early April, followed by a slight rebound
CNOOC (600938.SH) performance analysis for the last three months
Starting price (January 21, 2025): Opening price was 28.23 yuan
Ending price (April 21, 2025): Closing price was 24.92 yuan
Three-month increase/decrease: (24.92 - 28.23) / 28.23 ≈ -11.73%
Highest price during the period: 28.28 yuan (January 21)
Lowest price during the period: 23.11 yuan (April 7)
Trend analysis: The overall decline was the largest, especially in early April, there was a sharp drop, followed by a slight rebound
Comparative analysis of the three companies
Decline comparison: CNOOC performed the worst, with a cumulative decline of approximately 11.73% in three months; Sinopec was second, with a decline of approximately 8.41%; PetroChina performed relatively well, with a decline of approximately 6.92%
Volatility: CNOOC had the largest volatility, with the stock price falling from the 28 yuan range to the 24 yuan range; PetroChina and Sinopec had relatively small volatility
Key time points: The three companies all experienced a large drop around April 7, which may be related to the same market factors or industry factors
Rebound performance: The three companies all had a certain degree of rebound in mid-April, but failed to return to the level at the end of March
Summary
In the last three months, the three oil companies have shown a downward trend in the A-share market. Among them, CNOOC has the largest decline, and PetroChina has performed relatively well. The three companies all experienced a significant decline in early April, followed by a slight rebound, indicating that the oil industry as a whole may have been affected by some unfavorable factors. The stock price trends of the three companies are similar, showing a strong industry correlation.
## Precautions
1. Limited by the QMT client, only Windows is currently supported
2. Before starting the MCP service, please ensure that QMT is turned on and running in the background
## Quick Start
1. Install QMT-MCP-Server
```bash
$ pip install git+https://github.com/jm12138/qmt-mcp-server
```
2. Start the QMT or MiniQMT client
3. Start the MCP server
1. stdio mode (suitable for local use)
```bash
$ qmt_mcp_server_stdio
```
2. sse mode (suitable for server deployment)
```bash
$ qmt_mcp_server_sse --host 0.0.0.0 --port 8000
```
4. Client configuration
1. Claude Desktop
```json
{
"mcpServers": {
"qmt-mcp-server": {
"command": "qmt_mcp_server_stdio"
}
}
}
```
2. VS Code
```json
{
"servers": {
"qmt-mcp-server": {
"command": "qmt_mcp_server_stdio"
}
}
}
```
```json
{
"servers": {
"qmt-mcp-server": {
"type": "sse",
"url": "http://0.0.0.0:8000/sse",
}
}
}
```
Connection Info
You Might Also Like
valuecell
Valuecell is a Python project for efficient data management.
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
AP2
AP2 provides code samples and demos for the Agent Payments Protocol.
SymDex
Code-indexer MCP server for AI agents — 97% fewer tokens per lookup....
claudit
MCP server for searching Solodit smart contract security findings
mcp-reticle
Reticle is a tool for visualizing JSON-RPC traffic between LLM and MCP...