Introduction

In DSH’s plugin architecture, external tools can be integrated as plugins without needing to maintain a separate set of calling code for each tool. For scenarios that require calling MCP services such as the file system, GitHub, search, and databases, dsh-mcp-bridge provides a bridge plugin: it connects to stdio or HTTP/SSE MCP servers and automatically registers the tools declared by the server as callable tools for the DSH agent.

What is this

Chhlafiu4312/dsh-mcp-bridge is an MCP client bridge plugin for DeepSeek Harness (DSH) with an MIT license. It is zero-dependency and does not use an SDK. Local MCP servers communicate via raw JSON-RPC 2.0 on stdio; remote HTTP/SSE MCP servers are configured via url and bridged using mcp-remote.

Core Capabilities

  • Supports local stdio MCP servers, started via command and args.
  • Supports remote HTTP/SSE MCP servers, configured via url, and bridged using mcp-remote.
  • After successful connection, automatically registers server tools in the format mcp_<server>_<tool>.
  • For servers declaring capabilities for resources and prompts, it can automatically register corresponding resource and prompt tools.
  • When a server exits abnormally, it retries up to 3 times with backoff intervals of 2s / 5s / 10s.
  • When the plugin stops or updates, it terminates the child processes it started.
  • Supports server configuration for allowTools, denyTools, and timeoutMs.

Installation and Usage

It is recommended to use dsh plugin for installation:

dsh plugin --profile web add "github:Chhlafiu4312/dsh-mcp-bridge#main"

After installation, restart dsh web, and then configure the server via DSH_MCP_SERVERS. For the dsh plugin / preset installation method, the configuration is read when the plugin starts, so the DSH needs to be restarted after modifying the configuration.

Configuration Example

Server entries in DSH_MCP_SERVERS can be in the local stdio format:

{
  "id": "filesystem",
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-filesystem", "~/projects"]
}

Here, the id becomes the prefix of the tool name; for example, the file directory tool will be registered as mcp_filesystem_list_directory.

Remote servers can be configured with url:

{
  "id": "my-server",
  "url": "https://x.example/mcp"
}

If you only want to expose a subset of tools, you can use allowTools / denyTools for filtering; if you want to temporarily disable a specific configuration, you can set disabled: true. This configuration entry will remain in the list, but it will not connect or be validated.

Typical Usage

After configuring DSH_MCP_SERVERS, for example with the file system MCP server, the agent can see tools like this:

mcp_filesystem_list_directory

If the GitHub MCP server is connected, tools like this may also appear:

mcp_github_create_issue

You can use mcp_status to view the current connection status.

If you want to use it as a long-term agent preset, you can create a preset directory and place the plugin files:

mkdir -p ~/.dsh/.agent-presets/mcp-agent
cp plugin.js ~/.dsh/.agent-presets/mcp-agent/
cp agent.cordis.yml.example ~/.dsh/.agent-presets/mcp-agent/agent.cordis.yml
cp preset.yml.example ~/.dsh/.agent-presets/mcp-agent/preset.yml

Then start a session in the mcp-agent preset.

Use Cases and Notes

Suitable for scenarios where you need the DSH agent to call external MCP tools and want to manage these tools in a plugin-based manner. Please note:

  • MCP servers will run with your permissions, so only connect to servers you trust.
  • File system servers should limit directories, providing only the paths the agent might need to access.
  • API tokens are usually passed via the env field; it is recommended to use a secret manager or environment variables in production environments.
  • For JSON-Schema keywords that are not supported, the plugin will fall back to open input, but the MCP server remains the authority on tool behavior and data.
  • peerDependencies are declared in package.json:
"@deepseek-ai/dsh": "*"

It is recommended to check the source code and license before installation and confirm that the target DSH environment matches.

Conclusion

The value of dsh-mcp-bridge lies in simplifying the process of connecting MCP servers to DSH into: install the plugin, configure the server, and automatically obtain tools. It maintains zero dependencies, does not use an SDK, and retains relatively clear lifecycle boundaries.

GitHub repository: https://github.com/Chhlafiu4312/dsh-mcp-bridge