Skip to content
dsh.fish
Bundle

dsh-netcatty

Connect DeepSeek Harness to Netcatty's official External MCP server.

Source
qq739844663
License
MIT
Updated
Updated 18 hours ago

Readme

# dsh-netcatty

[简体中文](README.zh-CN.md)

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](https://github.com/binaricat/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

```sh
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:

```sh
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:

```powershell
$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:

```yaml
- 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

```sh
npm test
npm pack --dry-run
```

## License

MIT

Install

dsh plugin --profile web add github:qq739844663/dsh-netcatty#9c5d81aaf9cc089441c07e3795dcdebabe4efbf3

Profile: web

Source