In the development of DeepSeek Harness (DSH), the Host composition layer often needs to connect to external tools (such as MCP servers) or load Agent plugin packages. It may also be necessary to expose DSH’s own capabilities back to MCP clients. dsh-cordis-universal-adapter provides a connector for the Host composition layer, enabling bidirectional interoperability between the two ends.
Core Features¶
This plugin primarily addresses the bidirectional data flow problem between DSH and the external MCP ecosystem:
- Consuming External Resources: Supports loading external MCP servers (stdio / Streamable HTTP) and Agent Plugins 1.0 packages. It registers external tools as native tools in the DSH context (naming format
mcp:<serverId>:<toolName>). - Reverse Tool Exposure: Through the
exportconfiguration, it reverse-exports tools already registered in DSH as a standard MCP server for invocation by other MCP clients (naming formatdsh:<toolName>). - Bidirectional Communication: Supports two modes: Inbound (forward connection) and Outbound (reverse export).
- Connection Management: Uses a state machine to manage connection states, supports lifecycle operations such as
start,stop, andupdate, and supports semantic routing for tool selection.
Installation and Enablement¶
Use the DSH plugin management command to install:
dsh plugin --profile web add github:helibeiqi/dsh-cordis-universal-adapter
After installation, the plugin will automatically load the defined server or export configurations based on the configuration file (typically cordis.patch.yml).
Typical Usage¶
1. Loading External MCP Servers¶
Configure the external MCP servers that need to be connected in cordis.patch.yml. For example, to load the community-provided filesystem MCP server:
# cordis.patch.yml
plugins:
dsh-cordis-universal-adapter:
servers:
- id: filesystem
transport: stdio
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
After configuration, tools such as mcp:filesystem:read_directory will appear in DSH, which the Agent can invoke directly.
2. Reverse-Exporting DSH Tools¶
Expose DSH native tools as an MCP server for use with Claude Desktop or other MCP clients:
plugins:
dsh-cordis-universal-adapter:
export:
enabled: true
transport: stdio
namespace: dsh
Once enabled, the DSH process will provide a stdio endpoint that external tools can connect to via npx @modelcontextprotocol/inspector to invoke DSH tools.
Dependencies and Limitations¶
Environment Dependencies¶
- Node.js: Version
>= 22.19is required. - DSH Dependencies:
@deepseek-ai/cordis>= 0.1.0@deepseek-ai/dsh-tools>= 0.1.0
Functional Limitations¶
- No Sandbox Implemented: Isolation of external MCP servers relies on their host process boundary (such as a stdio child process or a remote HTTP service); the plugin itself does not provide a sandbox mechanism.
- Return Value Requirements: Reverse-exported tool return values must be JSON-serializable values; binary or streaming output is not supported.
- HTTP Authentication: Streamable HTTP authentication only supports static header configuration.
- API Stability: Related dependencies (such as
@deepseek-ai/dsh-tools) are in the Developer Preview stage, and interfaces may undergo breaking changes.
Use Cases and Cautions¶
This plugin is suitable for scenarios where external tool ecosystems need to be integrated at the DSH Host layer, or where DSH capabilities need to be integrated into other MCP clients.
Before use, please confirm the following:
1. Verify the security of the target external MCP server, as it will run directly under the DSH process permissions.
2. Pay attention to API version pinning to avoid incompatibilities caused by dependency upgrades.
3. Enabling semantic routing (router.enabled) will increase LLM invocation overhead.
Conclusion¶
dsh-cordis-universal-adapter is a bridge connecting DSH and the MCP ecosystem. Through the Host composition layer architecture, it enables developers to conveniently invoke external tools while also feeding DSH’s capabilities back to other clients.
- Catalog Page: dsh-cordis-universal-adapter
- Source Repository: helibeiqi/dsh-cordis-universal-adapter