qq-mcp-bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qq-mcp-bridge fetch pending QQ private messages and reply to the latest sender"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
qq-mcp-bridge
把 QQ 官方机器人(bot.q.qq.com)接入 DeepSeek Harness 的 MCP 桥。
只做两件事:
能力 | 说明 |
私聊收发 | 用户私聊机器人 → 消息落到本地队列 → DSH 用 |
主动推送 | DSH 随时可调 |
不包含群聊消息。需要群聊请自行增加
send_group_message工具,并注意每个工具 schema 都会进入每次模型请求。
需要什么
在 QQ 开放平台 注册开发者、创建机器人并通过审核;
记下 AppID、ClientSecret(WebSocket 鉴权用;不是 QQ 密码);
Node.js >= 22.4;
本机网络能访问
api.bot.qq.com。
Related MCP server: qq-onebot-mcp
安装(DSH bundle)
npx -p @deepseek-ai/dsh dsh plugin --profile web add qq-mcp-bridge@0.1.0重启 DSH 后,工具以 mcp__qq__* 出现。
包通过 cordis.patch.yml 注册 @deepseek-ai/dsh-mcp-client:
- insert:
- id: qq-mcp
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: qq
transport: stdio
command: npx
args: ['-y', '-p', 'qq-mcp-bridge@0.1.0', 'qq-mcp-bridge']配置(不要把 AppSecret 提交进 Git)
复制示例:
New-Item -ItemType Directory -Force "$env:USERPROFILE\.qq-mcp-bridge" | Out-Null
Copy-Item .\config.example.json "$env:USERPROFILE\.qq-mcp-bridge\config.local.json"编辑 %USERPROFILE%\.qq-mcp-bridge\config.local.json:
{
"appId": "你的 AppID",
"clientSecret": "你的 ClientSecret",
"appToken": "",
"apiBase": "https://api.bot.qq.com"
}读取顺序:
QQ_CONFIG_FILE指定的文件;包根目录的
config.local.json;%USERPROFILE%\.qq-mcp-bridge\config.local.json。
也支持环境变量 QQ_BOT_APPID / QQ_BOT_CLIENT_SECRET / QQ_BOT_APP_TOKEN,但 DSH 启动 MCP 子进程时会清洗含 SECRET/TOKEN 的父环境变量,所以最稳的是本地 config.local.json,或在 DSH profile 的 env 块显式注入。
没有凭证时服务自动进入 mock 模式:不发网络请求,可用于验证 MCP 协议。
工具
工具 | 用途 |
| 取用户发来的待处理私聊消息 |
| 回复;带 |
| 查看机器人身份、mock/网关状态、待处理队列、已知联系人 |
主动推送需要 user_openid。它只能从对方发来的消息里获得;QQ 不提供“按 QQ 号查 openid”。同一个用户在不同机器人下的 openid 不同。
本地运行 / 自检
node src/mcp-server.js # stdio MCP
node src/doctor.js # 配置与连通性诊断
npm test # selftest + gateway 状态机测试Waker 插件(可选,本机 profile 使用):
- insert:
- id: qq-waker
name: '<qq-mcp-bridge 包路径>/waker/index.js'
config:
sessionId: '<目标 DSH 会话 ID>'
bridgeDir: '<qq-mcp-bridge 包路径>'
env:
QQ_BOT_APPID: '<你的 AppID>'
QQ_BOT_CLIENT_SECRET: '<你的 ClientSecret>'Waker 会持有 WebSocket,将入站消息直接注入指定会话;如果只用 MCP 工具,不需要它。
安全边界
本仓库不包含任何真实 AppID/AppSecret/openid/会话 ID;
state/、config.local.json、日志、测试抓包已被.gitignore排除;消息队列和联系人只写本机;
只支持 QQ 官方机器人私聊,不读取个人 QQ 协议,不模拟登录。
License
MIT
Available Tools
3 toolsbot_infoA
查询 QQ 机器人自身信息与桥接状态:机器人身份、是否处于 mock 模式、网关连接状态、待处理消息条数。用于排查配置问题。
Inputs: no named parameters.
fetch_messagesA
取出 QQ 用户发给机器人的待处理单聊消息。消息由后台 WebSocket 网关接收并排队,本工具只读取队列。队列为空是正常情况,说明当前没有新消息。
Inputs: limit, consume.
send_private_messageA
向指定 QQ 用户发送单聊消息。既可用于被动回复(传入刚才收到的 msg_id),也可用于主动推送(不传 msg_id,例如任务完成或定时提醒)。user_openid 与 msg_id 都来自 fetch_messages 或 bot_info 的返回值。
Inputs: content (required), user_openid (required), msg_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools cover three clearly distinct roles: sending a message, draining the inbound message queue, and inspecting bot/bridge status. There is no plausible way to confuse send_private_message with fetch_messages or bot_info, and the descriptions reinforce the send/receive/observe split.
send_private_message and fetch_messages both follow a consistent snake_case verb_noun pattern and pair naturally as outbound/inbound counterparts. bot_info breaks the pattern by using a bare noun with no verb, which is a minor deviation but a readable one.
Three tools is lean but appropriate for a thin WebSocket-to-MCP bridge whose job is just relay plus status. The surface is not padded, though it sits near the lower bound where an agent might want one or two more capabilities.
The core poll-then-reply loop is covered, but the surface stops at private chat: there is no group/conversation messaging, no media or non-text sending, no history or message-lookup beyond the live queue, and no acknowledgement semantics for processed messages. These are notable gaps for a general QQ bot bridge even if private-only was intentional.
Maintenance
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Hosted WhatsApp MCP server for AI agents — read, search, send messages, media, polls, and groups.
211Human-input bridge for AI agents with voice-first answer links, MCP tools, and HTTP APIs.
WhatsApp and Telegram for AI agents, behind a policy gateway. OAuth or access key.
Related MCP Servers
- AlicenseBqualityCmaintenanceConnects QQ via NapCat OneBot v11 to an Astral Code app-server, exposing MCP tools for sending messages, files, images, and fetching conversation history.102Apache 2.0
- FlicenseAqualityBmaintenanceEnables MCP hosts to bridge with QQ via NapCat/OneBot 11, allowing whitelisted private messages to reach an agent with full tool access while group mentions are answered by a sandboxed pure LLM without system access.8-
- AlicenseAqualityCmaintenanceEnables interaction with QQ through official bot APIs or personal accounts bridged via NapCat/OneBot v11, including status checks, target listing, bounded context retrieval, and plain-text sending to allowlisted conversations.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables an AI agent to fetch queued OneBot v11 QQ private and group messages, retrieve inbound images for vision-capable models, and send text, images, or files with request-id deduplication. Also exposes acknowledgment, message history, conversation and contact listing, delivery status, and bridge health so agents can drive a persistent SQLite-backed QQ message loop.MIT