Vai al contenuto principale
P

dsh-qwen-mcp

paysnatal/dsh-qwen-mcp

Connects all seven Qwen Token Plan Harness-entitlement MCP services (enhanced search, web fetch, code interpreter, vertical search, image, TTS, ASR) plus the decision-model-preview model (qwen_decide) as native tools, with a per-service on/off and live-status panel.

Installazione

dsh plugin --profile web add github:paysnatal/dsh-qwen-mcp

README

dsh-qwen-mcp

All seven Qwen Token Plan Harness-entitlement MCP services — plus the decision model — connected in one step. A DeepSeek Harness (dsh) plugin that mounts the One Key MCP services bundled with a Qwen Token Plan subscription — enhanced web search, web fetch, code interpreter, vertical search, image generation, TTS, and ASR — as native mcp__qwen-* tools consuming your plan's free monthly Harness quota, registers the decision-model-preview decision model as the native qwen_decide tool, and adds a per-service on/off switch and live status panel.

npm version License: MIT DSH plugin

English | 简体中文


Why this plugin exists

A Qwen Token Plan (Standard / Pro) subscription bundles seven Harness-entitlement MCP services with free monthly quota. Wiring them by hand is genuinely tedious, because the facts are scattered across several documentation pages:

  • The services live on two different hosts (maas.qianwenaiapi.com and cn-beijing.maas.qianwenaiapi.com).
  • The service names do not follow one convention (EnhancedSearch, WebFetch, CodeInterpreter, VerticalSearch, TextGenerateImage, TextGenerateSpeech, SpeechGenerateText).
  • They authenticate with the platform API key (sk-ws-), not the Token Plan model key (sk-sp-) — mixing them up yields nothing but 401s.

This plugin packages all of that: one install, seven services, correct hosts, correct names, key from the DSH credential store, plus a management panel.

The current state of Qwen tooling (honest context)

It helps to know what already exists, because Qwen's capabilities reach agents through two separate paths that do not cover each other, and the setup experience is uneven:

  • The QianWen skill pack (QianWen-AI/qianwen-ai) ships a one-command installer for a bundle of Agent Skills. It is maintained, but on a slow cadence, and several of its open issues report content that has fallen out of date with the Token Plan platform — stale model catalogs, incorrect quota/permission guidance, unsupported-but-documented models, and a missing ASR skill. Crucially, it does not cover the Harness-entitlement MCP services at all.
  • The Harness-entitlement MCP services (the seven this plugin mounts, plus the decision model) have no installer and no maintained integration tooling. The official guidance is a collection of per-tool, per-capability manual snippets — a Slash Command for one client, a skill file for another, a raw curl for a third — spread across separate documentation pages. You are expected to assemble that wiring yourself, keep the hosts/names/keys straight, and maintain it as the platform changes.

So the gap this plugin fills is real: there is currently no single, maintained, one-stop way to bring the Token Plan MCP entitlements into an agent. This plugin is an attempt to be that — community-maintained, not an official Qwen project.

What it provides

EntitlementServiceTools
Enhanced web searchEnhancedSearchmcp__qwen-search__search_pro
Web page parsingWebFetchmcp__qwen-web__web_fetch
Code interpreterCodeInterpretermcp__qwen-code__execute_code
Vertical searchVerticalSearchmcp__qwen-vsearch__poi_search, medical_search
Image generationTextGenerateImagemcp__qwen-image__bailian_image_gen, bailian_image_edit, bailian_image_fusion
Text-to-speechTextGenerateSpeechmcp__qwen-tts__bailian_tts
Speech recognitionSpeechGenerateTextmcp__qwen-asr__bailian_speech_to_text, bailian_multichannel_speech_to_text

Seven services, eleven tools. Calls consume the plan's free monthly Harness quota (which does not draw down model Credits); after the free quota is exhausted, usage bills at the plan's discounted rate. See the platform's Harness benefits page for the quota table.

The decision model (qwen_decide)

decision-model-preview is a Token Plan model for structured judgments — classification, moderation, routing, threshold checks — that answers typed questions (choice / score / noul) over a state object with choice, probabilities, and confidence, and no generated prose. The plugin registers it as the native qwen_decide tool with a typed schema, so the model calls it like any tool instead of shelling out to curl.

Unlike the seven MCP services, the decision model is a direct Token Plan API, not MCP, and it bills against model Credits like other Token Plan models (it has no free Harness quota). It authenticates with the Token Plan key (sk-sp-, credential ref QWEN_TOKEN_PLAN_CN_API_KEY) rather than the platform key.

Install

