QMT-MCP-Server logo

QMT-MCP-Server

by nnquant

QMT-MCP-Server is a server application based on MCP (Model Control Protocol) that connects to the XunTou QMT trading system, providing functional interfaces related to stock trading. It empowers large models with the ability to execute stock trades.

View on GitHub

Last updated: N/A

What is QMT-MCP-Server?

QMT-MCP-Server is a server application that uses the Model Control Protocol (MCP) to interface with the XunTou QMT trading system, enabling stock trading functionalities.

How to use QMT-MCP-Server?

  1. Clone the repository. 2. Install dependencies using uv sync. 3. Run the server using uv run main.py. 4. Configure the MiniQMT path and account details when prompted, which will be saved in xttrader.yaml. 5. Configure your MCP client to connect to the server (e.g., in Cursor). 6. Use natural language commands to interact with the server for tasks like querying holdings, placing orders, and canceling orders.

Key features of QMT-MCP-Server

  • Account asset query

  • Holding information query

  • Order placement

  • Order cancellation

Use cases of QMT-MCP-Server

  • Querying account holdings

  • Placing stock orders at a specific price

  • Placing stock orders based on available capital percentage

  • Integrating with other MCP services for end-to-end stock selection and trading

FAQ from QMT-MCP-Server

What is MCP?

MCP stands for Model Control Protocol, a protocol for controlling and interacting with models, in this case, for stock trading.

What is QMT?

QMT is a trading system provided by XunTou.

What are the system requirements?

Python >= 3.10 and a running MiniQMT instance with trading permissions.

How do I configure the server?

The server prompts for the MiniQMT path and account details on the first run, saving them to xttrader.yaml.

What is the URL for the MCP server?

The default URL is http://localhost:8001/sse.