QMT

v1.0.0Finance & Fintechstable

A server application that enables large language models to execute stock trading operations through QMT trading system, providing functionality for account queries, position management, and order placement.

qmt-mcp-servermcpai-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 server application that enables large language models to execute stock trading operations through qmt trading system, providing functionality for account queries, position management, and order placem...

A server application that enables large language models to execute stock trading operations through QMT trading system, providing functionality for account queries, position management, and order placement.

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

Features

  • A server application that enables large language models to e

Use Cases

Execute stock trading operations through QMT trading system. Manage accounts, positions, and place orders programmatically.
nnquant

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx qmt-mcp-server

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 bridges large language models with the MiniQMT trading system, enabling AI assistants to query account assets, inspect open positions, place buy/sell orders, and cancel pending orders through natural language. It runs as a local SSE server that any MCP client can connect to, allowing traders to prototype automated workflows or query their portfolio status conversationally — with stock codes specified in exchange-suffixed format such as 600000.SH or 000001.SZ.

Prerequisites

  • Python 3.10 or later with the uv package manager installed
  • MiniQMT (迅投QMT) trading client installed and logged in on the same machine
  • A valid brokerage account connected to the QMT client
  • An MCP-compatible client such as Claude Desktop (configured to connect to the local SSE endpoint)
1

Install uv and clone the repository

Install the uv package manager, then clone the qmt-mcp-server repository.

# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and enter the repo
git clone https://github.com/nnquant/qmt-mcp-server.git
cd qmt-mcp-server
2

Install Python dependencies

Use uv to resolve and install all required packages defined in the project.

uv sync
3

First-run configuration

Run the server once; it will prompt you to enter the path to your MiniQMT installation and your trading account credentials. These are saved automatically to xttrader.yaml.

uv run main.py
4

Configure your MCP client to connect to the SSE endpoint

The server exposes an SSE endpoint at http://localhost:8001/sse. Add this URL to your MCP client configuration.

{
  "mcpServers": {
    "qmt": {
      "url": "http://localhost:8001/sse"
    }
  }
}
5

Start the server before using your MCP client

Launch the server in a terminal before opening your MCP client. Keep the terminal open for the duration of your session.

uv run main.py

QMT Examples

Client configuration

MCP client configuration pointing to the QMT server's local SSE endpoint.

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

Prompts to try

Example natural-language prompts for querying and managing a QMT trading account.

- "Query my current account asset balance"
- "Show me all open positions in my account"
- "Buy 100 shares of 600000.SH at 10 yuan per share"
- "Purchase 20% of available capital in 000001.SZ at market price"
- "Cancel all pending orders in my account"

Troubleshooting QMT

Connection refused when the MCP client tries to reach the SSE endpoint

Ensure the QMT server is running (uv run main.py) before connecting with your MCP client. The server must be started separately and kept running in a terminal — it does not auto-start as a background service.

Order rejected or 'account not found' error

Verify that the MiniQMT client is open and logged in with the correct brokerage account. The credentials in xttrader.yaml must match the active session in the QMT desktop application.

Stock code not found or invalid

All stock codes must include the exchange suffix: use .SH for Shanghai (e.g., 600000.SH) and .SZ for Shenzhen (e.g., 000001.SZ). Codes without the suffix will be rejected by the QMT API.

Frequently Asked Questions about QMT

What is QMT?

QMT is a Model Context Protocol (MCP) server that server application that enables large language models to execute stock trading operations through qmt trading system, providing functionality for account queries, position management, and order placement. 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 Apache 2.0 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-mcp-server": { "command": "npx", "args": ["-y", "qmt-mcp-server"] } } }

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