dsh-import-from-agents
Đã xác minhdsh-import-from-agents · v0.1.0-rc.1 · MIT
Import MCP servers and skills from other agent CLIs (Claude Code first) into a DeepSeek Harness profile.
Cài đặt
dsh plugin add dsh-import-from-agents Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.
Mã nguồn
Phát hành lên npm mà không có repository công khai. Hãy kiểm tra nội dung package trước khi cài.
Thẻ
Tác giả
Readme
dsh-import-agents
Import MCP servers and skills from Claude Code and Codex into a DeepSeek Harness profile — one command at a time, with full preview and explicit user control.
Overview
DSH shares the ~/.agents/skills convention with other agents, but does not read agent-specific MCP configurations. This plugin bridges that gap:
- MCP servers are translated from Claude Code (
~/.claude.json), project-level.mcp.json, and Codex (~/.codex/config.toml) intodsh-mcp-clientplugin rows written to a managed section of the profile'scordis.patch.yml. HMR applies them without a restart. - Skills are mapped from
~/.claude/skillsinto~/.dsh/skills(or a project-level.dsh/skills) via NTFS junctions or directory copies, with diff preview and granular selection.
Every operation is two-phase — preview first, then apply — so you always see what will happen before it happens.
Commands
MCP servers
/import-agents preview
Scans all configured sources (Claude global, project .mcp.json, Codex), merges them (later sources override earlier ones for the same server name), and lists every importable server with its transport, endpoint, and source annotation.
Each line is tagged:
[OK]— importable, with source label ([global],[project],[codex])[SKIP]— unsupported transport (SSE) or missing command/URL, with reason[WARN]— credential values replaced byprocess.env.*references
/import-agents apply all
/import-agents apply context7 gitnexus
Writes the selected rows into the profile's cordis.patch.yml inside a managed section delimited by # ── managed by dsh-import-agents ── markers. Everything outside that section is never touched. DSH hot-reloads the patch; each imported server connects through @deepseek-ai/dsh-mcp-client.
All generated rows carry failOnStartupError: false — a server that cannot connect does not block profile startup.
Skills
/import-agents skills
Compares ~/.claude/skills (source) against ~/.dsh/skills (target) and shows the diff. Each existing skill is counted as either a junction or a copy. The output includes a guided prompt for the next step:
Source: C:\Users\...\.claude\skills (33 skill(s))
Target: C:\Users\...\.dsh\skills (25 skill(s) — 25 junctions, 0 copies)
Scope: global | Method: junction (link)
[MISS] context7-mcp
[MISS] gitnexus-cli
...
Reply with your choices:
scope: global | project
method: junction | copy
skip: <name> <name> ...
/import-agents skills apply --scope global --method junction --skip context7-mcp
Creates junctions (or copies) for missing skills into the target directory. Flags:
| Flag | Values | Default | Description |
|---|---|---|---|
--scope |
global, project |
global |
Target: ~/.dsh/skills or <cwd>/.dsh/skills |
--method |
junction, copy |
junction |
Junction (live link) or independent copy |
--skip |
<name>... |
— | Skill names to exclude |
--only |
<name>... |
— | Only import these (mutually exclusive with --skip) |
Supported sources
| Source | Config location | MCP | Skills |
|---|---|---|---|
| Claude Code (global) | ~/.claude.json → mcpServers |
✅ | ✅ |
| Claude Code (project) | <project>/.mcp.json → mcpServers |
✅ | — |
| Codex | ~/.codex/config.toml → [mcp_servers.*] |
✅ | — |
~/.agents/skills |
Shared convention | — | Read natively by DSH |
Install
dsh plugin --profile web add dsh-import-from-agents
The bundle manifest auto-registers the plugin — no manual patch editing needed.
Security
- Zero network access. This plugin never makes outbound requests. It reads local config files and writes to one local file.
- Credentials are never inlined. Environment variable values and HTTP headers that match secret-shaped patterns (
token,secret,key,auth,password) are replaced with!!js process.env.*references in the generated patch. Set those variables yourself. - Managed section. The only file this plugin writes is the managed section of your profile's
cordis.patch.yml. Everything outside theBEGIN/ENDmarkers is preserved byte-for-byte. The file is validated as valid YAML before every write.
Limitations
- SSE transport is not supported by
dsh-mcp-clientand is skipped with a warning. Future versions may probe for a streamable-http endpoint at the same host. - Project-level MCP servers are written to the global profile patch. DSH has project-level skill directories (
<project>/.dsh/skills) but its cordis patch files are profile-level only. - Skills are mapped from
~/.claude/skillsonly. Other agent skill directories can be added as sources in future releases.
Development
Node ≥ 22, npm or pnpm.
npm install
npm run build # compiles src/ → lib/ with tsc
@deepseek-ai/* packages are peer dependencies with explicit prerelease ranges so 0.1.0-rc.* harness builds resolve correctly.