ssh-mcp-pro 1.1.5 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +47 -7
- package/SECURITY.md +4 -0
- package/SECURITY_DECISIONS.md +32 -1
- package/dist/agent-bin.js +0 -0
- package/dist/connector-profile.d.ts +3 -0
- package/dist/connector-profile.d.ts.map +1 -1
- package/dist/connector-profile.js +36 -14
- package/dist/connector-profile.js.map +1 -1
- package/dist/http-security.d.ts.map +1 -1
- package/dist/http-security.js +19 -4
- package/dist/http-security.js.map +1 -1
- package/dist/http-server-lifecycle.d.ts +17 -0
- package/dist/http-server-lifecycle.d.ts.map +1 -0
- package/dist/http-server-lifecycle.js +122 -0
- package/dist/http-server-lifecycle.js.map +1 -0
- package/dist/http-server-router.d.ts +28 -0
- package/dist/http-server-router.d.ts.map +1 -0
- package/dist/http-server-router.js +108 -0
- package/dist/http-server-router.js.map +1 -0
- package/dist/http-server-runtime.d.ts +21 -0
- package/dist/http-server-runtime.d.ts.map +1 -0
- package/dist/http-server-runtime.js +415 -0
- package/dist/http-server-runtime.js.map +1 -0
- package/dist/http-session-registry.d.ts.map +1 -1
- package/dist/http-session-registry.js.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +8 -1
- package/dist/prompts.js.map +1 -1
- package/dist/remote/agent-cli.d.ts.map +1 -1
- package/dist/remote/agent-cli.js +20 -1
- package/dist/remote/agent-cli.js.map +1 -1
- package/dist/remote/agent-connection-lifecycle.d.ts +47 -0
- package/dist/remote/agent-connection-lifecycle.d.ts.map +1 -0
- package/dist/remote/agent-connection-lifecycle.js +304 -0
- package/dist/remote/agent-connection-lifecycle.js.map +1 -0
- package/dist/remote/agent-executor.d.ts.map +1 -1
- package/dist/remote/agent-executor.js +93 -68
- package/dist/remote/agent-executor.js.map +1 -1
- package/dist/remote/agent-handler.d.ts +22 -8
- package/dist/remote/agent-handler.d.ts.map +1 -1
- package/dist/remote/agent-handler.js +151 -98
- package/dist/remote/agent-handler.js.map +1 -1
- package/dist/remote/config.d.ts.map +1 -1
- package/dist/remote/config.js +14 -0
- package/dist/remote/config.js.map +1 -1
- package/dist/remote/control-plane.d.ts.map +1 -1
- package/dist/remote/control-plane.js +3 -0
- package/dist/remote/control-plane.js.map +1 -1
- package/dist/remote/policy-update-guard.d.ts +14 -0
- package/dist/remote/policy-update-guard.d.ts.map +1 -0
- package/dist/remote/policy-update-guard.js +27 -0
- package/dist/remote/policy-update-guard.js.map +1 -0
- package/dist/remote/policy.d.ts.map +1 -1
- package/dist/remote/policy.js +13 -2
- package/dist/remote/policy.js.map +1 -1
- package/dist/remote/safe-file.d.ts +5 -0
- package/dist/remote/safe-file.d.ts.map +1 -0
- package/dist/remote/safe-file.js +194 -0
- package/dist/remote/safe-file.js.map +1 -0
- package/dist/remote/store.d.ts.map +1 -1
- package/dist/remote/store.js.map +1 -1
- package/dist/remote/types.d.ts +5 -0
- package/dist/remote/types.d.ts.map +1 -1
- package/dist/remote/websocket.d.ts +38 -13
- package/dist/remote/websocket.d.ts.map +1 -1
- package/dist/remote/websocket.js +90 -126
- package/dist/remote/websocket.js.map +1 -1
- package/dist/render-http.js +2 -1
- package/dist/render-http.js.map +1 -1
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +4 -2
- package/dist/retry.js.map +1 -1
- package/dist/server-http.d.ts +1 -1
- package/dist/server-http.d.ts.map +1 -1
- package/dist/server-http.js +1 -421
- package/dist/server-http.js.map +1 -1
- package/dist/tools/connector.provider.d.ts.map +1 -1
- package/dist/tools/connector.provider.js +2 -1
- package/dist/tools/connector.provider.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/docs/agent-runtime-config.md +34 -0
- package/docs/development/api-stability.md +44 -0
- package/docs/development/coding-standards.md +35 -0
- package/docs/development/commit-conventions.md +35 -0
- package/docs/development/dependency-management.md +60 -0
- package/docs/development/deprecation-policy.md +29 -0
- package/docs/development/local-setup.md +46 -0
- package/docs/development/release-process.md +57 -0
- package/docs/development/testing-policy.md +47 -0
- package/docs/explanation/architecture.md +44 -0
- package/docs/how-to/README.md +14 -0
- package/docs/how-to/configure-ssh-policy.md +50 -0
- package/docs/openssf-evidence.md +75 -0
- package/docs/openssf-gap-analysis.md +63 -0
- package/docs/openssf-proposal-links.md +37 -0
- package/docs/professionalization-plan.md +81 -0
- package/docs/reference/README.md +21 -0
- package/docs/reference/cli.md +41 -0
- package/docs/reference/compatibility.md +46 -0
- package/docs/reference/configuration.md +72 -0
- package/docs/remote-mcp-hardening.md +10 -0
- package/docs/repo-maturity-report.md +565 -0
- package/docs/security/assurance-case.md +58 -0
- package/docs/security/dependency-audit-exceptions.json +4 -0
- package/docs/security/dependency-audit-exceptions.md +15 -0
- package/docs/security/input-validation.md +54 -0
- package/docs/security/release-integrity.md +28 -0
- package/docs/security/scanning-policy.md +50 -0
- package/docs/security/secrets-management.md +49 -0
- package/docs/security/threat-model.md +65 -0
- package/docs/testing.md +24 -0
- package/docs/troubleshooting.md +56 -0
- package/docs/tutorials/getting-started.md +84 -0
- package/mcp.json +1 -1
- package/package.json +82 -68
- package/registry/ssh-mcp-pro/mcp.json +1 -1
- package/server.json +3 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Professionalization Plan
|
|
2
|
+
|
|
3
|
+
A phased plan synthesizing [docs/repo-maturity-report.md](repo-maturity-report.md)'s
|
|
4
|
+
"Safe refactor opportunities," "High-risk refactor opportunities," and "Recommended
|
|
5
|
+
issues" into an ordered sequence. This is a plan, not a commitment with dates — see
|
|
6
|
+
[ROADMAP.md](../ROADMAP.md) for the roadmap framing of the same underlying gaps.
|
|
7
|
+
|
|
8
|
+
## Phase 0 — Done (this audit)
|
|
9
|
+
|
|
10
|
+
Documentation, governance, and evidence gaps that required no maintainer decision and
|
|
11
|
+
no behavior change: `CODE_OF_CONDUCT.md`, `GOVERNANCE.md`, `MAINTAINERS.md`,
|
|
12
|
+
`ROADMAP.md`, OpenSSF evidence/gap-analysis docs, Diátaxis documentation structure,
|
|
13
|
+
development-process docs, security docs, and the `gitleaks.yml` workflow.
|
|
14
|
+
|
|
15
|
+
## Phase 1 — Maintainer decisions, no code change
|
|
16
|
+
|
|
17
|
+
Status as of 2026-07-03:
|
|
18
|
+
|
|
19
|
+
1. Apply branch protection on `main` (import the existing ruleset or configure
|
|
20
|
+
equivalently). **Still open.**
|
|
21
|
+
2. ~~Confirm private vulnerability reporting is enabled.~~ **Done** — confirmed
|
|
22
|
+
already enabled via API.
|
|
23
|
+
3. ~~Decide on the Dependabot security-updates toggle.~~ **Done** — enabled, along
|
|
24
|
+
with Dependabot vulnerability alerts.
|
|
25
|
+
4. Merge or re-trigger release-please PR #1 to ship the first release. **Still open**
|
|
26
|
+
— deliberately left for the maintainer; triggers a real publish action.
|
|
27
|
+
5. Register the repo/workflow as an npm trusted publisher on npmjs.com (the workflow
|
|
28
|
+
side is already implemented; this is the registry-side counterpart). **Still open**
|
|
29
|
+
— an npmjs.com-side action outside the repo.
|
|
30
|
+
|
|
31
|
+
**Why this order:** branch protection and the first release are the two remaining
|
|
32
|
+
changes that would flip the most `Missing`/`Partial` rows in the maturity report to
|
|
33
|
+
`Passed` — they have outsized leverage relative to effort.
|
|
34
|
+
|
|
35
|
+
## Phase 2 — Low-risk CI additions
|
|
36
|
+
|
|
37
|
+
Status as of 2026-07-03:
|
|
38
|
+
|
|
39
|
+
1. ~~Container image vulnerability scanning (Trivy or Grype) in `docker.yml`.~~
|
|
40
|
+
**Done** — Trivy added, advisory-only. It found real findings: see the new Phase 3
|
|
41
|
+
item below.
|
|
42
|
+
2. Hadolint for Dockerfile linting. **Still open.**
|
|
43
|
+
3. ~~`publint` as an advisory (non-blocking) npm packaging check.~~ **Done** — added,
|
|
44
|
+
passes cleanly against the built package.
|
|
45
|
+
|
|
46
|
+
## Phase 3 — Security follow-through
|
|
47
|
+
|
|
48
|
+
Status as of 2026-07-03:
|
|
49
|
+
|
|
50
|
+
1. ~~Fix CodeQL alert #1 (High: clear-text logging in `scripts/start-chatgpt-http.mjs`).~~
|
|
51
|
+
**Done.**
|
|
52
|
+
2. ~~Review and record disposition for the remaining 7 CodeQL alerts.~~ **Done** — all
|
|
53
|
+
dismissed via the code-scanning API with rationale re-verified against current code;
|
|
54
|
+
written up in `SECURITY_DECISIONS.md`.
|
|
55
|
+
3. Re-evaluate Scorecard `publish_results: false` — either fix the blocking
|
|
56
|
+
`env:`/`defaults:` patterns across workflows, or adjust the README badge. **Still
|
|
57
|
+
open** — investigated; relocating those blocks across all 7 workflows risks
|
|
58
|
+
silently breaking the Windows Integration job's shell default, which can't be
|
|
59
|
+
verified without a live Windows Actions run.
|
|
60
|
+
4. **New: triage the Trivy container-image backlog.** Adding Trivy in item 1 above
|
|
61
|
+
surfaced 50+ open findings against the built image — mostly the Alpine base image's
|
|
62
|
+
OpenSSL packages and npm/corepack's own bundled dependencies, not this project's own
|
|
63
|
+
code. Options: rebuild on a newer/slimmer base image, prune build tooling from the
|
|
64
|
+
final layer, or accept and document the current baseline explicitly.
|
|
65
|
+
|
|
66
|
+
## Phase 4 — Community growth (not schedulable)
|
|
67
|
+
|
|
68
|
+
1. Land a first externally-authored, human-reviewed pull request.
|
|
69
|
+
2. Reconsider a second maintainer once Phase 4.1 has happened more than once — see
|
|
70
|
+
[GOVERNANCE.md](../GOVERNANCE.md#path-to-adding-maintainers).
|
|
71
|
+
3. Revisit OpenSSF Silver readiness once Phase 4.1–4.2 give real evidence to point to.
|
|
72
|
+
|
|
73
|
+
## What's explicitly not in this plan
|
|
74
|
+
|
|
75
|
+
- No plan to pursue OpenSSF Gold/foundation-grade on any timeline — see
|
|
76
|
+
[docs/openssf-gap-analysis.md](openssf-gap-analysis.md) for why that's an
|
|
77
|
+
organizational precondition problem, not a checklist.
|
|
78
|
+
- No plan to add PyPI, Go, or Rust packaging — none of those ecosystems are used by
|
|
79
|
+
this project.
|
|
80
|
+
- No plan to add a `.devcontainer` — assessed as optional given the toolchain is
|
|
81
|
+
already a single `pnpm install` away from working.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Reference
|
|
2
|
+
|
|
3
|
+
Reference material is information-oriented: precise, exhaustive where practical, and
|
|
4
|
+
organized for lookup rather than reading start-to-finish. This index follows the
|
|
5
|
+
[Diátaxis](https://diataxis.fr/reference/) definition of "reference."
|
|
6
|
+
|
|
7
|
+
- [Environment variables](../../README.md#configuration) — the canonical
|
|
8
|
+
`SSH_MCP_*` configuration table lives in the README so it stays next to the
|
|
9
|
+
install/quickstart instructions; this reference doesn't duplicate it.
|
|
10
|
+
- [Tool profiles](../../README.md#tool-profiles) — which tools/resources/prompts each
|
|
11
|
+
connector profile (`full`, `remote-safe`, `chatgpt`, `claude`, `remote-readonly`,
|
|
12
|
+
`remote-broker`) exposes.
|
|
13
|
+
- [CLI reference](cli.md) — `ssh-mcp-pro` and `ssh-mcp-pro-agent` command-line flags.
|
|
14
|
+
- [Configuration reference](configuration.md) — the `SSH_MCP_*` table grouped by
|
|
15
|
+
concern, pointing back to the canonical table in the README.
|
|
16
|
+
- [Compatibility reference](compatibility.md) — supported Node.js/pnpm/OS/container
|
|
17
|
+
platforms and MCP transport/client compatibility.
|
|
18
|
+
- [MCP metadata](../../mcp.json) and [server metadata](../../server.json) — machine-readable
|
|
19
|
+
capability and registry declarations.
|
|
20
|
+
- [Security defaults](../../SECURITY_DECISIONS.md) — the exact default-deny behaviors and
|
|
21
|
+
why each exists.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# CLI Reference
|
|
2
|
+
|
|
3
|
+
ssh-mcp-pro installs two binaries (see `bin` in [package.json](../../package.json)):
|
|
4
|
+
|
|
5
|
+
- `ssh-mcp-pro` — the MCP server itself.
|
|
6
|
+
- `ssh-mcp-pro-agent` — the remote control-plane agent (see
|
|
7
|
+
[docs/remote-mcp-hardening.md](../remote-mcp-hardening.md)).
|
|
8
|
+
|
|
9
|
+
## `ssh-mcp-pro`
|
|
10
|
+
|
|
11
|
+
Source of truth: [src/cli.ts](../../src/cli.ts).
|
|
12
|
+
|
|
13
|
+
| Flag / subcommand | Effect |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| (no args) | Starts the server over stdio transport (default) |
|
|
16
|
+
| `stdio` | Explicitly selects stdio transport |
|
|
17
|
+
| `http` | Selects the Streamable HTTP transport |
|
|
18
|
+
| `agent [...]` | Delegates all remaining arguments to the agent CLI (see below); consumes the rest of `argv` |
|
|
19
|
+
| `--help`, `-h` | Print help and exit |
|
|
20
|
+
| `--version`, `-v` | Print version and exit |
|
|
21
|
+
| `--stdio` | Forces stdio transport |
|
|
22
|
+
| `--transport=stdio` \| `--transport=http` | Explicit transport selection |
|
|
23
|
+
| `--host <value>` | HTTP bind host (overrides `SSH_MCP_HTTP_HOST`) |
|
|
24
|
+
| `--port <value>` | HTTP bind port (overrides `SSH_MCP_HTTP_PORT`) |
|
|
25
|
+
| `--bearer-token-file <path>` | Bearer token file for HTTP auth (overrides `SSH_MCP_HTTP_BEARER_TOKEN_FILE`) |
|
|
26
|
+
| `--enable-legacy-sse` | Enables legacy SSE compatibility (overrides `SSH_MCP_ENABLE_LEGACY_SSE`) |
|
|
27
|
+
| `--tool-profile <name>` | Selects a tool exposure profile (overrides `SSH_MCP_TOOL_PROFILE`) — see [Tool Profiles](../../README.md#tool-profiles) |
|
|
28
|
+
| `--connector-credential-provider <name>` | Selects a connector credential provider (overrides `SSH_MCP_CONNECTOR_CREDENTIAL_PROVIDER`) |
|
|
29
|
+
| `--no-stdio` | Unsupported/internal flag; do not rely on it |
|
|
30
|
+
|
|
31
|
+
Unknown flags are ignored rather than rejected, so that MCP clients invoking the binary
|
|
32
|
+
with extra arguments don't break the server.
|
|
33
|
+
|
|
34
|
+
## `ssh-mcp-pro-agent`
|
|
35
|
+
|
|
36
|
+
Delegates directly to `src/remote/agent-cli.ts` via `argv` passthrough. See
|
|
37
|
+
[docs/remote-mcp-hardening.md](../remote-mcp-hardening.md) and
|
|
38
|
+
[docs/adding-a-device.md](../adding-a-device.md) for the documented agent workflows —
|
|
39
|
+
this reference intentionally doesn't restate flags that aren't yet enumerated in one
|
|
40
|
+
place in the source, to avoid documenting something that could drift silently from the
|
|
41
|
+
implementation.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Compatibility Reference
|
|
2
|
+
|
|
3
|
+
## Node.js
|
|
4
|
+
|
|
5
|
+
| Requirement | Value | Source |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Minimum supported range | `>=22.22.2 \|\| >=24.15.0 \|\| >=26.3.0` | `package.json` `engines.node` |
|
|
8
|
+
| CI matrix | Node 22, 24, 26 (`Unit Tests (Node 22/24/26)`) | `.github/workflows/ci.yml` |
|
|
9
|
+
| Local development / release builds | Node 24.15.0 / 26.3.0 | `CONTRIBUTING.md`, `release.yml` |
|
|
10
|
+
|
|
11
|
+
Note the gap between 22.22.2 and 24.15.0: Node 23.x is not supported (it was never an
|
|
12
|
+
LTS line). This is expected, not an oversight.
|
|
13
|
+
|
|
14
|
+
## Package manager
|
|
15
|
+
|
|
16
|
+
pnpm `11.28.5`, enforced via `packageManager` in `package.json` and `engine-strict=true`.
|
|
17
|
+
npm/yarn are not supported installation paths for *developing* this repo (consumers
|
|
18
|
+
installing the published package via npm/npx are unaffected — see
|
|
19
|
+
[README.md#installation](../../README.md#installation)).
|
|
20
|
+
|
|
21
|
+
## Operating systems
|
|
22
|
+
|
|
23
|
+
| OS | Status | Evidence |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| Linux | Passed | Primary CI target; SSH fixture-based integration/E2E tests |
|
|
26
|
+
| Windows command paths | Passed | Dedicated `test:integration:windows` project on `windows-2022`; the `Windows Command-Path Integration` job validates local PowerShell and package-manager dispatch, not a real Windows OpenSSH server |
|
|
27
|
+
| macOS | Needs human confirmation | Listed as a supported platform in `mcp.json` (`platforms: [linux, macos, windows]`) but no macOS-specific CI job was found — likely covered incidentally by the cross-platform Node.js/SSH code paths, not by a dedicated test |
|
|
28
|
+
|
|
29
|
+
## Container platforms
|
|
30
|
+
|
|
31
|
+
`linux/amd64`, `linux/arm64` — built and verified in `docker.yml` via Buildx + QEMU.
|
|
32
|
+
|
|
33
|
+
## MCP transport compatibility
|
|
34
|
+
|
|
35
|
+
| Transport | Status |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| stdio | Passed — default, used by all documented client configs |
|
|
38
|
+
| Streamable HTTP | Passed — `http`/`--transport=http`, with the non-loopback safety gate described in [SECURITY_DECISIONS.md](../../SECURITY_DECISIONS.md) |
|
|
39
|
+
| Legacy SSE | Partial — available behind `SSH_MCP_ENABLE_LEGACY_SSE` for compatibility, not the recommended path |
|
|
40
|
+
|
|
41
|
+
## MCP client compatibility
|
|
42
|
+
|
|
43
|
+
Documented configs exist for a generic stdio client, VS Code, and Claude Desktop (see
|
|
44
|
+
[README.md#quickstart](../../README.md#quickstart)) plus connector-shaped profiles for
|
|
45
|
+
ChatGPT and Claude remote connectors (`chatgpt`, `claude` tool profiles). See
|
|
46
|
+
[Tool Profiles](../../README.md#tool-profiles) for exactly what each profile exposes.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Configuration Reference
|
|
2
|
+
|
|
3
|
+
The canonical, exhaustive `SSH_MCP_*` table lives in
|
|
4
|
+
[README.md#configuration](../../README.md#configuration) and isn't duplicated here — a
|
|
5
|
+
second copy of a 40+ row table would drift out of sync with the first. This page groups
|
|
6
|
+
that table by concern, for when you know *what kind* of setting you need but not its
|
|
7
|
+
exact name.
|
|
8
|
+
|
|
9
|
+
## Session and resource limits
|
|
10
|
+
|
|
11
|
+
`SSH_MCP_MAX_SESSIONS`, `SSH_MCP_SESSION_TTL`, `SSH_MCP_COMMAND_TIMEOUT`,
|
|
12
|
+
`SSH_MCP_MAX_COMMAND_OUTPUT_BYTES`, `SSH_MCP_MAX_STREAM_CHUNKS`, `SSH_MCP_MAX_FILE_SIZE`,
|
|
13
|
+
`SSH_MCP_MAX_FILE_WRITE_BYTES`, `SSH_MCP_MAX_TRANSFER_BYTES`.
|
|
14
|
+
|
|
15
|
+
## SSH security policy
|
|
16
|
+
|
|
17
|
+
`SSH_MCP_HOST_KEY_POLICY`, `SSH_MCP_KNOWN_HOSTS_PATH`, `SSH_MCP_ALLOW_ROOT_LOGIN`,
|
|
18
|
+
`SSH_MCP_ALLOWED_CIPHERS`, `SSH_MCP_ALLOW_RAW_SUDO`, `SSH_MCP_ALLOW_DESTRUCTIVE_COMMANDS`,
|
|
19
|
+
`SSH_MCP_ALLOW_DESTRUCTIVE_FS`, `SSH_MCP_ALLOWED_HOSTS`, `SSH_MCP_COMMAND_ALLOW`,
|
|
20
|
+
`SSH_MCP_COMMAND_DENY`, `SSH_MCP_PATH_ALLOW_PREFIXES`, `SSH_MCP_PATH_DENY_PREFIXES`. See
|
|
21
|
+
[docs/how-to/configure-ssh-policy.md](../how-to/configure-ssh-policy.md) for task-based
|
|
22
|
+
guidance and [docs/security/threat-model.md](../security/threat-model.md) for why these
|
|
23
|
+
defaults exist.
|
|
24
|
+
|
|
25
|
+
## Local transfer and tunnel policy
|
|
26
|
+
|
|
27
|
+
`SSH_MCP_LOCAL_PATH_ALLOW_PREFIXES`, `SSH_MCP_LOCAL_PATH_DENY_PREFIXES`,
|
|
28
|
+
`SSH_MCP_TUNNEL_ALLOW_BIND_HOSTS`, `SSH_MCP_TUNNEL_DENY_BIND_HOSTS`,
|
|
29
|
+
`SSH_MCP_TUNNEL_ALLOW_REMOTE_HOSTS`, `SSH_MCP_TUNNEL_DENY_REMOTE_HOSTS`,
|
|
30
|
+
`SSH_MCP_TUNNEL_ALLOW_PORTS`, `SSH_MCP_TUNNEL_DENY_PORTS`.
|
|
31
|
+
|
|
32
|
+
## Policy engine
|
|
33
|
+
|
|
34
|
+
`SSH_MCP_POLICY_FILE`, `SSH_MCP_POLICY_MODE` — a JSON policy file plus enforce/explain
|
|
35
|
+
mode, for centralizing the settings above instead of many separate environment
|
|
36
|
+
variables. No config-schema version field currently exists for the policy file (see
|
|
37
|
+
[docs/development/api-stability.md](../development/api-stability.md)).
|
|
38
|
+
|
|
39
|
+
## HTTP transport
|
|
40
|
+
|
|
41
|
+
`SSH_MCP_HTTP_HOST`, `SSH_MCP_HTTP_PORT`, `SSH_MCP_HTTP_ALLOWED_ORIGINS`,
|
|
42
|
+
`SSH_MCP_HTTP_BEARER_TOKEN_FILE`, `SSH_MCP_ENABLE_LEGACY_SSE`,
|
|
43
|
+
`SSH_MCP_HTTP_MAX_REQUEST_BODY_BYTES`, `SSH_MCP_HTTP_MAX_SESSIONS`,
|
|
44
|
+
`SSH_MCP_HTTP_SESSION_IDLE_TTL_MS`, `SSH_MCP_HTTP_PUBLIC_URL`,
|
|
45
|
+
`SSH_MCP_HTTP_TRUST_PROXY`. See [docs/remote-mcp-hardening.md](../remote-mcp-hardening.md).
|
|
46
|
+
|
|
47
|
+
## OAuth (HTTP auth mode)
|
|
48
|
+
|
|
49
|
+
`SSH_MCP_HTTP_AUTH_MODE`, `SSH_MCP_OAUTH_ISSUER`, `SSH_MCP_OAUTH_AUDIENCE`,
|
|
50
|
+
`SSH_MCP_OAUTH_JWKS_URL`, `SSH_MCP_OAUTH_RESOURCE`, `SSH_MCP_OAUTH_REQUIRED_SCOPES`,
|
|
51
|
+
`SSH_MCP_OAUTH_ALLOWED_ALGORITHMS`.
|
|
52
|
+
|
|
53
|
+
## Remote agent WebSocket boundary
|
|
54
|
+
|
|
55
|
+
`AGENT_WS_PATH`, `AGENT_WS_HELLO_TIMEOUT_MS`, `AGENT_WS_HEARTBEAT_INTERVAL_MS`,
|
|
56
|
+
`AGENT_WS_IDLE_TIMEOUT_MS`, `AGENT_WS_MAX_CONNECTIONS`,
|
|
57
|
+
`AGENT_WS_MAX_CONNECTIONS_PER_AGENT`, `MAX_ACTION_TIMEOUT_SECONDS`,
|
|
58
|
+
`MAX_OUTPUT_BYTES`. The idle timeout is normalized to at least two heartbeat intervals.
|
|
59
|
+
See [docs/remote-mcp-hardening.md](../remote-mcp-hardening.md) for operational guidance.
|
|
60
|
+
|
|
61
|
+
## Tool exposure and connectors
|
|
62
|
+
|
|
63
|
+
`SSH_MCP_TOOL_PROFILE` / `SSH_MCP_CONNECTOR_PROFILE`,
|
|
64
|
+
`SSH_MCP_CONNECTOR_CREDENTIAL_PROVIDER`, `SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND`,
|
|
65
|
+
`SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND_ARGS`,
|
|
66
|
+
`SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND_TIMEOUT_MS`,
|
|
67
|
+
`SSH_MCP_CONNECTOR_DEFAULT_USERNAME`, `SSH_MCP_REMOTE_AGENT_MCP_PASSTHROUGH`. See
|
|
68
|
+
[Tool Profiles](../../README.md#tool-profiles) for what each profile exposes.
|
|
69
|
+
|
|
70
|
+
## Misc
|
|
71
|
+
|
|
72
|
+
`SSH_MCP_DEBUG`, `SSH_MCP_RATE_LIMIT*` (global and per-session rate limiting).
|
|
@@ -9,6 +9,16 @@ Use this checklist before exposing `ssh-mcp-pro` through a public Streamable HTT
|
|
|
9
9
|
- The HTTP session registry cleans expired sessions before opening a new session. If capacity is still full, it evicts the oldest idle session with reason `capacity-evict-oldest` instead of returning a persistent 503 that can surface as an upstream 502.
|
|
10
10
|
- Watch logs for `HTTP MCP session removed`, `idle-timeout`, and `capacity-evict-oldest` to confirm cleanup is happening.
|
|
11
11
|
|
|
12
|
+
## Remote agent WebSocket lifecycle
|
|
13
|
+
|
|
14
|
+
- Keep `AGENT_WS_HELLO_TIMEOUT_MS` short enough that unauthenticated sockets cannot remain open indefinitely. The default is `10000` milliseconds.
|
|
15
|
+
- `AGENT_WS_MAX_CONNECTIONS` bounds all accepted agent WebSockets, including connections still waiting for `agent.hello`. The default is `128`.
|
|
16
|
+
- `AGENT_WS_MAX_CONNECTIONS_PER_AGENT` bounds active and replacement candidates for one enrolled agent. The default is `2`, which permits one live connection and one authenticated replacement attempt.
|
|
17
|
+
- `AGENT_WS_HEARTBEAT_INTERVAL_MS` defaults to `30000`. The server sends protocol pings and treats pong or text traffic as activity.
|
|
18
|
+
- `AGENT_WS_IDLE_TIMEOUT_MS` defaults to `90000` and is normalized to at least two heartbeat intervals. Idle connections close cleanly and are forcibly terminated if the close handshake does not complete.
|
|
19
|
+
- The `/readyz` response reports `agent_connections_open` and `agent_connections_unauthenticated`. Audit events record global/per-agent capacity rejection, hello timeout, idle timeout, replacement, and safe numeric close codes.
|
|
20
|
+
- Keep WebSocket compression disabled at the public boundary. Agent messages are text-only and capped at 1 MiB.
|
|
21
|
+
|
|
12
22
|
## OAuth and token verification
|
|
13
23
|
|
|
14
24
|
- Prefer OAuth mode for public endpoints.
|