@strixgov/mcp-proxy 0.1.0

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 ADDED
@@ -0,0 +1,93 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@strixgov/mcp-proxy` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0]
9
+
10
+ Initial release. The Strix MCP Proxy — a standalone process that
11
+ wraps any upstream MCP server with governance, with **zero changes**
12
+ to the upstream's tool implementations.
13
+
14
+ This is the **distribution wedge** for governed agent tool execution
15
+ per [`docs/strategy/mcp-mode-ladder-v1.md`](https://github.com/Strixgov/strix/tree/main/docs/strategy/mcp-mode-ladder-v1.md):
16
+ fastest path to "Strix governs every MCP call on this machine,"
17
+ designed so Mode 3 (Capability-Enforced) is the v0.2.0 upgrade path
18
+ rather than a v1.0 rewrite.
19
+
20
+ ### Added
21
+ - `COMMERCIAL.md` — plain-English summary of the ELv2 boundary,
22
+ designed for both the developer evaluating the proxy (30-second
23
+ decision tree) and the legal / procurement team reviewing it
24
+ (10-row scenarios table with ✅ / 💰 / ⚠️ outcomes). Mirrors the
25
+ posture of `@strixgov/mcp-adapter`'s COMMERCIAL.md with
26
+ proxy-specific deployment scenarios (multi-tenant gateway, MSP,
27
+ on-prem appliance). Ships in the npm tarball via the `files`
28
+ allowlist.
29
+ - `strix-mcp-proxy` CLI — spawn over stdio in place of any upstream
30
+ MCP server; configure via flags or a JSON config file. Compatible
31
+ with Claude Desktop, mcp-cli, IDE integrations, and any other
32
+ MCP-aware client that spawns its servers as child processes.
33
+ - `startProxy(opts)` programmatic API in `src/index.mjs` for
34
+ embedding the proxy in a host process or test harness.
35
+ - `loadConfig(filePath)` + `resolveCapabilities(spec)` config-loader
36
+ helpers — validated config-file shape, ~`/` expansion in
37
+ `storagePath`, dynamic import of companion-pack capability arrays.
38
+ - Companion-pack-aware classification — accepts any
39
+ `@strixgov/capabilities-mcp-common/*` import path via the
40
+ `capabilities` config field. Heuristic fallback for unknown tools.
41
+ - Local-mode (in-memory + JSONL) signed Ed25519 receipts; opt-in
42
+ connected mode (sync to `strixgov.com`) via `STRIX_API_KEY` +
43
+ `STRIX_TENANT_ID` per the mcp-adapter contract.
44
+ - Approval gate plumbing — wired to `@strixgov/tool-gateway`'s
45
+ approver interface; consumers supply their own
46
+ Slack / webhook / web UI / terminal approver.
47
+ - Actor context forwarding — clients that put
48
+ `_meta.strix_actor_id` / `_meta.strix_actor_role` on a callTool
49
+ request get those fields bound into the receipt.
50
+ - Test mode (`transport: { kind: "test", ... }`) — caller supplies
51
+ an `InMemoryTransport` pair so the full proxy pipeline can be
52
+ exercised in-process without spawning subprocesses. Used by the
53
+ end-to-end test suite.
54
+
55
+ ### Verification
56
+ - 25 tests pass under `node --test` (+1 skipped: the network-gated
57
+ tarball install smoke; opt in with `STRIX_RUN_TARBALL_INSTALL=1`):
58
+ - `test/proxy-end-to-end.test.mjs` — full pipeline with linked
59
+ InMemoryTransport pairs; ALLOW round-trip, DENY blocks the
60
+ upstream + still emits signed receipt, companion-pack canonical
61
+ receipt ids, actor-context forwarding, audit-event lifecycle,
62
+ riskOverrides batch gating, startProxy validation errors.
63
+ - `test/config.test.mjs` — config-file loader validation, ~/
64
+ expansion, companion-pack dynamic import resolution.
65
+ - `test/cli.test.mjs` — `--help`, `--version`, missing-arg errors,
66
+ missing-file errors.
67
+ - Companion-pack lookup uses `cap.name` indexing (the P0 #2 fix
68
+ shipped on `claude/strix-mcp-wrapping-IDXOy`) so server-prefixed
69
+ tool names (`notion-fetch`, `slack_send_message`) match the pack
70
+ rather than falling through to the MEDIUM EXECUTE heuristic.
71
+
72
+ ### Mode coverage
73
+ - **Mode 1 (Observed)** — every call produces a signed receipt.
74
+ - **Mode 2 (Approval-Gated)** — HIGH / CRITICAL or rule-targeted
75
+ calls held at the action boundary; approver identity bound to
76
+ the receipt; non-retroactive.
77
+ - **Mode 3 (Capability-Enforced)** — explicitly deferred to v0.2.0.
78
+ The design seam (`buildUpstreamIface()` in `src/proxy.mjs`) is the
79
+ single place where `execution_authorization_v1` token mint +
80
+ transport will attach. The cryptographic primitive is already
81
+ shipped at `@strixgov/mcp-token-validator`.
82
+
83
+ ### License
84
+ - Source-available under [Elastic License 2.0](./LICENSE) — per the
85
+ packaging spec at `docs/strategy/mcp-adapter-packaging-v1.md`,
86
+ every commercial-tier package in the Strix bundle ships under
87
+ ELv2; the trust primitives stay MIT.
88
+ - **NOTE for first publish:** verify the bundled `LICENSE` text
89
+ against the canonical Elastic License 2.0 at
90
+ https://www.elastic.co/licensing/elastic-license before tagging
91
+ `mcp-proxy-v0.1.0`. The bundled text is the agent's best
92
+ reproduction of the canonical license and should be reviewed by
93
+ legal counsel before going live.
package/COMMERCIAL.md ADDED
@@ -0,0 +1,159 @@
1
+ # Commercial use of `@strixgov/mcp-proxy`
2
+
3
+ `@strixgov/mcp-proxy` is distributed under the
4
+ [Elastic License 2.0](./LICENSE) — **source-available**, free for
5
+ internal use, with one operational restriction.
6
+
7
+ This document is the plain-English summary of the license boundary
8
+ and the path to a commercial license when you need one. It is not
9
+ legal advice; the canonical terms live in [`LICENSE`](./LICENSE).
10
+
11
+ The same licensing posture applies to
12
+ [`@strixgov/mcp-adapter`](https://www.npmjs.com/package/@strixgov/mcp-adapter).
13
+ The trust primitives the proxy depends on
14
+ ([`@strixgov/verifier`](https://www.npmjs.com/package/@strixgov/verifier),
15
+ [`@strixgov/tool-gateway`](https://www.npmjs.com/package/@strixgov/tool-gateway),
16
+ [`@strixgov/mcp-token-validator`](https://www.npmjs.com/package/@strixgov/mcp-token-validator),
17
+ the `@strixgov/capabilities-*` packs) are MIT-licensed separately and
18
+ have no commercial restrictions.
19
+
20
+ ---
21
+
22
+ ## Quick answer — 30 seconds (for the developer evaluating the proxy)
23
+
24
+ Walk down this tree. Stop at the first **yes**.
25
+
26
+ 1. **Are you running `strix-mcp-proxy` on your laptop, in CI, or in a
27
+ private staging environment?**
28
+ → **Free.** No license needed.
29
+
30
+ 2. **Are you running it in production in front of MCP servers that
31
+ *your own* agents talk to?** (e.g. your Claude Desktop config now
32
+ points at the proxy instead of the upstream Notion / GitHub /
33
+ Filesystem MCP server)
34
+ → **Free.** Internal production is the headline ELv2 grant.
35
+
36
+ 3. **Are you running one proxy instance per customer, on infrastructure
37
+ you own, where each customer's agents go through their own
38
+ proxy?**
39
+ → **Free if each instance governs only that customer's agents.**
40
+ This is "distributing the software in your own product" — see
41
+ row 6 in the scenarios table.
42
+
43
+ 4. **Are you running one proxy instance that fronts MCP traffic for
44
+ multiple third-party customers (multi-tenant gateway-as-a-service)?**
45
+ → **Commercial license required.** Email
46
+ [`sales@strixgov.com`](mailto:sales@strixgov.com).
47
+
48
+ 5. **Are you offering the proxy itself as a hosted product (e.g.
49
+ "GovernanceCloud — point your MCP client at us")?**
50
+ → **Commercial license required.** Same email.
51
+
52
+ 6. **Are you unsure which side of the line you're on?**
53
+ → Email [`sales@strixgov.com`](mailto:sales@strixgov.com) — most
54
+ "unsure" cases turn out to be free.
55
+
56
+ ---
57
+
58
+ ## Scenarios table — for legal / procurement review
59
+
60
+ The cases that come up most often for a network-positioned proxy.
61
+ Cite the row number when emailing for confirmation.
62
+
63
+ | # | Scenario | Outcome | Why |
64
+ |---|----------|---------|-----|
65
+ | 1 | Internal use — your engineers run `strix-mcp-proxy` locally in front of Claude Desktop's MCP servers | ✅ **Free** | Pure internal use; matches the headline ELv2 grant. |
66
+ | 2 | One proxy per environment (dev/stage/prod), all governing the same company's agents | ✅ **Free** | Same as row 1; the count of instances doesn't matter, the question is whether each instance serves your own agents. |
67
+ | 3 | You wrap the proxy in your own SaaS product (the proxy is invisible to your end users; they never call it, you operate it for the agents *your product* runs) | ✅ **Free** | The proxy is an internal dependency of your product. ELv2's "hosted service" restriction is about whether you expose the proxy's *governance features* to third parties. |
68
+ | 4 | Multi-tenant proxy — one instance fronting MCP traffic for several of *your customers'* agents, where each customer can configure their own policy through the proxy | 💰 **License required** | Hosting the proxy's features for third parties. This is exactly what ELv2 reserves. |
69
+ | 5 | MSP runs one proxy per managed customer, each on the customer's own infrastructure, billed per managed instance | ⚠️ **Email us** | Likely fine if each instance is operationally isolated to a single customer and you're billing for the management service, not for the proxy itself. Quick clarification saves both sides time. |
70
+ | 6 | On-premise enterprise product — you ship a software appliance that includes the proxy; each customer installs it on their own infrastructure and operates it themselves | ✅ **Free** | You're distributing, not hosting. Each customer is operating it internally for themselves. |
71
+ | 7 | You fork the proxy, rebrand it as "AgentGuard Proxy," and sell it as a hosted product | 💰 **License required** | Rebranding doesn't change the license question; hosting third-party governance is the restricted activity. |
72
+ | 8 | Open-source project (non-commercial) ships the proxy as part of its agent toolchain documentation | ✅ **Free** | Internal use by maintainers; redistribution under ELv2 is permitted. |
73
+ | 9 | You operate the proxy AND sync receipts to `strixgov.com` for centralized evidence retention | ⚠️ **Email us** | Proxy use itself is free per row 1; the hosted Strix platform has separate commercial terms. The hosted side is what you'd be buying. |
74
+ | 10 | Federal / regulated buyer requires FAR/DFARS, FedRAMP-adjacent posture, SOC 2, custom MSA | 💰 **License required (Enterprise tier)** | Commercial terms on top of ELv2; same email path — mention "federal." |
75
+
76
+ ### Reading the outcomes
77
+
78
+ - **✅ Free** — use under ELv2 without contacting us. Standard
79
+ contribution and redistribution rules apply (see the contribution
80
+ note below).
81
+ - **💰 License required** — email
82
+ [`sales@strixgov.com`](mailto:sales@strixgov.com) before deploying.
83
+ Tier proposal returned within one business day; standard MSA
84
+ available for review.
85
+ - **⚠️ Email us** — on the boundary or involves a separate Strix
86
+ product. Quick clarification saves both sides time later.
87
+
88
+ ### What ELv2 actually restricts (one paragraph)
89
+
90
+ The Elastic License 2.0 grants you the right to read, modify, run, and
91
+ redistribute the software with three limitations: you can't (a) provide
92
+ the software's features to third parties as a hosted or managed
93
+ service, (b) circumvent the license-key functionality, or (c) remove
94
+ or obscure the licensing or attribution notices. Limitation (a) is the
95
+ only one that meaningfully affects this package — (b) doesn't apply
96
+ because there are no license keys, and (c) is just "keep the LICENSE
97
+ file." See the
98
+ [canonical Elastic License 2.0 text](https://www.elastic.co/licensing/elastic-license)
99
+ for the exact wording.
100
+
101
+ ---
102
+
103
+ ## When you need a commercial license
104
+
105
+ Buy a commercial license if you need any of the following:
106
+
107
+ 1. **Offer the proxy as a hosted or managed governance service to
108
+ third parties.** Multi-tenant gateway-as-a-service is the
109
+ archetype. Internal use is fine; B2B service offerings are not.
110
+ 2. **Connected Mode at strixgov.com.** Centralized approvals,
111
+ evidence retention beyond your local disk (EU AI Act 2-year
112
+ requirement), multi-tenant policy management, SIEM forwarding,
113
+ compliance evidence packs. None of those are part of the ELv2
114
+ grant — they're the Strix hosted platform.
115
+ 3. **Enterprise features** the standard proxy doesn't ship:
116
+ SAML/OIDC SSO for approvers, RBAC on approval roles, KMS-backed
117
+ signing keys (AWS KMS / GCP Cloud KMS), dedicated support, custom
118
+ MSA, SOC 2 / FedRAMP / regulatory attestations.
119
+
120
+ If you're not sure which category you're in, email
121
+ [`sales@strixgov.com`](mailto:sales@strixgov.com).
122
+
123
+ ---
124
+
125
+ ## How to get a commercial license
126
+
127
+ Email [`sales@strixgov.com`](mailto:sales@strixgov.com) with:
128
+
129
+ - Your company name + primary contact
130
+ - A one-paragraph description of how you intend to deploy the proxy
131
+ - Approximate scale (number of tenants, expected receipt volume per
132
+ month, target compliance regimes — SOC 2 / EU AI Act / HIPAA /
133
+ FedRAMP)
134
+ - Whether you need any of the Enterprise features listed above
135
+
136
+ Federal procurement: same email, mention federal scope and we'll route
137
+ appropriately.
138
+
139
+ ---
140
+
141
+ ## What about contribution?
142
+
143
+ Contributions are welcome under ELv2. By submitting a pull request you
144
+ agree your contribution is licensed under the same terms as the rest
145
+ of the package — same approach as Elasticsearch, Kibana, Sentry, and
146
+ other ELv2 projects.
147
+
148
+ ---
149
+
150
+ ## Where to read the actual terms
151
+
152
+ - [`LICENSE`](./LICENSE) — the verbatim Elastic License 2.0 text.
153
+ - [`@strixgov/mcp-adapter/COMMERCIAL.md`](https://github.com/Strixgov/strix/tree/main/packages/strixgov-mcp-adapter/COMMERCIAL.md)
154
+ — the sibling document for the adapter library; same posture, mostly
155
+ the same scenarios.
156
+ - [https://www.elastic.co/licensing/elastic-license](https://www.elastic.co/licensing/elastic-license)
157
+ — the canonical Elastic 2.0 source. The bundled `LICENSE` should
158
+ match this verbatim; if you spot a discrepancy, the canonical source
159
+ wins — file an issue.
package/LICENSE ADDED
@@ -0,0 +1,91 @@
1
+ Elastic License 2.0
2
+
3
+ Acceptance
4
+
5
+ By using the software, you agree to all of the terms and conditions below.
6
+
7
+ Copyright License
8
+
9
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
10
+ non-sublicensable, non-transferable license to use, copy, distribute, make
11
+ available, and prepare derivative works of the software, in each case subject
12
+ to the limitations and conditions below.
13
+
14
+ Limitations
15
+
16
+ You may not provide the software to others as a hosted or managed service,
17
+ where the service provides users with access to any substantial set of the
18
+ features or functionality of the software.
19
+
20
+ You may not move, change, disable, or circumvent the license key functionality
21
+ in the software, and you may not remove or obscure any functionality in the
22
+ software that is protected by the license key.
23
+
24
+ You may not alter, remove, or obscure any licensing, copyright, or other
25
+ notices of the licensor in the software. Any use of the licensor's trademarks
26
+ is subject to applicable law.
27
+
28
+ Patents
29
+
30
+ The licensor grants you a license, under any patent claims the licensor can
31
+ license, or becomes able to license, to make, have made, use, sell, offer for
32
+ sale, import and have imported the software, in each case subject to the
33
+ limitations and conditions in this license. This license does not cover any
34
+ patent claims that you cause to be infringed by modifications or additions to
35
+ the software. If you or your company make any written claim that the software
36
+ infringes or contributes to infringement of any patent, your patent license
37
+ for the software granted under these terms ends immediately. If your company
38
+ makes such a claim, your patent license ends immediately for work on behalf
39
+ of your company.
40
+
41
+ Notices
42
+
43
+ You must ensure that anyone who gets a copy of any part of the software from
44
+ you also gets a copy of these terms.
45
+
46
+ If you modify the software, you must include in any modified copies of the
47
+ software prominent notices stating that you have modified the software.
48
+
49
+ No Other Rights
50
+
51
+ These terms do not imply any licenses other than those expressly granted in
52
+ these terms.
53
+
54
+ Termination
55
+
56
+ If you use the software in violation of these terms, such use is not licensed,
57
+ and your licenses will automatically terminate. If the licensor provides you
58
+ with a notice of your violation, and you cease all violation of this license
59
+ no later than 30 days after you receive that notice, your licenses will be
60
+ reinstated retroactively. However, if you violate these terms after such
61
+ reinstatement, any additional violation of these terms will cause your
62
+ licenses to terminate automatically and permanently.
63
+
64
+ No Liability
65
+
66
+ As far as the law allows, the software comes as is, without any warranty or
67
+ condition, and the licensor will not be liable to you for any damages arising
68
+ out of these terms or the use or nature of the software, under any kind of
69
+ legal claim.
70
+
71
+ Definitions
72
+
73
+ The "licensor" is the entity offering these terms, and the "software" is the
74
+ software the licensor makes available under these terms, including any portion
75
+ of it.
76
+
77
+ "you" refers to the individual or entity agreeing to these terms.
78
+
79
+ "your company" is any legal entity, sole proprietorship, or other kind of
80
+ organization that you work for, plus all organizations that have control over,
81
+ are under the control of, or are under common control with that organization.
82
+ "control" means ownership of substantially all the assets of an entity, or
83
+ the power to direct its management and policies by vote, contract, or
84
+ otherwise. Control can be direct or indirect.
85
+
86
+ "your licenses" are all the licenses granted to you for the software under
87
+ these terms.
88
+
89
+ "use" means anything you do with the software requiring one of your licenses.
90
+
91
+ "trademark" means trademarks, service marks, and similar rights.
package/README.md ADDED
@@ -0,0 +1,234 @@
1
+ # @strixgov/mcp-proxy
2
+
3
+ **The distribution wedge for governed agent tool execution. Point your MCP client at the proxy instead of the underlying server — every `callTool` becomes intercepted, evaluated against policy, and emits a signed Ed25519 receipt. Designed so Mode 3 enforcement is the v0.2.0 upgrade path, not a rewrite.**
4
+
5
+ ```sh
6
+ npm install -g @strixgov/mcp-proxy
7
+ strix-mcp-proxy --config ./proxy-config.json
8
+ ```
9
+
10
+ Compared to `@strixgov/mcp-adapter`, which is a library you integrate into
11
+ your own MCP server code: the proxy is a **standalone process** you run in
12
+ front of any existing MCP server, with **zero changes** to your tool
13
+ implementations. It's the "change your MCP endpoint" path — the lowest-friction
14
+ way to put Strix governance in front of an agent in production.
15
+
16
+ ## What it does
17
+
18
+ ```
19
+ MCP Client ──stdio──▶ [strix-mcp-proxy] ──stdio──▶ Upstream MCP Server (Notion, GitHub, Filesystem, …)
20
+ ▲
21
+ │
22
+ governMCPServer:
23
+ classify → policy → approval → receipt
24
+ ```
25
+
26
+ For every incoming `callTool`:
27
+
28
+ 1. **Classify** the tool via the configured companion pack (heuristic fallback for unknown).
29
+ 2. **Evaluate** policy — `ALLOW` / `DENY` / `APPROVAL_REQUIRED`.
30
+ 3. **Hold** for an approver when policy demands it.
31
+ 4. **Execute** via the upstream MCP server (only on `ALLOW`).
32
+ 5. **Sign** an Ed25519 receipt — allowed or denied — verifiable against the public JWKS by `@strixgov/verifier`.
33
+
34
+ Tool implementations are untouched. The MCP client (Claude Desktop, mcp-cli,
35
+ IDE integration, your own code) doesn't need to know Strix exists — it just
36
+ spawns this proxy in place of the upstream server.
37
+
38
+ ## 5-line integration (Claude Desktop)
39
+
40
+ ```jsonc
41
+ // ~/Library/Application Support/Claude/claude_desktop_config.json
42
+ {
43
+ "mcpServers": {
44
+ "notion": {
45
+ "command": "strix-mcp-proxy",
46
+ "args": ["--config", "/Users/you/strix-proxy/notion.json"]
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ The config file at `notion.json` points the proxy at the real Notion MCP
53
+ server and sets your policy. See [`examples/notion-proxy-config.json`](./examples/notion-proxy-config.json)
54
+ for a complete example.
55
+
56
+ ## Config file shape
57
+
58
+ ```jsonc
59
+ {
60
+ "serverId": "notion", // namespace for capability ids
61
+ "upstream": {
62
+ "command": "npx",
63
+ "args": ["-y", "@notionhq/notion-mcp-server"]
64
+ },
65
+ "capabilities": "@strixgov/capabilities-mcp-common/notion", // import path
66
+ "policy": {
67
+ "rules": {
68
+ "mcp.notion.create_database": "DENY" // per-capability override
69
+ },
70
+ "riskOverrides": {
71
+ "LOW": "ALLOW",
72
+ "MEDIUM": "APPROVAL_REQUIRED",
73
+ "HIGH": "APPROVAL_REQUIRED",
74
+ "CRITICAL": "DENY"
75
+ },
76
+ "default": "DENY"
77
+ },
78
+ "approval": { "enabled": false },
79
+ "storagePath": "~/.strix-mcp-proxy/notion" // optional; JSONL receipts on disk
80
+ }
81
+ ```
82
+
83
+ `capabilities` can be either:
84
+ - a bare import path (`@strixgov/capabilities-mcp-common/notion`,
85
+ `@strixgov/capabilities-mcp-common/github`, etc.) — resolved at startup
86
+ - an inline array of `McpCapability` objects (caller-managed classification)
87
+
88
+ ## CLI flags (no config file needed for simple cases)
89
+
90
+ ```sh
91
+ strix-mcp-proxy \
92
+ --upstream-command npx \
93
+ --upstream-arg "-y" --upstream-arg "@notionhq/notion-mcp-server" \
94
+ --server-id notion \
95
+ --capabilities @strixgov/capabilities-mcp-common/notion \
96
+ --policy-default DENY \
97
+ --risk-low ALLOW \
98
+ --risk-medium APPROVAL_REQUIRED \
99
+ --risk-critical DENY \
100
+ --storage-path ~/.strix-mcp-proxy/notion
101
+ ```
102
+
103
+ Run `strix-mcp-proxy --help` for the full flag list.
104
+
105
+ ## What ships with the proxy
106
+
107
+ | Feature | v0.1.0 | v0.2.0 (planned) |
108
+ |---|---|---|
109
+ | MCP stdio transport (consumer side) | ✓ | — |
110
+ | MCP stdio transport (upstream side) | ✓ | — |
111
+ | MCP HTTP transport (either side) | — | ✓ |
112
+ | Companion-pack classification | ✓ | — |
113
+ | Heuristic fallback for unknown tools | ✓ | — |
114
+ | Fail-closed default policy | ✓ | — |
115
+ | Per-capability rules + risk overrides | ✓ | — |
116
+ | Approval gate (any approver implementation) | ✓ | — |
117
+ | Local-mode signed receipts (in-memory or JSONL) | ✓ | — |
118
+ | Connected mode (sync receipts to `strixgov.com`) | ✓ | — |
119
+ | Mode 1 (Observed) | ✓ | — |
120
+ | Mode 2 (Approval-Gated) | ✓ | — |
121
+ | **Mode 3 (Capability-Enforced) — `execution_authorization_v1` token mint + transport** | — | ✓ |
122
+ | **Posture B reference impl (HTTP outbound enforcement)** | — | ✓ |
123
+
124
+ See [`docs/strategy/mcp-mode-ladder-v1.md`](https://github.com/Strixgov/strix/tree/main/docs/strategy/mcp-mode-ladder-v1.md)
125
+ for the framing of Mode 1 / 2 / 3 and the exact public claim available
126
+ at each enforcement strength.
127
+
128
+ ## The upgrade path to Mode 3
129
+
130
+ Mode 3 — Capability-Enforced — is the upgrade, not a rewrite. The
131
+ v0.1.0 proxy already routes every outbound call through a single
132
+ `buildUpstreamIface()` seam in `src/proxy.mjs`. In v0.2.0 a new option
133
+ (`mode: "enforced"`) will wrap that seam with the
134
+ `execution_authorization_v1` token mint + transport step per
135
+ [`docs/architecture/mcp-mode-3-enforcement-v1.md`](https://github.com/Strixgov/strix/tree/main/docs/architecture/mcp-mode-3-enforcement-v1.md).
136
+
137
+ Operators turn on Mode 3 by adding `"mode": "enforced"` to the config
138
+ file. Upstream MCP servers that opt in to validation (via
139
+ [`@strixgov/mcp-token-validator`](https://www.npmjs.com/package/@strixgov/mcp-token-validator))
140
+ refuse to act on sensitive tools unless the token is present.
141
+
142
+ The cryptographic primitive is already shipped — see
143
+ [`@strixgov/mcp-token-validator`](https://www.npmjs.com/package/@strixgov/mcp-token-validator).
144
+ v0.1.0 of the proxy does not mint these tokens yet; what it does is
145
+ make sure the *seam* exists so v0.2.0 plugs in cleanly.
146
+
147
+ ## Listening to receipts
148
+
149
+ ```js
150
+ import { startProxy } from "@strixgov/mcp-proxy";
151
+
152
+ const handle = await startProxy({
153
+ upstream: { command: "npx", args: ["-y", "@notionhq/notion-mcp-server"] },
154
+ serverId: "notion",
155
+ capabilities: notionCapabilities,
156
+ policy: { default: "DENY", riskOverrides: { LOW: "ALLOW" } },
157
+ onReceipt: (r) => {
158
+ console.log(r.decision, r.capabilityId, r.signature);
159
+ },
160
+ });
161
+ ```
162
+
163
+ Every receipt is byte-compatible with [`@strixgov/verifier`](https://www.npmjs.com/package/@strixgov/verifier):
164
+
165
+ ```sh
166
+ npx @strixgov/verifier chain ~/.strix-mcp-proxy/notion/receipts.jsonl
167
+ ```
168
+
169
+ The verifier has zero Strix runtime dependency. Strix is not on the
170
+ trust path of receipt verification.
171
+
172
+ ## What this proxy is NOT
173
+
174
+ - **Not an MCP server you call directly.** It's a *wrap* of an
175
+ existing MCP server. You need an upstream.
176
+ - **Not a replacement for `@strixgov/mcp-adapter`.** The adapter is
177
+ the library; the proxy is the standalone process. They share the
178
+ same governance core (`@strixgov/tool-gateway`) and produce
179
+ byte-identical receipts.
180
+ - **Not Mode 3 today.** v0.1.0 ships Mode 1 + Mode 2. Mode 3
181
+ enforcement is the v0.2.0 upgrade path, designed for, but not
182
+ implemented in, this release.
183
+
184
+ ## Security posture
185
+
186
+ See [`SECURITY.md`](./SECURITY.md) for the security-team-facing
187
+ posture, including:
188
+
189
+ - **Credential boundary** — three deployment positions (proxy holds /
190
+ proxy passes through / proxy never sees the credential) with the
191
+ audit-posture trade-off of each.
192
+ - **What the proxy stores** — only signed receipts (with
193
+ `invocationHash`, NOT raw args), the gateway signing key, and
194
+ policy config. Never auth credentials. Never raw tool args.
195
+ - **Process model** — what happens on crash / mid-approval / disk
196
+ full. Fail-closed at every boundary; the proxy will not start
197
+ without a loadable signing key.
198
+ - **Multi-tenant boundary** — single-tenant by design in v0.1.0;
199
+ run one proxy process per tenant for isolation.
200
+ - **What the proxy does NOT govern** — out-of-wrapper traffic, the
201
+ agent's internal state, the upstream's own argument handling
202
+ (SQL/command injection inside the upstream is the upstream's
203
+ responsibility).
204
+
205
+ Report security issues via GitHub Security Advisory on
206
+ `github.com/Strixgov/strix`. The companion operator runbook at
207
+ [`docs/runbooks/operate-mcp-proxy.md`](https://github.com/Tarshann/strix-platform/tree/main/docs/runbooks/operate-mcp-proxy.md)
208
+ covers daily operations, receipt-log rotation, and upgrade
209
+ discipline.
210
+
211
+ ## License
212
+
213
+ Source-available under the [Elastic License 2.0](./LICENSE).
214
+
215
+ You may use, modify, and self-host the proxy internally — including
216
+ in production — provided you do not offer it as a hosted or managed
217
+ service to third parties.
218
+
219
+ If you run the proxy in a commercial product or want hosted approvals,
220
+ connected mode, retention, or compliance evidence packs, email
221
+ `sales@strixgov.com`.
222
+
223
+ The trust primitives the proxy depends on
224
+ ([`@strixgov/verifier`](https://www.npmjs.com/package/@strixgov/verifier),
225
+ [`@strixgov/tool-gateway`](https://www.npmjs.com/package/@strixgov/tool-gateway),
226
+ [`@strixgov/mcp-token-validator`](https://www.npmjs.com/package/@strixgov/mcp-token-validator))
227
+ remain MIT-licensed. Strix is not on the trust path of receipt
228
+ verification or token validation — that property is unchanged by
229
+ this license boundary.
230
+
231
+ ## Requirements
232
+
233
+ - Node.js ≥ 18
234
+ - An upstream MCP server (stdio transport)