From the DSH plugin market (recommended). Open Plugins → Discover and search for dsh-qwen-mcp, or from the CLI:

dsh plugin add dsh-qwen-mcp

Then add your API keys. The plugin reads auth at runtime from DSH credential references and never stores key values itself. Add to ~/.dsh/.credentials.yaml:

version: 1
refs:
  QWEN_MCP_KEY: sk-ws-…            # platform key (pay-as-you-go): the 7 MCP services
  QWEN_TOKEN_PLAN_CN_API_KEY: sk-sp-…  # Token Plan key: the decision model (usually already set for the Qwen provider)

Get the platform key from the QianWen platform's API Keys page (the sk-ws- key in the pay-as-you-go section); the sk-sp- Token Plan key is the one your Qwen model provider already uses. DSH picks up credential-file changes automatically.

The control panel

Settings → Plugins → “Qwen MCP” tab.

  • Per-service switch — eight rows: the seven MCP services plus the decision model. Turn any row off; its tools leave the model's tool list immediately, and return on re-enable.
  • Live status badge — connected / connecting / reconnecting / disabled / failed / waiting-for-credentials, streamed from the MCP manager (the decision row shows enabled/disabled from its config switch).
  • Restart button — rebuild one MCP server's connection with a fresh reconnect budget.

A diagnostics line at the bottom reports the status-stream state, so any connectivity problem shows its cause in place.

How it works

  • The bundle's cordis.patch.yml configures the seven services as managed entries on DSH's built-in dsh-mcp-manager — no custom host code, no background processes. The manager owns connection, reconnection, and status; enabled flags are the native per-service switches, persisted through the DSH settings service.
  • Auth uses a ${credential:QWEN_MCP_KEY} template with expandTemplates, so the key resolves at runtime from the DSH credential store and is redacted from diagnostics. No secret ever appears in the plugin config, the repo, or the session log.
  • The browser half (client.js) registers the Settings tab. Two DSH client-plugin rules it follows: each consumed Remote namespace must be injected as its own service (remote, remote.mcpManager, remote.settings), and a stream Remote returns a handle that is awaited before iteration.
  • The decision tool is registered on the host side with a native conditional registration (when), so its switch — a volatile config field written through the settings service — removes it from the model's catalog live, exactly like a disabled MCP server. The tool resolves QWEN_TOKEN_PLAN_CN_API_KEY per call, so a rotated key applies without restart.
  • Works in the Web GUI and Desktop. The only dependency is @deepseek-ai/schemastery for the config schema; the panel module is plain JavaScript served as-is.

Limitations

  • Subscription required — the services and free quota come with Token Plan Standard / Pro. Without a subscription, calls authenticate but bill at list price.
  • The decision model bills Credits — it is a Token Plan model, so qwen_decide calls draw down model Credits (personal plan only, per the platform docs), unlike the seven services' free Harness quota.
  • One key for all seven services — the One Key design authenticates every service with the same platform key; per-service keys are not supported by the platform.
  • No OAuth — the platform exposes static API keys; there is no sign-in flow to automate.
  • ASR needs public URLs — bailian_speech_to_text accepts audio/video by public HTTPS URL, matching the upstream service contract.

Compatibility

  • DeepSeek Harness 0.2.x (uses dsh-mcp-manager configured entries, ${credential:…} templates, native conditional tool registration, and the client Remote/module system).
  • One dependency (@deepseek-ai/schemastery); no build step.

Development

Layout: cordis.patch.yml (the seven managed server entries), index.js (host half: the qwen_decide tool and its config schema), client.js (the Settings tab panel), docs/DETAIL.md (the plugin detail page), locale/, icon.svg. Install the checkout as a linked bundle through the plugin manager to iterate.

Release notes

VersionChanges
1.1.1Documentation: added an honest "current state of Qwen tooling" section (the skill pack is maintained but lags the platform; the MCP entitlements have no maintained installer). No code changes.
1.1.0Added the decision model: qwen_decide native tool over decision-model-preview (choice/score/noul questions, choice/probabilities/confidence answers), with its own panel switch via a volatile config field; runtime auth from QWEN_TOKEN_PLAN_CN_API_KEY.
1.0.0Initial release. Seven Harness-entitlement MCP services as managed entries on dsh-mcp-manager; per-service enable switches; Settings → Plugins panel with live status, restart, and stream diagnostics; ${credential:QWEN_MCP_KEY} runtime auth; bilingual documentation.

License

MIT © PaysNatal


Not affiliated with Alibaba Cloud or the QianWen platform. “Qwen” and related names belong to their respective owners.

Plugin correlati