Skip to content
Back to search

dsh-plugin-mcp-guard

DSH plugin: read-only /mcp-guard audit of configured MCP servers for risky settings. No connections, no command execution, no file writes.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 19 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/SSHOOTING/dsh-plugin-mcp-guard with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/SSHOOTING/dsh-plugin-mcp-guard'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/sshooting--dsh-plugin-mcp-guard/badge.svg)](/listings/sshooting--dsh-plugin-mcp-guard)

HTML

<a href="/listings/sshooting--dsh-plugin-mcp-guard"><img src="/api/listings/sshooting--dsh-plugin-mcp-guard/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

dsh plugin add dsh-plugin-mcp-guard

Requires Node `^22.19.0 || >=24` and DSH `>=0.2.0-rc.2 <0.3.0`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 137 lines
  1. # dsh-plugin-mcp-guard
  2. **One command audits every configured MCP server and flags risky settings — without ever connecting to a server or running a command.**
  3. MCP configs accumulate quickly: a plain `http://` endpoint here, a `permissions: ["*"]` there, a `bash -c` wrapper "just for testing". `mcp-guard` inspects the config object your DSH profile already holds and turns those into a compact, scored report. It is strictly read-only: no sockets, no process spawning, no file writes, no credential values printed.
  4. ## Install
  5. ```powershell
  6. dsh plugin add dsh-plugin-mcp-guard
  7. ```
  8. Requires Node `^22.19.0 || >=24` and DSH `>=0.2.0-rc.2 <0.3.0`.
  9. ## 30-second demo
  10. 1. Add your MCP servers to the bundle row in your profile (see Configuration).
  11. 2. In any DSH session, type `/mcp-guard`.
  12. 3. You get a scorecard:
  13. ```text
  14. [mcp-guard] 2/3 audited server(s) flagged · 4 finding(s) · 1 skipped · score 0/100 · RISK
  15. local-dev [http://localhost:3000]
  16. HIGH insecure-url URL uses plain http:// instead of https://
  17. HIGH wildcard-auto-approve autoApprove entry contains a wildcard: *
  18. shell-tool [stdio: bash]
  19. HIGH shell-invocation command invokes a shell with -c (arbitrary command execution)
  20. clean-one [https://example.com] OK
  21. legacy DISABLED (skipped)
  22. Fix: review the flags above; prefer HTTPS, avoid wildcard permissions/autoApprove, and drop shell -c wrappers.
  23. ```
  24. Use `/mcp-guard --json` for machine-readable output (CI, scripts, dashboards). The JSON contains only known fields and is redacted the same way as text output.
  25. ## Configuration
  26. The bundle patch seeds an empty map. Fill it in your profile's `cordis.patch.yml` (or merge it into an existing MCP config):
  27. ```yaml
  28. - id: dsh-plugin-mcp-guard
  29. name: dsh-plugin-mcp-guard
  30. config:
  31. mcpServers:
  32. local-dev:
  33. url: http://localhost:3000
  34. autoApprove: ['*']
  35. shell-tool:
  36. command: bash
  37. args: ['-c', 'echo hi']
  38. clean-one:
  39. url: https://example.com
  40. permissions: [read]
  41. legacy:
  42. command: node
  43. args: [server.js]
  44. disabled: true
  45. ```
  46. | Key | Type | Default | Meaning |
  47. |---|---|---|---|
  48. | `mcpServers` | object | `{}` | Map of server name to its config object. |
  49. | `mcpServers.<name>.url` | string | — | HTTP(S) endpoint. A plain `http://` URL is flagged. |
  50. | `mcpServers.<name>.command` | string | — | stdio executable. Absent together with `url`, the server is flagged as having no endpoint. |
  51. | `mcpServers.<name>.args` | string[] | `[]` | Arguments. Used only for shell `-c` detection; never printed. |
  52. | `mcpServers.<name>.permissions` | string[] | `[]` | Any `*` / `all` entry (case-insensitive) is flagged. |
  53. | `mcpServers.<name>.autoApprove` | boolean or string[] | `false` | `true`, a `*` wildcard, or a broad name (`all`, `admin`, `root`, `execute`, …) is flagged. |
  54. | `mcpServers.<name>.disabled` | boolean | `false` | Server is listed as skipped and never audited. |
  55. Unknown fields are ignored and never serialized. Malformed values are narrowed to empty defaults instead of throwing.
  56. ## Rules, score, and verdict
  57. | Code | Severity | Trigger |
  58. |---|---|---|
  59. | `insecure-url` | high | `url` starts with `http://` (not `https://`). |
  60. | `missing-endpoint` | low | Neither a usable `url` nor a `command`. |
  61. | `wildcard-auto-approve` | high | `autoApprove: true` or an entry containing `*`. |
  62. | `broad-auto-approve` | medium | `autoApprove` entry such as `all`, `admin`, `root`, `execute`. |
  63. | `wildcard-permission` | high | `permissions` contains `*` or `all`. |
  64. | `shell-invocation` | high | `cmd`/`sh`/`bash` (including `.exe` and full paths) with `-c` or `/c` in args. |
  65. Each finding subtracts points: high 25, medium 15, low 10, clamped to `0–100`. The verdict is `risk` if any high-severity finding exists, `review` if any finding exists, otherwise `clean`. Each finding code appears at most once per server. Disabled servers are skipped and do not affect the score.
  66. URLs are reduced to `scheme://host` with userinfo, path and query removed, and commands to their basename, before redaction. Args and credential values are never emitted.
  67. ## Privacy & safety
  68. - Reads only the in-memory `mcpServers` object passed to `apply(ctx, config)`. No host filesystem or process APIs are imported.
  69. - No network connections to any MCP server — nothing is dialed, pinged, or handshaked.
  70. - No command execution, no shell, no child process. `command`/`args` are treated as inert strings.
  71. - No file writes, no telemetry.
  72. - Only known fields are serialized, and every emitted string passes through a redaction filter (credentials, query secrets, CLI flag secrets, URL userinfo).
  73. ## Compatibility
  74. | Component | Supported |
  75. |---|---|
  76. | DSH | `>=0.2.0-rc.2 <0.3.0` |
  77. | Node | `^22.19.0 \|\| >=24.0.0` |
  78. | Cordis | `>=4.0.0 <5` |
  79. | Surface | headless and web (command registry only) |
  80. ## Troubleshooting
  81. | Symptom | Cause | Fix |
  82. |---|---|---|
  83. | `/mcp-guard` not found | Bundle row not installed | Re-run `dsh plugin add dsh-plugin-mcp-guard`, then restart DSH. |
  84. | `no MCP servers configured` | `mcpServers` is empty or missing in the row config | Add the map to the profile `cordis.patch.yml`; the installed patch only seeds `{}`. |
  85. | A server shows `DISABLED (skipped)` | `disabled: true` (or the string `"true"`) is set | Remove it if you want the server audited. |
  86. | Flags look outdated | Profile `cordis.patch.yml` overrides the bundle row | The last write wins — edit the profile row, then restart. |
  87. | `--json` looks empty | Output is pretty-printed JSON of the same report | Pipe to a JSON parser; the top-level keys are `servers`, `total`, `audited`, `skipped`, `flagged`, `findings`, `score`, `verdict`. |
  88. ## Development
  89. ```powershell
  90. npm install
  91. npm test
  92. npm pack --dry-run
  93. ```
  94. Tests are fully offline: synthetic config fixtures, no model, no network, no child processes.
  95. ## License
  96. [MIT](LICENSE)
  97. ## Demo
  98. ![Demo](docs/demo.png)
  99. ## Related plugins
  100. - [dsh-plugin-safe-route](https://github.com/SSHOOTING/dsh-plugin-safe-route)
  101. - [dsh-plugin-session-archive](https://github.com/SSHOOTING/dsh-plugin-session-archive)
  102. - [dsh-plugin-token-budget](https://github.com/SSHOOTING/dsh-plugin-token-budget)
  103. - [dsh-plugin-free-model-advisor](https://github.com/SSHOOTING/dsh-plugin-free-model-advisor)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.