QMT

v1.0.0Finance & Fintechstable

QMT-MCP-Server

qmtmcpai-integration
Share:
40
Stars
0
Downloads
0
Weekly
0/5

What is QMT?

QMT is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to qmt-mcp-server

QMT-MCP-Server

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • QMT-MCP-Server

Use Cases

Perform trading operations through QMT integration.
nnquant

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx qmt

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use QMT

QMT-MCP-Server is a Python-based MCP server that bridges AI language models with the MiniQMT trading system from Xuntou (迅投), giving models the ability to query account assets, view open positions, place orders, and cancel orders programmatically through natural language. It is designed for quantitative traders in China who have QMT trading access and want to control stock trading through an AI assistant. The server runs as a local SSE endpoint and connects to a locally running MiniQMT instance.

Prerequisites

  • Python 3.10 or higher installed
  • A valid QMT (迅投QMT) trading account with trading permissions
  • MiniQMT client installed and running locally on your machine
  • uv package manager installed (see https://docs.astral.sh/uv/getting-started/installation/)
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Clone the repository

Clone the qmt-mcp-server repository to your local machine.

git clone https://github.com/nnquant/qmt-mcp-server
cd qmt-mcp-server
2

Install dependencies using uv

Use uv to install all required Python dependencies from the project's lockfile.

uv sync
3

Start MiniQMT

Make sure the MiniQMT client is running on your machine before starting the server. QMT-MCP-Server connects to MiniQMT locally to execute trades.

4

Run the server for the first time and complete configuration

On first run the server prompts you for your MiniQMT installation path and your trading account number. These are saved to xttrader.yaml automatically.

uv run main.py
5

Configure your MCP client to connect to the server

The server runs as an SSE endpoint on port 8001. Add it to your MCP client config using the SSE URL.

{
  "mcpServers": {
    "qmt-mcp-server": {
      "url": "http://localhost:8001/sse"
    }
  }
}

QMT Examples

Client configuration

Cursor or Claude Desktop configuration connecting to the QMT-MCP-Server SSE endpoint at localhost:8001.

{
  "mcpServers": {
    "qmt-mcp-server": {
      "url": "http://localhost:8001/sse"
    }
  }
}

Prompts to try

Use these prompts in Chinese or English once QMT-MCP-Server is connected to your MCP client. Always use stock codes with exchange suffix to avoid ambiguity.

- "请帮我查询我的账户持仓" (Query my current positions)
- "查询我的账户可用资产" (Query my available account assets)
- "以10元的价格购买100股600000.SH股票" (Buy 100 shares of 600000.SH at 10 yuan)
- "撤销所有未成交订单" (Cancel all pending orders)
- "以11元的价格购买100股平安银行股票" (Buy 100 shares of Ping An Bank at 11 yuan — note: use stock codes for reliability)

Troubleshooting QMT

Server cannot connect to MiniQMT or raises a connection error on startup

Verify that MiniQMT is running and that the path configured in xttrader.yaml matches your MiniQMT installation directory. Delete xttrader.yaml and run `uv run main.py` again to re-enter the configuration if the path is wrong.

Order placed with a stock name fails or uses the wrong stock code

The server documentation explicitly warns that some LLMs may not correctly translate Chinese stock names to exchange codes. Always specify the full stock code with exchange suffix (e.g., 600000.SH for Shanghai, 000001.SZ for Shenzhen) when placing orders to avoid errors.

MCP client cannot reach the SSE endpoint at localhost:8001

Make sure `uv run main.py` is running and listening before connecting your MCP client. Check for port conflicts with `netstat -an | grep 8001`. If port 8001 is in use, update the port in main.py and the URL in your MCP client config accordingly.

Frequently Asked Questions about QMT

What is QMT?

QMT is a Model Context Protocol (MCP) server that qmt-mcp-server It connects AI assistants to external tools and data sources through a standardized interface.

How do I install QMT?

Follow the installation instructions on the QMT GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with QMT?

QMT works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is QMT free to use?

Yes, QMT is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "qmt": { "command": "npx", "args": ["-y", "qmt"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use QMT?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides