@strixgov/mcp-proxy 0.2.2 → 0.2.4
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 +15 -0
- package/README.md +2 -0
- package/examples/github-reference/README.md +34 -0
- package/examples/github-reference/acceptance.mjs +668 -0
- package/examples/github-reference/claims-matrix.md +34 -0
- package/examples/github-reference/demo-script.md +17 -0
- package/examples/github-reference/package-lock.json +1326 -0
- package/examples/github-reference/package.json +23 -0
- package/examples/github-reference/reuse-inventory.md +24 -0
- package/package.json +4 -4
- package/src/proxy.mjs +17 -0
- package/src/webhook-approver.mjs +3 -0
- package/test/package-contract.test.mjs +12 -0
- package/test/proxy-end-to-end.test.mjs +72 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.4] - unreleased
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Pins `@strixgov/mcp-adapter` 0.1.5 (was 0.1.4), whose published package runs `npm test`.
|
|
14
|
+
- The Strix runtime dependencies (`@strixgov/tool-gateway`, `@strixgov/mcp-adapter`,
|
|
15
|
+
`@strixgov/capabilities-mcp-common`) are pinned to exact versions (0.5.2, 0.1.5 and
|
|
16
|
+
0.1.2) instead of ranges. `@strixgov/guard` launches a pinned proxy version; with
|
|
17
|
+
ranges underneath it, a new tool-gateway release still changed what every Guard
|
|
18
|
+
install ran. `@modelcontextprotocol/sdk` stays a range. A package-contract test
|
|
19
|
+
fails if a Strix dependency is given a range again.
|
|
20
|
+
|
|
21
|
+
## [0.2.3] - 2026-11-07
|
|
22
|
+
|
|
23
|
+
- `approval.requireSignedResponse` and `approval.approverKeys` (file and webhook approval types): approving responses must be signed by a listed approver key. Requires `@strixgov/tool-gateway` 0.5.1. Startup fails if signing is required without valid keys.
|
|
24
|
+
|
|
10
25
|
## [0.2.2]
|
|
11
26
|
|
|
12
27
|
### Fixed
|
package/README.md
CHANGED
|
@@ -166,6 +166,8 @@ can't carry — `type` is the JSON-friendly bridge.
|
|
|
166
166
|
| omitted, `approval.enabled: false` | No prompt — every `APPROVAL_REQUIRED` decision becomes `DENY` with `reason: "PROMPT_FAILED"`. | Default; safest if you haven't built an approval pathway yet. |
|
|
167
167
|
| `"auto"` | Auto-approves every call that hits the gate. Receipt records `approval.approved: true, approvedBy: "auto"`. | Demos; smoke tests; environments where you want to show the approval-loop wired up without a real human in the loop. **Defeats meaningful governance** for production. |
|
|
168
168
|
| `"file"` | Wires up `fileApprover`: proxy writes `<requestDir>/<requestId>.request.json`; an out-of-band approver writes `<requestId>.response.json` with `{approved, approvedBy?, reason?}`. | Production-leaning headless deployments — Claude Desktop, CI, containerised agents. Pair with whatever notification channel you want (Slack bot, GitHub Actions check, on-call rotation script) that ultimately writes the response file. |
|
|
169
|
+
|
|
170
|
+
**Signed approvals (0.2.3+).** With `"approval": { "type": "file", "requireSignedResponse": true, "approverKeys": [{ "publicKey": "<base64url Ed25519 public key>", "label": "alice" }] }`, an approving response must carry an Ed25519 signature from a listed key over the exact request file the proxy wrote, or the call is denied (`APPROVAL_UNSIGNED` / `APPROVAL_SIGNATURE_INVALID`). The recorded approver is the key's label and id, never text from the response file. Denials need no signature. Startup fails if `requireSignedResponse` is set without valid keys. This stops forging an approval by writing a file; it does not stop a process that can edit this config and restart the proxy. [`@strixgov/guard`](https://www.npmjs.com/package/@strixgov/guard) sets this up.
|
|
169
171
|
| `"terminal"` | Interactive `y/N` prompt on stdin. Fails closed (`PROMPT_FAILED → DENY`) in any non-TTY context. | Direct-CLI testing where you're running the proxy yourself and want to manually approve. **Not viable under Claude Desktop spawn** — Claude Desktop owns the stdio channel; there's no terminal to prompt to. |
|
|
170
172
|
|
|
171
173
|
**Example: file-based approval under Claude Desktop.** In your
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# GitHub MCP reference demo — local fixture only
|
|
2
|
+
|
|
3
|
+
This demo composes the published Guard configuration surface, GitHub capability pack, MCP proxy, MCP adapter, tool gateway, and offline verifier against an in-memory MCP server. It never starts the GitHub MCP server, never reads a PAT, and never contacts GitHub. Its fixture data and `create_branch` outcomes are synthetic and must not be presented as GitHub activity.
|
|
4
|
+
|
|
5
|
+
The run demonstrates safe reads, a denied merge with zero downstream calls, a held/denied merge approval request, exact signed file approvals for harmless fixture writes, default-deny behavior for an unclassified destructive tool, persistence across proxy restart, independent receipt verification, and tamper detection. It also explicitly records that direct calls to an unwrapped upstream are outside the proxy's coverage.
|
|
6
|
+
|
|
7
|
+
## Run in a fresh consumer outside the repository
|
|
8
|
+
|
|
9
|
+
From a shell with Node.js 18 or newer and npm:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
REPO=/path/to/strix-platform
|
|
13
|
+
CONSUMER="$(mktemp -d)"
|
|
14
|
+
cp "$REPO/packages/strixgov-mcp-proxy/examples/github-reference/package.json" \
|
|
15
|
+
"$REPO/packages/strixgov-mcp-proxy/examples/github-reference/acceptance.mjs" \
|
|
16
|
+
"$CONSUMER/"
|
|
17
|
+
cp "$REPO/packages/strixgov-mcp-proxy/examples/github-reference/package-lock.json" "$CONSUMER/"
|
|
18
|
+
mkdir -p "$REPO/docs/evidence/github-mcp-reference-demo/run"
|
|
19
|
+
cd "$CONSUMER"
|
|
20
|
+
npm ci --ignore-scripts
|
|
21
|
+
STRIX_EVIDENCE_DIR="$REPO/docs/evidence/github-mcp-reference-demo/run" npm test
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`npm ci` installs the exact versions in the lockfile. The run writes sanitized scenario results, published package versions, policy and capability revisions, exact approval requests and signed responses, consumption status, signed proxy receipts and execution outcomes, the public verification JWK, fixture invocation/outcome logs, independent verifier output/exit codes, and SHA-256 sums under `STRIX_EVIDENCE_DIR`. Private keys and the temporary Guard approver key stay under a temporary OS directory and are deleted after the run. The actual run should be performed from a temporary consumer, not by installing into the repository workspace.
|
|
25
|
+
|
|
26
|
+
The generated JSONL receipt chain is verified by the installed `@strixgov/verifier@1.24.1` artifact. Its tampered copy must fail verification. The current repository's verifier 1.24.2 is source-only and is not installed or claimed here.
|
|
27
|
+
|
|
28
|
+
## What this demo does not establish
|
|
29
|
+
|
|
30
|
+
It is not an end-to-end GitHub integration or a production merge exercise. The published proxy is Mode 1/2: it enforces policy and signed file approvals, but it does not enforce the Mode-3 execution authorization token. The existing `github.pr.merge` PEP is reference-only and has no production caller; the official MCP `merge_pull_request` tool shape lacks a provider-side atomic head-SHA precondition. Therefore this harness intentionally does not approve or execute a merge and marks the exact-merge acceptance path blocked. The PEP's passing source tests are not substituted for a published, signed, integrated execution path.
|
|
31
|
+
|
|
32
|
+
A proxy receipt is interception evidence for a governed request. A fixture handler log and signed `SUCCEEDED` outcome are evidence only of a synthetic local fixture operation. Neither is evidence that GitHub executed a mutation. A valid signature proves integrity under the included local public key, not independent trust in the key's origin or in the business outcome.
|
|
33
|
+
|
|
34
|
+
See [the claims matrix](claims-matrix.md), [reuse inventory](reuse-inventory.md), and [limited two-minute talk track](demo-script.md) for safe external wording and the remaining blockers. The external artifact audit is at `docs/evidence/github-mcp-reference-demo/audit-notes.md`.
|