QMT
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.
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
Maintainer
Works with
Installation
Manual Installation
npx qmt-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-serverInstall Python dependencies
Use uv to resolve and install all required packages defined in the project.
uv syncFirst-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.pyConfigure 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"
}
}
}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.pyQMT 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.
QMT Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to QMT? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
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.
Set Up QMT in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.