QMT-MCP-Server logo

QMT-MCP-Server

Community
nnquant

QMT-MCP-Server

Publishernnquant
Repositoryqmt-mcp-server
LanguagePython
Forks
15
Stars
46
Available tools
0
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    QMT-MCP-Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    46 stars and 15 forks from the linked repository.

QMT-MCP-Server

赋予大模型执行股票交易的能力!

QMT-MCP-Server 是一个基于 MCP (Model Control Protocol) 的服务器应用,用于对接迅投 QMT 交易系统,提供股票交易相关的功能接口。

本项目仅供交流学习使用,请谨慎用于实盘环境

已实现功能

  • 账户资产查询
  • 持仓信息查询
  • 下单
  • 撤单

系统要求

  • Python >= 3.10
  • 开通QMT交易权限,且本地已启动miniqmt

安装说明

使用前请先安装python包管理工具 uv

安装方法请参考 https://docs.astral.sh/uv/getting-started/installation/#github-releases

  1. 克隆项目到本地
bash
git clone https://github.com/nnquant/qmt-mcp-server
  1. 安装依赖:
bash
uv sync
  1. 运行项目
bash
uv run main.py

配置说明

首次运行时,系统会提示输入必要的配置信息:

  • MiniQMT 所在路径
  • 资金账户

配置信息将自动保存在 xttrader.yaml 文件中。

MCP使用技巧

  1. 选择合适的MCP客户端,配置好MCP服务器,例如在Cursor中,配置如下:
json
{
  "mcpServers": {
    "qmt-mcp-server": {
      "url": "http://localhost:8001/sse"
    }
  }
}
  1. 指令案例
  • 请帮我查询我的账户持仓
  • 以10元的价格购买100股600000.SH股票
  • 以11元的价格购买100股平安银行股票
    • (由于不同大模型的差异,部分情况下可能无法正确转换股票名称到股票代码,使用股票名称下单请谨慎)
  • 以XX的价格为我购买20%可用仓位的XXXX股票
  • 配合其他MCP服务完成选股交易的一条龙

注意事项

  • 使用前请确保 MiniQMT 系统正常运行
  • 交易前请仔细核对账户信息
  • 所有股票代码需要包含交易所后缀(.SH 或 .SZ)
  • 本程序仅用于交流和学习,请谨慎用于实盘,本人不承担任何使用者使用本程序所造成的损失

Installation

TypingMind
{
  "mcpServers": {
    "qmt-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "main.py"
      ]
    }
  }
}

Use QMT-MCP-Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once QMT-MCP-Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add QMT-MCP-Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the QMT-MCP-Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "qmt-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the QMT-MCP-Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the QMT-MCP-Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use QMT-MCP-Server to help me with this task?
QMT-MCP-Server
Sure. I read it.
Here is what I found using QMT-MCP-Server.

Frequently asked questions

What is the QMT-MCP-Server MCP server used for?

QMT-MCP-Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use QMT-MCP-Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use QMT-MCP-Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use QMT-MCP-Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With QMT-MCP-Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect QMT-MCP-Server MCP to TypingMind?

QMT-MCP-Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does QMT-MCP-Server MCP provide in TypingMind?

QMT-MCP-Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use QMT-MCP-Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If QMT-MCP-Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