DeepSeek Harness Security Audit Plugin: dsh-guard-mcp

Introduction

In agent development, security auditing capabilities are often scattered across individual tools. Developers must manually invoke multiple scanning and inspection APIs, or execute them via command line, and then aggregate the results. This approach is not only repetitive but also prone to omissions.

DSH (DeepSeek Harness) embraces the “everything is a plugin” philosophy, enabling such capabilities to be exposed to any MCP client—including Claude Desktop and Cursor—through the standard MCP protocol. This article introduces the dsh-guard-mcp plugin, which encapsulates the rule scanning, session search, and agent forensics capabilities of guard-core as standard MCP tools.

What Is This

dsh-guard-mcp is a DSH plugin maintained by feely0208, categorized under admin-security. It exposes the security auditing capabilities of guard-core to external callers through the standard MCP protocol.

Core Features

The plugin provides three standard MCP tools:

  1. guard_list_packs
    - Lists available guard rule packs on the local machine
    - Used to confirm which rule sets have been loaded

  2. guard_scan
    - Scans a specified directory using rule packs
    - Returns findings, including ruleId, severity, file, line, and advice

  3. guard_report
    - Same functionality as scan
    - Outputs a human-readable text report

Rule Pack Sources

The plugin automatically discovers rule packs from the following locations:

  1. @deepwhale-cn/dsh- plugins installed via npm that contain rules/.json (local link + global root)
  2. The ~/.dsh/guard-rules/* directory
  3. The DSH_GUARD_PACKS environment variable (colon-separated directories)
  4. A direct path specified via the pack parameter at call time

The scanning engine is provided by @deepwhale-cn/dsh-guard-core, which is installed automatically during setup.

Installation & Activation

Install via DSH:

dsh plugin --profile web add @deepwhale-cn/dsh-guard-mcp

Alternatively, install directly via npm:

npm i @deepwhale-cn/dsh-guard-mcp

Or install directly from the repository:

dsh plugin install ./

After installation, add the server to your MCP client configuration:

{ "mcpServers": { "dsh-guard": { "command": "npx", "args": ["-y", "@deepwhale-cn/dsh-guard-mcp"] } } }

Typical Usage

In an MCP client, you can invoke the tools in the following order:

  1. Call guard_list_packs to view available rule packs on the local machine
  2. Use guard_scan to scan the target directory and retrieve findings
  3. Use guard_report to convert results into human-readable text

For debugging, you can use the CLI directly:

dsh-guard-mcp --packs    # View discovered rule packs
dsh-guard-mcp --tools    # View tool schemas

Use Cases & Notes

  • Suitable for developers who need to embed security auditing capabilities into agent workflows
  • The plugin runs with the permissions of the current DSH process; callers should be mindful of permission scope and directory access boundaries
  • It is recommended to review the source code and license (MIT © Wenzhou DeepWhale Intelligent Technology Co., Ltd.) before installation

Conclusion

dsh-guard-mcp standardizes the security auditing capabilities of guard-core into MCP tools, lowering the barrier for agents to invoke security checks. When integrating auditing capabilities into your workflow, refer to the plugin directory page and the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye