Skip to main content
Glama
qinglong
by Jxells

dsh-qinglong-mcp

青龙面板 MCP 接入,按 dsh 标准插件形态重写:一个 Cordis 插件 + 一份 schemastery Config, 面板地址、Client ID/Secret、账号池变量名全部在 Settings → 插件 里改,改完即时生效。

旧版(@local/qinglong-mcp)只是把 dsh-mcp-client 的一行 YAML 配置写死在包内, 换个地址就得改文件、重启,还得记得「改的是 node_modules 里那份还是源码那份」。这版把配置搬进设置。

它做什么

  • 在宿主里注册一台 MCP 服务器(serverName 默认 qinglong),工具名 mcp__qinglong__*

  • 暴露五个工具:列账号池、按 uid/手机号取 cookie、列/读/写环境变量,细节见 docs/DETAIL.md

  • 设置项全部 volatile:改动只重建这台服务器,不重启 Host;clientSecret 是 role('secret'),界面不回读明文

Related MCP server: qinglong-mcp

架构(为什么这么写)

        ┌──────────────────────────── dsh Host ────────────────────────────┐
Settings│  Config schema (schemastery)  ──► 表单字段,写入 profile 补丁层  │
  UI    │                                                                  │
        │  dsh-qinglong-mcp (本插件)                                       │
        │    apply(ctx, config)                                            │
        │      └─ ctx.mcpManager.register('qinglong', entry)               │
        │                    │                                             │
        │                    ▼                                             │
        │           dsh-mcp-manager → dsh-mcp-client → node server.mjs      │
        └──────────────────────────────────────────────────────────────────┘

密钥为什么保存后还是空的

role('secret') 字段在宿主 redactSecrets 里就被抹掉了,浏览器永远收不到明文——所以保存成功后输入框仍然是空的, 这是正常的。卡片用 describe() 里的 secrets[].set 判断状态:已设置时占位符显示「已设置;留空表示不修改」, 未设置时显示「未设置,填入后点保存」。想改就填新的再保存,想删就留空并清掉整个字段(或删补丁层里那一行)。

设置卡片从哪来

dsh 的「插件」页不会给第三方 bundle 自动生成表单:它只渲染该 bundle 自己注册到 plugins.bundle.config 槽位的卡片(PluginManagerPage.tsx 用 configured = ledger.bundles.has(pkg.name) 判断)。 所以本包除宿主半身 index.js 外还带一个客户端半身 client.js:注册槽位、读 ctx.configForms.get('<条目 id>') 的快照、保存时 mutate() 写回 profile 补丁层。 密钥字段在快照里根本不存在(宿主 redactSecrets 会抹掉),所以输入框永远从空值渲染, 留空即表示不修改。

三个刻意的决定:

  1. 不 import 任何 dsh 内部包(除了 npm 上的 @deepseek-ai/schemastery)。 profile 里安装的第三方插件解析不到 @deepseek-ai/*(它们只存在于全局 dsh 安装目录里), import 了就会在启动时无声失败。连接 MCP 这件事交给宿主已有的 ctx.mcpManager 服务。

  2. 配置整体 volatile,插件监听 loader/volatile-update 重新注册。 这样设置改动是热生效,而不是「改完重启一次」。

  3. MCP 服务器脚本随包分发(server.mjs),用 process.execPath 启动, 不写死任何机器路径,换机器也能跑。

安装

从本地目录(本机开发/自用最快)

node scripts/install.mjs                 # 默认装进 web profile
node scripts/install.mjs --profile tui   # 或别的 profile

脚本会:移除旧的 @local/qinglong-mcp(如果装着)→ 把本包以 file: 依赖加进 profile → 更新 dsh.profile.bundles → 把旧插件的 QL_* 配置迁移成新插件的设置项 → pnpm install。

从 git

node scripts/install.mjs --from git+https://github.com/Jxells/dsh-qinglong-mcp.git
# 或手动:
dsh plugin --profile web add git+https://github.com/Jxells/dsh-qinglong-mcp.git

装完重启一次 dsh(~/dsh.sh),之后改设置就不用再重启了。

设置

Settings → 插件 → 青龙面板接入:enabled、serverName、url、clientId、clientSecret、 envName、nodePath、startupTimeoutMs、toolCallTimeoutMs,逐项含义见 docs/DETAIL.md。

设置写入 profile 补丁层,形如:

- id: qinglong-mcp
  name: dsh-qinglong-mcp
  config:
    url: http://127.0.0.1:5700
    clientId: your-client-id
    clientSecret: '${credential:qinglong.secret}'
    envName: XM_ACCOUNTS_B64

开发

pnpm install          # 只装 @deepseek-ai/schemastery
pnpm test             # node --test,覆盖配置→条目映射与注册/撤回时序

发布到自己的 git

bash scripts/publish.sh git@github.com:USER/dsh-qinglong-mcp.git

脚本会 git init(首次)、提交、设 origin、推 main。需要本机已有该仓库的写权限(SSH key 或 PAT)。

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables interaction with Qinglong Panel (青龙面板) to query, execute, and monitor scheduled tasks and subscriptions, including viewing task lists, running tasks synchronously or asynchronously, retrieving execution logs and status.
      7
      1
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      MCP server that lets AI clients manage a Qinglong (qinglong) panel via natural language, covering crons, environment variables, scripts, subscriptions, logs, configs, and dependencies through its Open API.
      42
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables MCP clients to connect to miyoushe and HoYoLAB accounts with QR login, encrypted credential storage, multi-account and game role discovery, daily notes for Star Rail, Genshin Impact, and Zenless Zone Zero, plus stamina alert checks with deduplication.
      9
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Exposes the non-messaging half of the OneBot v11 protocol (currently targeting SnowLuma) as MCP tools, so models can query login info, groups, members, messages and credentials, and perform management actions such as kicking, muting, renaming groups or cards, leaving groups, and approving friend or join requests. A read-only mode can restrict it to query tools only.
      27
      1
      AGPL 3.0