NexusAgentX/dsh-mcp-adapter ↗★ 0
dsh-mcp-adapter
MCP adapter for DeepSeek Harness — one proxy tool instead of dumping every MCP schema into context.
AI Analysis
核心用途是提供一个 `mcp` 代理工具,按需调用 MCP 服务,防止将所有 MCP 架构一次性载入上下文。适合需要连接多个 MCP 服务且关注 Token 消耗的用户。
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:NexusAgentX/dsh-mcp-adapterREADME
Read the full README ↗dsh-mcp-adapter
Use MCP servers with DeepSeek Harness without burning the context window.
One mcp proxy tool. Lazy server start. On-demand search / describe / call.
English | 中文
Why this exists
DeepSeek Harness already ships @deepseek-ai/dsh-mcp-client. That client connects at startup and registers every advertised MCP tool as a native mcp____ function. Schema cost is paid on every request.
This adapter follows the pi-mcp-adapter contract instead:
- one
mcpproxy tool instead of hundreds of schemas - lazy server start
- on-demand
search/describe/call - standard
.mcp.json/~/.config/mcp/mcp.jsondiscovery - optional
directToolspromotion for hot-path tools - metadata cache so search works before a live connect
It is an independent plugin. It is not affiliated with DeepSeek AI.
Do not mount this adapter and @deepseek-ai/dsh-mcp-client against the same servers. They would double-connect and fight over names.
Install
dsh plugin --profile web add dsh-mcp-adapter
Restart the profile (dsh web / dsh tui) after install.
Quick start
Preferred project config: .mcp.json
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@1.6.0"]
}
}
}
Then:
mcp({ search: "screenshot" })
mcp({ describe: "chrome-devtools_take_screenshot" })
mcp({ tool: "chrome-devtools_take_screenshot", args: { format: "png" } })
args can be a JSON object or a JSON string.
Config files
| File | Purpose |
|---|---|
~/.config/mcp/mcp.json | User-global shared MCP config |
~/.agents/mcp.json | User-global tool-agnostic MCP config |
~/.agents/mcp/mcp.json | User-global tool-agnostic MCP config |
.mcp.json | Project-local shared MCP config |
$DSH_HOME/mcp.json | dsh global override (~/.dsh/mcp.json by default) |
.dsh/mcp.json | dsh project override |
Later files win. /mcp disable and /mcp enable write only the disabled field to .dsh/mcp.json. They never copy credentials.
Host-specific configs (Cursor, Claude Code, Codex, OpenCode, Windsurf, VS Code) are detected by dsh-mcp-adapter init and /mcp list. They are not loaded unless you set settings.hostConfigDiscovery to "on" or list them in imports.
{
"imports": ["cursor"],
"settings": {
"hostConfigDiscovery": "off",
"toolPrefix": "server",
"idleTimeout": 10
},
"mcpServers": {}
}
Server options
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "some-mcp-server"],
"lifecycle": "lazy",
"idleTimeout": 10,
"requestTimeoutMs": 30000,
"directTools": ["search"],
"includeTools": ["search", "get_*"],
"excludeTools": ["admin_*"],
"searchKeywords": {
"search": ["find", "lookup"]
}
}
}
}
| Field | Meaning |
|---|---|
lifecycle | lazy (default), eager, keep-alive, lazy-keep-alive |
idleTimeout | Minutes before an idle lazy server is closed (default 10, 0 disables) |
directTools | true or a name list — register those tools as native dsh tools |
url / headers / bearerToken / bearerTokenEnv | Streamable HTTP; SSE fallback on 404/405 |
disabled | Keep the entry visible but do not connect |
Human command
/mcp
/mcp list
/mcp connect
/mcp enable
/mcp disable
CLI
dsh-mcp-adapter init
dsh-mcp-adapter status
Status
| Piece | 0.1.0 |
|---|---|
mcp proxy tool | yes |
.mcp.json merge + host discovery | yes |
| lazy / eager / keep-alive | yes |
| metadata cache | yes |
/mcp command | yes |
directTools | yes |
resources as read_* tools | yes |
| output guard | yes |
| OAuth browser flow | not yet — use headers / bearerToken |
| MCP prompts / elicitation / sampling / UI apps | not yet |
License
Inspired by pi-mcp-adapter (MIT). See NOTICE.
中文
给 DeepSeek Harness 用的 MCP 适配器:一个代理工具,按需搜索 / 描述 / 调用,而不是把每个 MCP schema 都塞进上下文。机制对齐 pi-mcp-adapter。
dsh plugin --profile web add dsh-mcp-adapter
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@1.6.0"]
}
}
}
mcp({ search: "screenshot" })
mcp({ tool: "chrome-devtools_take_screenshot", args: { format: "png" } })