qzone-mcp
MCP server for QZone (QQ space) integration, enabling publishing, listing, liking, and commenting on posts through the QzoneUltra daemon and NapCat.
README
qzone-mcp
Independent local MCP wrapper for astrbot_plugin_qzone_ultra + NapCat.
This is an independent community integration. It is not affiliated with, endorsed by, or maintained by QZoneUltra, NapCatQQ, AstrBot, or Tencent.
Architecture:
Codex -> MCP (stdio) -> adapter -> QzoneUltra daemon (127.0.0.1) -> QZone
NapCat (127.0.0.1) -> credentials -> adapter -> daemon /bind
The Ultra source is treated as an external dependency and is not modified or copied into this project.
Credits and licensing
- astrbot_plugin_qzone_ultra is an external runtime dependency by 雪碧bir, licensed under MIT. Its source is not bundled in this repository.
- NapCatQQ supplies the external QQ login and OneBot runtime. Its source and binaries are not bundled in this repository. Users must install it separately and comply with its own Limited Redistribution License, including its non-commercial-use terms.
- This MCP wrapper is licensed under the MIT license in LICENSE.
See THIRD_PARTY_NOTICES.md for the exact upstream references used by this project.
Safety boundary
- NapCat and Qzone daemon URLs are rejected unless they use
127.0.0.1orlocalhost. - Cookie/CSRF values are only used internally for daemon binding.
- MCP results are recursively sanitized to remove credential-like keys.
- Cookie values are not intentionally logged.
Install
- Keep/clone QzoneUltra somewhere on disk and install its own requirements there.
- Install this MCP:
cd D:\qzone-mcp
python -m pip install -e .
- Set environment variables from
.env.examplein your Codex MCP configuration.
Example Codex MCP config:
[mcp_servers.qzone]
command = "python"
args = ["-m", "qzone_mcp"]
[mcp_servers.qzone.env]
NAPCAT_URL = "http://127.0.0.1:3000"
NAPCAT_TOKEN = "YOUR_NAPCAT_TOKEN"
QZONE_ULTRA_ROOT = "D:\\path\\to\\astrbot_plugin_qzone_ultra"
QZONE_DATA_DIR = "D:\\qzone-mcp-data"
QZONE_MEDIA_ROOT = "D:\\qzone-mcp-media"
QZONE_DAEMON_PORT = "18999"
QZONE_AUTO_START_DAEMON = "true"
QZONE_AUTO_BIND = "true"
If an Ultra daemon is already running, set QZONE_DAEMON_SECRET to the same secret and optionally set QZONE_AUTO_START_DAEMON=false.
First test
Ask Codex to call qzone_status first. It should verify:
- local daemon reachable;
- NapCat returns the logged-in QQ number;
- QZone cookie exists;
p_skeyexists if NapCat exposes the required QZone cookie;- daemon accepts the internal bind.
Only after that call qzone_publish.
Tools in v0.3
qzone_statusqzone_list_postsqzone_get_postqzone_publish(direct publish; text + multiple local images)qzone_prepare_publish(preview only; returns one-time confirmation token)qzone_confirm_publish(publishes a prepared preview)qzone_likeqzone_unlikeqzone_commentqzone_reply_commentqzone_deleteqzone_visitors
Video is intentionally left out of the first version.
v0.2 notes
- Keeps the existing direct publish flow unchanged.
- Adds an optional two-step preview/confirm publish flow to reduce accidental posts.
- Retries once with a fresh NapCat QZone credential bind when the daemon reports an authentication/login failure.
- Tightens local-only URL validation using parsed loopback hostnames (including
::1) instead of string prefixes. - Multi-image input continues to use the existing
images: list[str]path and is validated againstQZONE_MEDIA_ROOT. QZONE_PUBLISH_PREVIEW_TTLcontrols preview-token lifetime in seconds (default600).
v0.3 notes
- Keeps all v0.2 behavior and APIs unchanged.
- Confirms feed listing, post detail, comments, replies, delete, and like flows are exposed as MCP tools.
- Adds a dedicated
qzone_unliketool so agents do not need to rememberunlike=true.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。