dsh-mcp-bridge
dsh-mcp-bridge
将 DeepSeek Harness 工具以标准 MCP Server 的形式暴露出来——从 Claude Code、Codex、OpenClaw 或任何兼容 MCP 的客户端驱动
dsh。
dsh-mcp-bridge 将你正在运行的 DeepSeek Harness 变成一个基于 streamable HTTP 的 Model Context Protocol 服务器。任何 MCP 客户端都可以通过 安全白名单 发现并调用真正的 DSH 工具(文件读取、glob、grep、网络搜索……),同时你的工作区在每次调用时仍保留 DSH 自身的沙箱和审批流程。
零依赖。零构建步骤。安装即用。
为什么
官方 | dsh-mcp-bridge(本项目) | |
方向 | DSH → 外部 MCP 服务器(将工具引入进来) | 外部 MCP 客户端 → DSH(将工具暴露出去) |
传输方式 | stdio / streamable-http 客户端 | 位于 |
客户端 UI | 无(YAML 配置) | —(路线图:管理面板) |
官方客户端回答的是“如何在 dsh 中使用 MCP 服务器?”。本项目回答的是相反的问题:“其他代理如何将 dsh 用作工具提供方?”。
Related MCP server: local-env-mcp
快速开始
1. 安装捆绑包
# from a checkout
dsh plugin --profile <name> add ./mcp-bridge
# or from GitHub (zero build — plain JS)
dsh plugin --profile <name> add github:you/dsh-mcp-bridge2. 配置(可选)
捆绑包中的 cordis.patch.yml 已经将服务器挂载到 /mcp,并带有安全的默认白名单。你可以在自己的 profile 的 cordis.patch.yml 中调整它:
- id: mcp-bridge
config:
path: /mcp # endpoint path
allowlist: # DSH tools exposed to MCP clients
- read
- glob
- grep
- web_search3. 连接任意 MCP 客户端
# Claude Code
claude mcp add --transport http dsh http://127.0.0.1:3080/mcp
# Any MCP client / SDK
# URL: http://127.0.0.1:3080/mcp工具以 dsh_<name> 的形式出现(例如 dsh_read、dsh_glob、dsh_grep、dsh_web_search)。
安全模型
默认白名单 只暴露只读、低风险的工具(
read、glob、grep、web_search)。硬性黑名单(
pwsh、write、edit、子代理编排、cordis 控制……)永远无法被暴露——即使被错误地配置进白名单。每次调用仍然会经过 DSH 自身的 沙箱 + 审批 流程。
仅在回环地址(
127.0.0.1)上提供服务;除非你确认网络可信,否则不要绑定0.0.0.0。
双向:也可以引入工具
dsh-mcp-bridge 覆盖 出站 方向(DSH → MCP 客户端)。对于 入站 方向(将第三方 MCP 服务器挂载到 DSH),请使用官方的 @deepseek-ai/dsh-mcp-client——在你的 cordis.patch.yml 中每个服务器一行:
- id: mcp-github
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: github
transport: stdio
command: npx
args: ['-y', '@modelcontextprotocol/server-github']这样,你的模型就能看到 mcp__github__* 工具,以及本桥接器暴露的 dsh_* 工具。它们共同让 DSH 成为 MCP 生态系统的完整公民:
Claude Code ──HTTP──▶ dsh-mcp-bridge ──▶ DSH tools (read/glob/grep/web_search)
DSH model ──stdio─▶ dsh-mcp-client ──▶ any MCP server (GitHub/filesystem/…)完整示例:examples/bidirectional.cordis.patch.yml · Claude Code 快速入门:examples/claude-code-connect.md
工作原理
MCP client ──streamable HTTP──▶ /mcp (webServer route)
│ JSON-RPC 2.0 (initialize / tools/list / tools/call)
▼
dsh-mcp-bridge protocol layer (zero-dep, pure JS)
│ allowlist + denylist
▼
agent-scoped ctx.tools (execute with real sandbox)该桥接器通过 ctx.tools 的代理作用域视图枚举工具(代理是 dsh 中的作用域键),因此你暴露的工具集与你代理实际拥有的工具一致——没有硬编码的 schema。
开发
npm test # node:test, zero dependencies (38 tests)
npm run demo # live demo against a running DSH at http://127.0.0.1:3080/mcp
npm run demo:mock # e2e: repo code + official MCP SDK client (no DSH needed)
node .mcp-test/e2e-stateless.mjs [url] # 2026-07-28 stateless-protocol e2e目录结构:
src/protocol.js— JSON-RPC 2.0 消息处理(纯函数,可测试)src/catalog.js— 白名单/黑名单工具投影src/transport.js— streamable HTTP 处理器(POST JSON、GET SSE)src/dsh.js— 代理作用域工具访问 + 结果映射src/index.js— Cordis 插件入口(apply(ctx, config))
路线图
当 DSH 工具集发生变化时发送
notifications/tools/list_changed(SSE 广播)客户端管理面板(服务器状态、工具树、连通性自检)——参见
src/client.jsMCP 2026-07-28 无状态模式:无需握手、
server/discover、通过请求_meta进行版本控制、subscriptions/listen流可配置的
serverInfo、分页支持可选地暴露 Resources/Prompts
协议兼容性
客户端协议 | 行为 |
2025-06-18 |
|
2026-07-28 | 无状态:无握手、版本位于请求 |
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes any stdio-based MCP server to the internet via HTTP/SSE transport, enabling remote agents to access MCP tools over a network.16MIT
- FlicenseNot gradedqualityCmaintenanceExposes your local machine's filesystem, git, shell, network, databases, and system to any MCP-compatible LLM client over HTTP.6
- AlicenseNot gradedqualityBmaintenanceExposes SmartCLI's built-in agent tools (file operations, code search, shell commands, web search, memory, and snapshots) as MCP endpoints, allowing external clients to leverage them over stdio or HTTP.1MIT
- AlicenseNot gradedqualityAmaintenanceExposes DeepSeek Harness agent capabilities as an MCP server, letting any MCP client drive Harness to execute real coding tasks with structured results, context isolation, and parallel execution.8MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/liiiubai/dsh-mcp-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server