Onenightcarnival/dsh-toolkit--packages-config-center ↗★ 0

@onenightcarnival/dsh-config-center

管理 MCP 服务与内置插件通用设置 适合需要测试 MCP 连接、调整上下文压缩阈值的用户。

套件
@onenightcarnival/dsh-config-center
相容性
待驗證
版本
0.7.0
授權
MIT
最近更新
2026年9月30日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Onenightcarnival/dsh-toolkit#7236bae91c91e7f20efbc91f7ff06caedd9ddbd2&path:packages/config-center

@onenightcarnival/dsh-config-center

English | 中文

Configuration center for DeepSeek Harness: MCP server management in the main sidebar, and common settings of built-in plugins in Settings → Plugins.

EntryContent
Sidebar → MCP (before AI Subscriptions)Server list with live state; add, edit, enable / disable, delete; connection test
Settings → Plugins → Common settingsCommon options of built-in plugins: round limit of goal mode; switch and trigger threshold of automatic context compaction

Installation

dsh plugin --profile web add file:./onenightcarnival-dsh-config-center-.tgz

The integrated package @onenightcarnival/dsh-toolkit contains this plugin under the module key configCenter.

Storage

Configuration lives in the active profile's cordis.patch.yml. The plugin has no data file of its own.

ContentForm in the file
MCP serversEntries of top-level insert lists whose name is @deepseek-ai/dsh-mcp-client
Built-in plugin settingsTop-level override rows - id: : one config key, or the disabled field

Edits address rows by entry id. Other rows, comments and !!js expressions stay as written; a field the form left unchanged keeps its formatting; fields outside the form (timeouts, reconnect policy) stay. Hand-written MCP entries appear in the list.

OperationFile change
Add a serverEntry id mcp-, appended to the insert list that holds MCP entries; a new row when none exists
RenameAn id of the form mcp- follows the name; a hand-chosen id stays
Enable / disableWrites the entry's disabled; disabled in override rows of the same id is removed
Delete a serverRemoves the entry and override rows of the same id; an emptied insert list goes with it
Blank settingRemoves the key; an override row left with only id goes with it

Application

HostAfter a save
Hot reload on (web profile default)Applied through Loader reconciliation; on failure the file and the running composition are restored and the route returns the error
Hot reload offWritten to the file; applies after dsh restarts

Saving an enabled MCP server waits for its first connection. The first npx / uvx run downloads dependencies.

Expressions

A field value starting with !!js is a Loader expression, written as a !!js scalar and evaluated by the host at load time:

!!js process.env.GITHUB_TOKEN
!!js `Bearer ${process.env.MCP_TOKEN}`

Live state

StateMeaning
ConnectedEntry loaded; tools are registered under mcp____
Loaded, no toolsEntry loaded without tools: disconnected, or the server has none
LoadingEntry is starting
FailedEntry failed to start; the error is attached
DisabledEntry is disabled
Not loadedEntry is in the file; the running composition does not have it

Connection test

The test is independent of the running composition, uses the form's current values and writes nothing.

TransportProcedureTimeout
stdioStarts the command with the environment dsh-mcp-client gives it, runs initialize and tools/list, then stops the process90 seconds
streamable-httpPOST initialize, then tools/list on the same session8 seconds per request

Routes

Path prefix /api/dsh-config-center. Loopback only; the Web UI's browser session is required.

RequestPurpose
GET /mcpServer list with live state
POST /mcpCreate or update: { id?, server }
DELETE /mcp?id=Delete
POST /mcp/testConnection test: { server }
GET /settingsOptions with their current overrides
POST /settingsSave: { values }; null restores the default
StatusMeaning
400Invalid field; issue names the reason
409Edit refused: duplicate name, id taken, entry missing
500Write or reconciliation failed; the file is restored

Config

- id: config-center
  config:
    enabled: false   # routes off; default true

Adding a setting

One row in SETTINGS of src/settings.ts; the first option of a new entry adds the entry id to SETTING_GROUPS. Copy goes to src/client/locales.ts under setting., setting..hint, group. and group..hint.

Development

pnpm --filter @onenightcarnival/dsh-config-center run build
pnpm --filter @onenightcarnival/dsh-config-center run test         # patch document edits
pnpm --filter @onenightcarnival/dsh-config-center run test:smoke   # real host, isolated data directory

License

MIT. Third-party notices: THIRD_PARTY_LICENSES.txt.