langprotect-mcp-gateway 1.3.1__tar.gz → 1.3.3__tar.gz
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.
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/PKG-INFO +40 -13
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/README.md +39 -12
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/gateway.py +13 -1
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/setup_helper.py +1 -1
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/PKG-INFO +40 -13
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/pyproject.toml +1 -1
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/LICENSE +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/__init__.py +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/response_masker.py +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/SOURCES.txt +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/dependency_links.txt +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/entry_points.txt +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/requires.txt +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway.egg-info/top_level.txt +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/setup.cfg +0 -0
- {langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/tests/test_response_masker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langprotect-mcp-gateway
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.3
|
|
4
4
|
Summary: Security gateway for Model Context Protocol (MCP) to protect AI tool interactions
|
|
5
5
|
Author-email: LangProtect Security Team <security@langprotect.com>
|
|
6
6
|
License: MIT
|
|
@@ -96,26 +96,53 @@ Run our automated setup command to configure VS Code, Cursor, or Claude Desktop
|
|
|
96
96
|
langprotect-gateway-setup
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
- ✅
|
|
102
|
-
-
|
|
99
|
+
**What happens:**
|
|
100
|
+
- 🔐 **Prompts for credentials** interactively (password hidden)
|
|
101
|
+
- ✅ **Validates credentials** in real-time against your backend
|
|
102
|
+
- 🔄 **Retries on failure** with helpful error messages
|
|
103
|
+
- 📝 **Creates wrapper script** at `~/.local/bin/langprotect-mcp-wrapper.sh`
|
|
104
|
+
- ⚙️ **Configures VS Code** for global visibility in ALL workspaces
|
|
105
|
+
- 🚀 **Auto-start enabled** for seamless protection
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
**Example:**
|
|
108
|
+
```bash
|
|
109
|
+
$ langprotect-gateway-setup
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
🚀 Setting up LangProtect MCP Gateway...
|
|
107
112
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
═══════════════════════════════════════════════════════════════
|
|
114
|
+
🔐 Enter Your LangProtect Credentials
|
|
115
|
+
═══════════════════════════════════════════════════════════════
|
|
116
|
+
|
|
117
|
+
Backend URL [http://localhost:8000]: http://localhost:8000
|
|
118
|
+
Email: your.email@company.com
|
|
119
|
+
Password: ●●●●●●●●●●
|
|
120
|
+
|
|
121
|
+
Validating credentials...
|
|
122
|
+
✓ Credentials validated successfully!
|
|
111
123
|
|
|
112
|
-
|
|
113
|
-
|
|
124
|
+
📝 Creating global wrapper script...
|
|
125
|
+
✅ Created: ~/.local/bin/langprotect-mcp-wrapper.sh
|
|
126
|
+
|
|
127
|
+
⚙️ Configuring VS Code...
|
|
128
|
+
✅ Updated: ~/.config/Code/User/settings.json
|
|
129
|
+
|
|
130
|
+
✅ Setup complete!
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Alternative: Pre-set credentials via environment variables**
|
|
134
|
+
```bash
|
|
135
|
+
export LANGPROTECT_URL="http://localhost:8000"
|
|
114
136
|
export LANGPROTECT_EMAIL="your.email@company.com"
|
|
115
137
|
export LANGPROTECT_PASSWORD="your-password"
|
|
138
|
+
langprotect-gateway-setup
|
|
116
139
|
```
|
|
117
140
|
|
|
118
|
-
Reload VS Code
|
|
141
|
+
### 3. Reload VS Code
|
|
142
|
+
|
|
143
|
+
Press `Ctrl+Shift+P` → `Developer: Reload Window`
|
|
144
|
+
|
|
145
|
+
**That's it!** ✅ LangProtect will now protect all your workspaces.
|
|
119
146
|
|
|
120
147
|
---
|
|
121
148
|
|
|
@@ -68,26 +68,53 @@ Run our automated setup command to configure VS Code, Cursor, or Claude Desktop
|
|
|
68
68
|
langprotect-gateway-setup
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
- ✅
|
|
74
|
-
-
|
|
71
|
+
**What happens:**
|
|
72
|
+
- 🔐 **Prompts for credentials** interactively (password hidden)
|
|
73
|
+
- ✅ **Validates credentials** in real-time against your backend
|
|
74
|
+
- 🔄 **Retries on failure** with helpful error messages
|
|
75
|
+
- 📝 **Creates wrapper script** at `~/.local/bin/langprotect-mcp-wrapper.sh`
|
|
76
|
+
- ⚙️ **Configures VS Code** for global visibility in ALL workspaces
|
|
77
|
+
- 🚀 **Auto-start enabled** for seamless protection
|
|
78
|
+
|
|
79
|
+
**Example:**
|
|
80
|
+
```bash
|
|
81
|
+
$ langprotect-gateway-setup
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
🚀 Setting up LangProtect MCP Gateway...
|
|
77
84
|
|
|
78
|
-
|
|
85
|
+
═══════════════════════════════════════════════════════════════
|
|
86
|
+
🔐 Enter Your LangProtect Credentials
|
|
87
|
+
═══════════════════════════════════════════════════════════════
|
|
79
88
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
Backend URL [http://localhost:8000]: http://localhost:8000
|
|
90
|
+
Email: your.email@company.com
|
|
91
|
+
Password: ●●●●●●●●●●
|
|
92
|
+
|
|
93
|
+
Validating credentials...
|
|
94
|
+
✓ Credentials validated successfully!
|
|
95
|
+
|
|
96
|
+
📝 Creating global wrapper script...
|
|
97
|
+
✅ Created: ~/.local/bin/langprotect-mcp-wrapper.sh
|
|
98
|
+
|
|
99
|
+
⚙️ Configuring VS Code...
|
|
100
|
+
✅ Updated: ~/.config/Code/User/settings.json
|
|
101
|
+
|
|
102
|
+
✅ Setup complete!
|
|
103
|
+
```
|
|
83
104
|
|
|
84
|
-
|
|
85
|
-
|
|
105
|
+
**Alternative: Pre-set credentials via environment variables**
|
|
106
|
+
```bash
|
|
107
|
+
export LANGPROTECT_URL="http://localhost:8000"
|
|
86
108
|
export LANGPROTECT_EMAIL="your.email@company.com"
|
|
87
109
|
export LANGPROTECT_PASSWORD="your-password"
|
|
110
|
+
langprotect-gateway-setup
|
|
88
111
|
```
|
|
89
112
|
|
|
90
|
-
Reload VS Code
|
|
113
|
+
### 3. Reload VS Code
|
|
114
|
+
|
|
115
|
+
Press `Ctrl+Shift+P` → `Developer: Reload Window`
|
|
116
|
+
|
|
117
|
+
**That's it!** ✅ LangProtect will now protect all your workspaces.
|
|
91
118
|
|
|
92
119
|
---
|
|
93
120
|
|
{langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/gateway.py
RENAMED
|
@@ -546,7 +546,7 @@ class LangProtectGateway:
|
|
|
546
546
|
output_text = self._extract_text_from_result(result_content)
|
|
547
547
|
|
|
548
548
|
if output_text:
|
|
549
|
-
logger.debug(f"
|
|
549
|
+
logger.debug(f"🔍 Scanning output: {len(output_text)} chars")
|
|
550
550
|
output_scan = self.auth.scan_output(
|
|
551
551
|
tool_name=tool_name,
|
|
552
552
|
output_content=output_text,
|
|
@@ -554,6 +554,18 @@ class LangProtectGateway:
|
|
|
554
554
|
metadata={'server_name': server_name}
|
|
555
555
|
)
|
|
556
556
|
|
|
557
|
+
# 🚨 CRITICAL: Check if backend blocked the request
|
|
558
|
+
if output_scan.get('status') == 'blocked' or output_scan.get('action') == 'blocked':
|
|
559
|
+
risk_score = output_scan.get('risk_score', 0)
|
|
560
|
+
severity = output_scan.get('severity', 'high')
|
|
561
|
+
logger.error(f"🚫 OUTPUT BLOCKED: {tool_name} (risk={risk_score}, severity={severity})")
|
|
562
|
+
raise ValueError(
|
|
563
|
+
f"Request blocked by security policy: {tool_name}\n"
|
|
564
|
+
f"Risk Score: {risk_score}\n"
|
|
565
|
+
f"Severity: {severity}\n"
|
|
566
|
+
f"This request was blocked because it would return sensitive data."
|
|
567
|
+
)
|
|
568
|
+
|
|
557
569
|
if output_scan.get('masked'):
|
|
558
570
|
# Replace output with masked version
|
|
559
571
|
masked_text = output_scan.get('output', output_text)
|
|
@@ -33,7 +33,7 @@ def validate_credentials(url, email, password):
|
|
|
33
33
|
# Prepare the request
|
|
34
34
|
data = json.dumps({"email": email, "password": password}).encode('utf-8')
|
|
35
35
|
req = urllib.request.Request(
|
|
36
|
-
f"{url}/
|
|
36
|
+
f"{url}/v1/group-users/signin",
|
|
37
37
|
data=data,
|
|
38
38
|
headers={'Content-Type': 'application/json'}
|
|
39
39
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langprotect-mcp-gateway
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.3
|
|
4
4
|
Summary: Security gateway for Model Context Protocol (MCP) to protect AI tool interactions
|
|
5
5
|
Author-email: LangProtect Security Team <security@langprotect.com>
|
|
6
6
|
License: MIT
|
|
@@ -96,26 +96,53 @@ Run our automated setup command to configure VS Code, Cursor, or Claude Desktop
|
|
|
96
96
|
langprotect-gateway-setup
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
- ✅
|
|
102
|
-
-
|
|
99
|
+
**What happens:**
|
|
100
|
+
- 🔐 **Prompts for credentials** interactively (password hidden)
|
|
101
|
+
- ✅ **Validates credentials** in real-time against your backend
|
|
102
|
+
- 🔄 **Retries on failure** with helpful error messages
|
|
103
|
+
- 📝 **Creates wrapper script** at `~/.local/bin/langprotect-mcp-wrapper.sh`
|
|
104
|
+
- ⚙️ **Configures VS Code** for global visibility in ALL workspaces
|
|
105
|
+
- 🚀 **Auto-start enabled** for seamless protection
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
**Example:**
|
|
108
|
+
```bash
|
|
109
|
+
$ langprotect-gateway-setup
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
🚀 Setting up LangProtect MCP Gateway...
|
|
107
112
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
═══════════════════════════════════════════════════════════════
|
|
114
|
+
🔐 Enter Your LangProtect Credentials
|
|
115
|
+
═══════════════════════════════════════════════════════════════
|
|
116
|
+
|
|
117
|
+
Backend URL [http://localhost:8000]: http://localhost:8000
|
|
118
|
+
Email: your.email@company.com
|
|
119
|
+
Password: ●●●●●●●●●●
|
|
120
|
+
|
|
121
|
+
Validating credentials...
|
|
122
|
+
✓ Credentials validated successfully!
|
|
111
123
|
|
|
112
|
-
|
|
113
|
-
|
|
124
|
+
📝 Creating global wrapper script...
|
|
125
|
+
✅ Created: ~/.local/bin/langprotect-mcp-wrapper.sh
|
|
126
|
+
|
|
127
|
+
⚙️ Configuring VS Code...
|
|
128
|
+
✅ Updated: ~/.config/Code/User/settings.json
|
|
129
|
+
|
|
130
|
+
✅ Setup complete!
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Alternative: Pre-set credentials via environment variables**
|
|
134
|
+
```bash
|
|
135
|
+
export LANGPROTECT_URL="http://localhost:8000"
|
|
114
136
|
export LANGPROTECT_EMAIL="your.email@company.com"
|
|
115
137
|
export LANGPROTECT_PASSWORD="your-password"
|
|
138
|
+
langprotect-gateway-setup
|
|
116
139
|
```
|
|
117
140
|
|
|
118
|
-
Reload VS Code
|
|
141
|
+
### 3. Reload VS Code
|
|
142
|
+
|
|
143
|
+
Press `Ctrl+Shift+P` → `Developer: Reload Window`
|
|
144
|
+
|
|
145
|
+
**That's it!** ✅ LangProtect will now protect all your workspaces.
|
|
119
146
|
|
|
120
147
|
---
|
|
121
148
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "langprotect-mcp-gateway"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.3"
|
|
8
8
|
description = "Security gateway for Model Context Protocol (MCP) to protect AI tool interactions"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
File without changes
|
{langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/langprotect_mcp_gateway/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langprotect_mcp_gateway-1.3.1 → langprotect_mcp_gateway-1.3.3}/tests/test_response_masker.py
RENAMED
|
File without changes
|