Content
# QMT-MCP-Server
Empowering large models to execute stock trades!
QMT-MCP-Server is a server application based on MCP (Model Control Protocol) that interfaces with the QMT trading system, providing functionality related to stock trading.
**This project is for educational and communication purposes only. Please use it cautiously in a live trading environment.**
## Implemented Features
- Account asset inquiry
- Position information inquiry
- Place orders
- Cancel orders
## System Requirements
- Python >= 3.10
- QMT trading permissions enabled, and miniqmt started locally
## Installation Instructions
**Please install the Python package management tool uv before use.**
For installation methods, please refer to:
https://docs.astral.sh/uv/getting-started/installation/#github-releases
1. Clone the project to your local machine
```bash
git clone https://github.com/nnquant/qmt-mcp-server
```
2. Install dependencies:
```bash
uv sync
```
3. Run the project
```bash
uv run main.py
```
## Configuration Instructions
Upon the first run, the system will prompt you to enter the necessary configuration information:
- Path to MiniQMT
- Fund account
The configuration information will be automatically saved in the `xttrader.yaml` file.
## MCP Usage Tips
1. Choose the appropriate MCP client and configure the MCP server. For example, in Cursor, configure as follows:
```json
{
"mcpServers": {
"qmt-mcp-server": {
"url": "http://localhost:8001/sse"
}
}
}
```
2. Command Examples
- Please help me check my account positions.
- Buy 100 shares of 600000.SH stock at a price of 10 yuan.
- Buy 100 shares of Ping An Bank stock at a price of 11 yuan.
- **(Due to differences between various large models, there may be cases where stock names cannot be correctly converted to stock codes. Please be cautious when placing orders using stock names.)**
- Buy XXXX stock at XX price for 20% of available position.
- Complete stock selection and trading in conjunction with other MCP services.
## Notes
- Please ensure that the MiniQMT system is running properly before use.
- Carefully verify account information before trading.
- All stock codes must include the exchange suffix (.SH or .SZ).
- This program is for communication and learning purposes only. Please use it cautiously in live trading; I do not assume any losses incurred by users of this program.
Connection Info
You Might Also Like
valuecell
ValueCell is a community-driven, multi-agent platform for financial applications.
HexStrike AI
Enable AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+...
YC-Killer
A library of enterprise-grade AI agents designed to democratize artificial...
mssql-mcp
MSSQL Server MCP implementation written in C#
autocad-mcp
MCP server for AutoCAD LT: AI agents translate natural language into...
metatrader-mcp-server
Model Context Protocol (MCP) to enable AI LLMs to trade using MetaTrader platform