sovr-mcp-proxy 1.0.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/LICENSE +102 -0
- package/README.md +168 -0
- package/dist/index.js +7253 -0
- package/package.json +55 -0
- package/server.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: SOVR AI
|
|
6
|
+
Licensed Work: sovr-mcp-server v6.0.0
|
|
7
|
+
The Licensed Work is (c) 2024-2026 SOVR AI.
|
|
8
|
+
Additional Use Grant: You may make production use of the Licensed Work,
|
|
9
|
+
provided your use does not include offering the
|
|
10
|
+
Licensed Work to third parties as a commercial
|
|
11
|
+
AI governance or AI safety proxy service.
|
|
12
|
+
Change Date: 2030-02-19
|
|
13
|
+
Change License: Apache License, Version 2.0
|
|
14
|
+
|
|
15
|
+
-----------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
18
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
19
|
+
|
|
20
|
+
Terms
|
|
21
|
+
|
|
22
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
23
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
24
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
25
|
+
production use.
|
|
26
|
+
|
|
27
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
28
|
+
available distribution of a specific version of the Licensed Work under this
|
|
29
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
30
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
31
|
+
above terminate.
|
|
32
|
+
|
|
33
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
34
|
+
currently in effect as described in this License, you must purchase a
|
|
35
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
36
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
37
|
+
|
|
38
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
39
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
40
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
41
|
+
for each version of the Licensed Work released by Licensor.
|
|
42
|
+
|
|
43
|
+
You must conspicuously display this License on each original or modified copy
|
|
44
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
45
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
46
|
+
License apply to your use of that work.
|
|
47
|
+
|
|
48
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
49
|
+
terminate your rights under this License for the current and all other
|
|
50
|
+
versions of the Licensed Work.
|
|
51
|
+
|
|
52
|
+
This License does not grant you any right in any trademark or logo of
|
|
53
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
54
|
+
Licensor as expressly required by this License).
|
|
55
|
+
|
|
56
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
57
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
58
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
59
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
60
|
+
TITLE.
|
|
61
|
+
|
|
62
|
+
MariaDB hereby grants you permission to use this License's text to license
|
|
63
|
+
your works, and to refer to it using the trademark "Business Source License",
|
|
64
|
+
as long as you comply with the Covenants of Licensor below.
|
|
65
|
+
|
|
66
|
+
Covenants of Licensor
|
|
67
|
+
|
|
68
|
+
In consideration of the right to use this License's text and the "Business
|
|
69
|
+
Source License" name and trademark, Licensor covenants to MariaDB, and to all
|
|
70
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
71
|
+
|
|
72
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
73
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
74
|
+
where "compatible" means that software provided under the Change License
|
|
75
|
+
can be included in a program with software provided under GPL Version 2.0
|
|
76
|
+
or a later version. Licensor may specify additional Change Licenses
|
|
77
|
+
without limitation.
|
|
78
|
+
|
|
79
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
80
|
+
impose any additional restriction on the right granted in this License, as
|
|
81
|
+
the Additional Use Grant; or (b) insert the text "None".
|
|
82
|
+
|
|
83
|
+
3. To specify a Change Date.
|
|
84
|
+
|
|
85
|
+
4. Not to modify this License in any other way.
|
|
86
|
+
|
|
87
|
+
Notice
|
|
88
|
+
|
|
89
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
90
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
91
|
+
under an Open Source License, as stated in this License.
|
|
92
|
+
|
|
93
|
+
-----------------------------------------------------------------------------
|
|
94
|
+
|
|
95
|
+
NOTICE: This package (sovr-mcp-server) is the MCP protocol proxy/server for
|
|
96
|
+
the SOVR Responsibility Layer. It includes a minimal demo rule set for
|
|
97
|
+
testing purposes only. The full production rule library, threat pattern
|
|
98
|
+
database, and compliance templates are proprietary and available exclusively
|
|
99
|
+
through the SOVR Cloud API (https://api.sovr.inc).
|
|
100
|
+
|
|
101
|
+
The SOVR name, logo, and brand assets are trademarks of SOVR AI and may not
|
|
102
|
+
be used without permission.
|
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# sovr-mcp-proxy
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/sovr-mcp-proxy)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
|
|
6
|
+
**Transparent MCP Proxy — The Execution Firewall for AI Agents.**
|
|
7
|
+
|
|
8
|
+
`sovr-mcp-proxy` is a superset of [`sovr-mcp-server`](https://www.npmjs.com/package/sovr-mcp-server). It includes all MCP Server capabilities **plus** a transparent proxy layer that intercepts, evaluates, and audits every agent→tool call against configurable policy rules before forwarding to downstream MCP servers.
|
|
9
|
+
|
|
10
|
+
## Architecture
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
|
|
14
|
+
│ AI Agent │────▶│ sovr-mcp-proxy │────▶│ Downstream MCP │
|
|
15
|
+
│ (Claude etc) │ │ Gate-Check Layer│ │ (Stripe/GitHub) │
|
|
16
|
+
└─────────────┘ └──────────────────┘ └─────────────────┘
|
|
17
|
+
│
|
|
18
|
+
Policy Rules
|
|
19
|
+
Permit/Receipt
|
|
20
|
+
Audit Trail
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Key Differences: Proxy vs Server
|
|
24
|
+
|
|
25
|
+
| Feature | sovr-mcp-proxy | sovr-mcp-server |
|
|
26
|
+
|---------|---------------|-----------------|
|
|
27
|
+
| **286 Native Tools** | ✅ | ✅ |
|
|
28
|
+
| **1630 SDK Routes** | ✅ | ✅ |
|
|
29
|
+
| **Transparent Proxy Mode** | ✅ | ❌ |
|
|
30
|
+
| **Downstream Server Interception** | ✅ | ❌ |
|
|
31
|
+
| **Spawn/Discover/Intercept/Forward** | ✅ | ❌ |
|
|
32
|
+
| **Multi-server Routing** | ✅ | ❌ |
|
|
33
|
+
| **Anti-loop Protection** | ✅ | N/A |
|
|
34
|
+
| **Hop Counter** | ✅ | N/A |
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
### Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install -g sovr-mcp-proxy
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Claude Desktop Configuration
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"sovr-proxy": {
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": ["sovr-mcp-proxy"],
|
|
52
|
+
"env": {
|
|
53
|
+
"SOVR_API_KEY": "sovr_sk_...",
|
|
54
|
+
"SOVR_PROXY_CONFIG": "/path/to/proxy.json"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Proxy Configuration (proxy.json)
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"downstream": {
|
|
66
|
+
"stripe": {
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["@stripe/agent-toolkit"],
|
|
69
|
+
"env": { "STRIPE_SECRET_KEY": "sk_test_..." }
|
|
70
|
+
},
|
|
71
|
+
"github": {
|
|
72
|
+
"command": "npx",
|
|
73
|
+
"args": ["@modelcontextprotocol/server-github"],
|
|
74
|
+
"env": { "GITHUB_TOKEN": "ghp_..." }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Every tool call to `stripe` or `github` is intercepted by SOVR's gate-check layer before forwarding.
|
|
81
|
+
|
|
82
|
+
## How It Works
|
|
83
|
+
|
|
84
|
+
1. **Spawn** — On startup, sovr-mcp-proxy spawns all downstream MCP servers as child processes
|
|
85
|
+
2. **Discover** — Enumerates tools from each downstream server via `tools/list`
|
|
86
|
+
3. **Intercept** — When the AI agent calls any tool, the proxy evaluates it against policy rules
|
|
87
|
+
4. **Gate-Check** — Applies permit/deny/escalate verdict based on rules
|
|
88
|
+
5. **Forward** — Approved calls are forwarded to the downstream server; denied calls return an error
|
|
89
|
+
|
|
90
|
+
## Security Features
|
|
91
|
+
|
|
92
|
+
### HTTPS Enforcement
|
|
93
|
+
All non-localhost connections are validated for HTTPS. HTTP connections to external hosts are rejected.
|
|
94
|
+
|
|
95
|
+
### Fail-Close / Fail-Local Degradation
|
|
96
|
+
- **Default (fail-close)**: If SOVR Cloud is unreachable, all gated operations are denied
|
|
97
|
+
- **Configurable (fail-local)**: Set `SOVR_FAIL_MODE=fail-local` to fall back to 20 built-in local rules
|
|
98
|
+
|
|
99
|
+
### Three-State Degradation
|
|
100
|
+
|
|
101
|
+
| Mode | Behavior | Use Case |
|
|
102
|
+
|------|----------|----------|
|
|
103
|
+
| `strict` (default) | Enforce all deny/escalate verdicts | Production |
|
|
104
|
+
| `record-only` | Log violations but allow execution | Emergency availability rescue |
|
|
105
|
+
| `propose-only` | Return verdict without executing | Dry-run / testing |
|
|
106
|
+
|
|
107
|
+
### Anti-Loop Protection
|
|
108
|
+
- Hop counter prevents infinite proxy chains (default max: 3 hops)
|
|
109
|
+
- Re-entry guard detects circular tool call patterns
|
|
110
|
+
|
|
111
|
+
### Data Redaction
|
|
112
|
+
Sensitive fields (`password`, `secret`, `token`, `key`, `authorization`, `cookie`, `ssn`, `credit_card`) are automatically redacted in all logs and audit entries.
|
|
113
|
+
|
|
114
|
+
### Unified Alert Dispatcher
|
|
115
|
+
Configurable alert routing to Webhook, Slack, PagerDuty, or OpsGenie (replaces hardcoded Telegram).
|
|
116
|
+
|
|
117
|
+
## Built-in Rules (Free Tier)
|
|
118
|
+
|
|
119
|
+
| Rule | Effect | Description |
|
|
120
|
+
|------|--------|-------------|
|
|
121
|
+
| Destructive Commands | **DENY** | Blocks `rm -rf`, `mkfs`, `dd`, `shred` |
|
|
122
|
+
| DDL Operations | **DENY** | Blocks `DROP`, `TRUNCATE`, `ALTER` |
|
|
123
|
+
| Privilege Escalation | **ESCALATE** | Flags `sudo`, `chmod`, `chown` for approval |
|
|
124
|
+
| Payment APIs | **ESCALATE** | Flags Stripe, PayPal calls for approval |
|
|
125
|
+
| Deployment Ops | **ESCALATE** | Flags deploy/publish/release for approval |
|
|
126
|
+
|
|
127
|
+
## Environment Variables
|
|
128
|
+
|
|
129
|
+
| Variable | Required | Description |
|
|
130
|
+
|----------|----------|-------------|
|
|
131
|
+
| `SOVR_API_KEY` | No | Connect to SOVR Cloud for expanded tools and persistent audit |
|
|
132
|
+
| `SOVR_PROXY_CONFIG` | No | Path to proxy configuration JSON |
|
|
133
|
+
| `SOVR_RULES_FILE` | No | Path to custom rules JSON file |
|
|
134
|
+
| `SOVR_PROXY_MODE` | No | `strict` / `record-only` / `propose-only` (default: `strict`) |
|
|
135
|
+
| `SOVR_FAIL_MODE` | No | `fail-close` / `fail-local` (default: `fail-close`) |
|
|
136
|
+
| `SOVR_MAX_HOPS` | No | Max proxy hop count before loop detection (default: 3) |
|
|
137
|
+
| `SOVR_TENANT_ID` | No | Tenant identifier for multi-tenant deployments |
|
|
138
|
+
| `SOVR_ACTOR_ID` | No | Actor identifier for audit trail |
|
|
139
|
+
| `SOVR_SESSION_ID` | No | Session identifier for trace correlation |
|
|
140
|
+
| `SOVR_ENDPOINT` | No | Custom Cloud endpoint (advanced) |
|
|
141
|
+
|
|
142
|
+
## Tier Comparison
|
|
143
|
+
|
|
144
|
+
| | Free | Personal | Starter | Pro | Enterprise |
|
|
145
|
+
|---|---|---|---|---|---|
|
|
146
|
+
| **Tools** | 8 | 23 | 48 | 98 | 274 |
|
|
147
|
+
| **Built-in Rules** | 5 | 15+ | 15+ | 15+ | 15+ |
|
|
148
|
+
| **Custom Rules** | 3 | Unlimited | Unlimited | Unlimited | Unlimited |
|
|
149
|
+
| **Proxy Downstream** | 1 server | Unlimited | Unlimited | Unlimited | Unlimited |
|
|
150
|
+
| **Permit/Receipt** | Local only | Cloud | Cloud | Cloud | Cloud |
|
|
151
|
+
| **Audit Trail** | In-memory | Persistent | Persistent | Persistent | Persistent |
|
|
152
|
+
| **Approval Workflow** | — | Basic | Full | Full | Full + SLA |
|
|
153
|
+
|
|
154
|
+
Free tier works offline with zero configuration. Upgrade at [sovr.inc/pricing](https://sovr.inc/pricing).
|
|
155
|
+
|
|
156
|
+
## Related Packages
|
|
157
|
+
|
|
158
|
+
- [`sovr-mcp-server`](https://www.npmjs.com/package/sovr-mcp-server) — MCP Server mode only (no proxy capabilities)
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
[BSL-1.1](./LICENSE) — Code is source-available. Free for non-commercial use. Commercial use requires a license from SOVR AI.
|
|
163
|
+
|
|
164
|
+
After the Change Date (February 18, 2030), this software converts to Apache-2.0.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
**SOVR — Eyes on AI.** [sovr.inc](https://sovr.inc)
|