Bcy2020/dsh-cc-ecosystem--packages-cc-mcp1

dsh-cc-mcp

Load Claude Code MCP server configs (.mcp.json / plugin.json inline mcpServers) into DSH as runtime-registered tools: project-root .mcp.json → mcp__<server>__<tool>, plugin MCP → mcp__plugin_<name>_<server>__<tool> (official CC naming). Client bridge on the official @modelcontextprotocol/sdk — no config-row writes, zero-write path preserved.

AI 分析

核心用途是让 DSH 直接免重启加载并使用 Claude Code 格式的 MCP 工具。适合拥有大量现成 MCP 工具配置、需要动态扩展 Agent 能力的用户。

パッケージ
dsh-cc-mcp
バージョン
0.1.0
最終更新
2026/08/16

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Bcy2020/dsh-cc-ecosystem#486441ba06baddbc29b7f82431a795541d2c0369&path:packages/cc-mcp

ドキュメント

README 全文を読む ↗

dsh-cc-mcp

Load Claude Code MCP server configs into DeepSeek Harness as runtime-registered tools — no config-row writes, no restarts for config changes.

把 Claude Code 的 MCP 配置(.mcp.json / plugin.json 内联 mcpServers)以运行时注册工具的形式加载进 DSH。

What it does

SourceTool namespaceNotes
Project root .mcp.jsonmcp____DSH-native name, same as dsh-mcp-client rows
Plugin root .mcp.json / plugin.json inlinemcp__plugin____Official CC plugin naming (e.g. mcp__plugin_asana_asana__asana_create_task)
  • Dual-form parsing (shared dsh-cc-loader): accepts both the {"mcpServers": {...}} wrapper (project level / community plugins) and the bare server map (official plugin form).
  • Transports: stdio (command) and http (url → streamable-http) register as tools. sse / ws are reported as unsupported (DSH has no such transport) and never crash anything.
  • Env secrets stay out of configs: ${NAME} placeholders are kept verbatim in the IR and expanded at runtime from process.env; ${CLAUDE_PLUGIN_ROOT} expands to the plugin directory. Nothing is written to disk.
  • Lazy connections: tool schemas register eagerly (the model must see the list), the actual server process connects on first call, and disconnects after idleTimeoutMs without calls. Dead connections reconnect on the next call.
  • Hot reload: editing the project .mcp.json rebuilds running sessions' project MCP surface (~1 s).
  • Conflict semantics: a server already provided by a preset/host dsh-mcp-client row is skipped by default; "override": true in the server entry forces the project/plugin connection (agent layer shadows upper layers).

Trust model ⚠️

.mcp.json is executable project content — the same trust as package.json scripts. Installing this plugin enables that. Children run with a scrubbed environment (credential-shaped and stale DSH_* variables dropped), mirroring the official bridge.

Install (dev / local checkout)

# in packages/cc-mcp: install deps (official MCP SDK + shared loader)
npm install

# user patch layer (hot, no bundle reconcile):
# append to ~/.dsh/profiles/
/cordis.patch.yml
- insert:
    - id: cc-mcp
      name: 'dsh-cc-mcp'
      config:
        enableProject: true
        pluginRoots: []          # absolute paths to plugin dirs (future M4 feeds this)
        idleTimeoutMs: 300000
        toolCallTimeoutMs: 60000
        watchProject: true

Windows absolute paths in pluginRoots need file:///? No — these are plain directory paths inside the config, not module specifiers.

Config

FieldDefaultMeaning
enableProjecttrueread `
/.mcp.json` per session
pluginRoots[]extra plugin directories to scan (.mcp.json + plugin.json)
idleTimeoutMs300000idle disconnect (0 = never)
toolCallTimeoutMs60000per-call timeout
watchProjecttruehot-reload the project .mcp.json

Example

/.mcp.json:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
    }
  }
}

Sessions in that project get mcp__github__create_issue etc. on first tool list assembly.

License

MIT — runtime registration pattern ported from dsh-project-mcp-bridge (MIT, © KYinCode); parsing lives in dsh-cc-loader.