dsh-netcatty
其他 活跃维护

dsh-netcatty

qq739844663/dsh-netcatty

轻量架构实现网络端口连通性快速检测,支持TCP/UDP多协议探测,结果可结构化输出,部署无额外依赖,能无缝集成到现有运维工具链,网络问题排查效率高

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
14 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:qq739844663/dsh-netcatty
git clone https://github.com/qq739844663/dsh-netcatty.git
git clone git@github.com:qq739844663/dsh-netcatty.git
README.md main

dsh-netcatty

简体中文

A DeepSeek Harness plugin that connects to Netcatty's official External MCP server. Netcatty remains the owner of SSH credentials, sessions, approvals, terminal execution, SFTP, Vault data, and port forwarding. The plugin only discovers the packaged launcher and registers the tools exposed by Netcatty in DSH.

Requirements

  • DeepSeek Harness with @deepseek-ai/dsh-mcp-client 0.1.0-rc.7 or newer.
  • Netcatty 1.1.80 or newer.
  • External MCP enabled in Netcatty under Settings > AI > External MCP.
  • Netcatty kept running while DSH uses its tools. The persistent External MCP mode is recommended.

Install

dsh plugin --profile web add https://github.com/qq739844663/dsh-netcatty

Restart the DSH Web host after installation. Netcatty tools are registered with the mcp__netcatty__ prefix.

For a headless profile:

dsh plugin --profile headless add https://github.com/qq739844663/dsh-netcatty

How it works

  1. The plugin locates Netcatty's packaged netcatty-external-mcp launcher in standard installation directories.
  2. A small stdio supervisor forwards MCP traffic and terminates the complete process tree when the plugin unloads. On Windows it follows the official launcher contract to use Netcatty's packaged runtime directly, avoiding shell interpretation of custom paths; macOS and Linux execute the launcher.
  3. The official DSH MCP client discovers Netcatty's current tool catalog and registers the tools under the netcatty namespace.
  4. Netcatty continues to enforce its External MCP permission mode and displays approval requests for protected operations.

The plugin does not parse Netcatty's Vault, read its saved credentials, or copy the discovery token. The official launcher reads the short-lived discovery file itself.

Custom locations

Set NETCATTY_MCP_LAUNCHER before starting DSH when Netcatty is installed in a nonstandard location:

$env:NETCATTY_MCP_LAUNCHER = 'D:\Apps\Netcatty\resources\app.asar.unpacked\electron\cli\netcatty-external-mcp.cmd'
dsh web

For a nondefault Netcatty profile, also set NETCATTY_EXTERNAL_MCP_DISCOVERY_FILE to that profile's external-mcp/discovery.json file. An explicit launcher path is trusted executable input; configure only a launcher you installed and verified.

The same values can be set per DSH profile in an override patch:

- id: netcatty-external-mcp
  config:
    launcherPath: D:\\Apps\\Netcatty\\resources\\app.asar.unpacked\\electron\\cli\\netcatty-external-mcp.cmd
    discoveryFile: C:\\Users\\me\\AppData\\Roaming\\Netcatty\\external-mcp\\discovery.json
    toolCallTimeoutMs: 120000
    failOnStartupError: false
    reconnect:
      enabled: true
      initialDelayMs: 1000
      maxDelayMs: 30000
      maxAttempts: 10

With failOnStartupError: false (the default), a missing Netcatty installation leaves the DSH profile running without Netcatty tools. Restart DSH after installing or enabling Netcatty.

Troubleshooting

  • Launcher was not found: install Netcatty or set NETCATTY_MCP_LAUNCHER.
  • Discovery file was not found: enable External MCP in Netcatty and keep the application running.
  • Tools do not appear after enabling External MCP: restart the DSH host so the initial MCP tool discovery runs again.
  • A write operation waits for approval: review the request in Netcatty. The plugin does not bypass Netcatty's permission policy.

Development

npm test
npm pack --dry-run

License

MIT