langprotect-mcp-gateway 1.2.2__tar.gz → 1.2.4__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.2.2 → langprotect_mcp_gateway-1.2.4}/PKG-INFO +28 -1
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/README.md +27 -0
- langprotect_mcp_gateway-1.2.4/langprotect_mcp_gateway/setup_helper.py +182 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway.egg-info/PKG-INFO +28 -1
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway.egg-info/SOURCES.txt +1 -0
- langprotect_mcp_gateway-1.2.4/langprotect_mcp_gateway.egg-info/entry_points.txt +3 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/pyproject.toml +2 -1
- langprotect_mcp_gateway-1.2.2/langprotect_mcp_gateway.egg-info/entry_points.txt +0 -2
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/LICENSE +0 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway/__init__.py +0 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway/gateway.py +0 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway.egg-info/dependency_links.txt +0 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway.egg-info/requires.txt +0 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway.egg-info/top_level.txt +0 -0
- {langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langprotect-mcp-gateway
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
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
|
|
@@ -87,6 +87,33 @@ which langprotect-gateway # Should show: ~/.local/bin/langprotect-gateway
|
|
|
87
87
|
langprotect-gateway --help # Should show usage info
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
#### Automatic Setup (Recommended)
|
|
91
|
+
|
|
92
|
+
Run the setup command to automatically configure VS Code:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
langprotect-gateway-setup
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This will:
|
|
99
|
+
- ✅ Create a global wrapper script
|
|
100
|
+
- ✅ Configure VS Code to use LangProtect in ALL workspaces
|
|
101
|
+
- ✅ Enable auto-start
|
|
102
|
+
|
|
103
|
+
Then edit the wrapper script to add your credentials:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Linux/macOS
|
|
107
|
+
nano ~/.local/bin/langprotect-mcp-wrapper.sh
|
|
108
|
+
|
|
109
|
+
# Update these lines:
|
|
110
|
+
export LANGPROTECT_URL="http://localhost:8000"
|
|
111
|
+
export LANGPROTECT_EMAIL="your.email@company.com"
|
|
112
|
+
export LANGPROTECT_PASSWORD="your-password"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Reload VS Code and you're done! LangProtect will protect all your workspaces.
|
|
116
|
+
|
|
90
117
|
### VS Code Setup (Recommended - No Wrapper Script!)
|
|
91
118
|
|
|
92
119
|
**Step 1:** Add this to your `.vscode/mcp.json`:
|
|
@@ -59,6 +59,33 @@ which langprotect-gateway # Should show: ~/.local/bin/langprotect-gateway
|
|
|
59
59
|
langprotect-gateway --help # Should show usage info
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
#### Automatic Setup (Recommended)
|
|
63
|
+
|
|
64
|
+
Run the setup command to automatically configure VS Code:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
langprotect-gateway-setup
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
This will:
|
|
71
|
+
- ✅ Create a global wrapper script
|
|
72
|
+
- ✅ Configure VS Code to use LangProtect in ALL workspaces
|
|
73
|
+
- ✅ Enable auto-start
|
|
74
|
+
|
|
75
|
+
Then edit the wrapper script to add your credentials:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Linux/macOS
|
|
79
|
+
nano ~/.local/bin/langprotect-mcp-wrapper.sh
|
|
80
|
+
|
|
81
|
+
# Update these lines:
|
|
82
|
+
export LANGPROTECT_URL="http://localhost:8000"
|
|
83
|
+
export LANGPROTECT_EMAIL="your.email@company.com"
|
|
84
|
+
export LANGPROTECT_PASSWORD="your-password"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Reload VS Code and you're done! LangProtect will protect all your workspaces.
|
|
88
|
+
|
|
62
89
|
### VS Code Setup (Recommended - No Wrapper Script!)
|
|
63
90
|
|
|
64
91
|
**Step 1:** Add this to your `.vscode/mcp.json`:
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
LangProtect MCP Gateway Setup Helper
|
|
4
|
+
Automatically configures VS Code for global MCP gateway usage
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import json
|
|
9
|
+
import sys
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_vscode_settings_path():
|
|
14
|
+
"""Get the VS Code user settings path based on OS"""
|
|
15
|
+
home = Path.home()
|
|
16
|
+
|
|
17
|
+
if sys.platform == "darwin": # macOS
|
|
18
|
+
return home / "Library/Application Support/Code/User/settings.json"
|
|
19
|
+
elif sys.platform == "win32": # Windows
|
|
20
|
+
return home / "AppData/Roaming/Code/User/settings.json"
|
|
21
|
+
else: # Linux
|
|
22
|
+
return home / ".config/Code/User/settings.json"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def create_wrapper_script():
|
|
26
|
+
"""Create the global wrapper script"""
|
|
27
|
+
wrapper_dir = Path.home() / ".local/bin"
|
|
28
|
+
wrapper_dir.mkdir(parents=True, exist_ok=True)
|
|
29
|
+
|
|
30
|
+
wrapper_path = wrapper_dir / "langprotect-mcp-wrapper.sh"
|
|
31
|
+
|
|
32
|
+
wrapper_content = """#!/bin/bash
|
|
33
|
+
# LangProtect MCP Gateway Wrapper
|
|
34
|
+
# This wrapper allows global configuration for all VS Code workspaces
|
|
35
|
+
|
|
36
|
+
# Configure these environment variables with your LangProtect credentials
|
|
37
|
+
export LANGPROTECT_URL="${LANGPROTECT_URL:-http://localhost:8000}"
|
|
38
|
+
export LANGPROTECT_EMAIL="${LANGPROTECT_EMAIL:-your.email@company.com}"
|
|
39
|
+
export LANGPROTECT_PASSWORD="${LANGPROTECT_PASSWORD:-your-password}"
|
|
40
|
+
export MCP_SERVER_COMMAND="${MCP_SERVER_COMMAND:-npx}"
|
|
41
|
+
export MCP_SERVER_ARGS="${MCP_SERVER_ARGS:--y,@modelcontextprotocol/server-filesystem,.}"
|
|
42
|
+
|
|
43
|
+
exec langprotect-gateway "$@"
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
wrapper_path.write_text(wrapper_content)
|
|
47
|
+
wrapper_path.chmod(0o755)
|
|
48
|
+
|
|
49
|
+
return wrapper_path
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def update_vscode_settings(wrapper_path):
|
|
53
|
+
"""Update VS Code settings to use the wrapper"""
|
|
54
|
+
settings_path = get_vscode_settings_path()
|
|
55
|
+
|
|
56
|
+
# Create directory if it doesn't exist
|
|
57
|
+
settings_path.parent.mkdir(parents=True, exist_ok=True)
|
|
58
|
+
|
|
59
|
+
# Read existing settings or create new
|
|
60
|
+
if settings_path.exists():
|
|
61
|
+
with open(settings_path, 'r') as f:
|
|
62
|
+
try:
|
|
63
|
+
settings = json.load(f)
|
|
64
|
+
except json.JSONDecodeError:
|
|
65
|
+
settings = {}
|
|
66
|
+
else:
|
|
67
|
+
settings = {}
|
|
68
|
+
|
|
69
|
+
# Add MCP configuration
|
|
70
|
+
if "chat.mcp.servers" not in settings:
|
|
71
|
+
settings["chat.mcp.servers"] = {}
|
|
72
|
+
|
|
73
|
+
settings["chat.mcp.servers"]["langprotect-gateway"] = {
|
|
74
|
+
"type": "stdio",
|
|
75
|
+
"command": str(wrapper_path),
|
|
76
|
+
"args": []
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# Enable auto-start
|
|
80
|
+
settings["chat.mcp.autostart"] = "newAndOutdated"
|
|
81
|
+
|
|
82
|
+
# Write back
|
|
83
|
+
with open(settings_path, 'w') as f:
|
|
84
|
+
json.dump(settings, f, indent=2)
|
|
85
|
+
|
|
86
|
+
return settings_path
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def get_claude_config_path():
|
|
90
|
+
"""Get the Claude Desktop config path based on OS"""
|
|
91
|
+
home = Path.home()
|
|
92
|
+
if sys.platform == "darwin":
|
|
93
|
+
return home / "Library/Application Support/Claude/claude_desktop_config.json"
|
|
94
|
+
elif sys.platform == "win32":
|
|
95
|
+
return home / "AppData/Roaming/Claude/claude_desktop_config.json"
|
|
96
|
+
else:
|
|
97
|
+
return home / ".config/Claude/claude_desktop_config.json"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def update_claude_config(wrapper_path):
|
|
101
|
+
"""Update Claude Desktop config to use the wrapper"""
|
|
102
|
+
config_path = get_claude_config_path()
|
|
103
|
+
config_path.parent.mkdir(parents=True, exist_ok=True)
|
|
104
|
+
|
|
105
|
+
if config_path.exists():
|
|
106
|
+
with open(config_path, 'r') as f:
|
|
107
|
+
try:
|
|
108
|
+
config = json.load(f)
|
|
109
|
+
except json.JSONDecodeError:
|
|
110
|
+
config = {}
|
|
111
|
+
else:
|
|
112
|
+
config = {}
|
|
113
|
+
|
|
114
|
+
if "mcpServers" not in config:
|
|
115
|
+
config["mcpServers"] = {}
|
|
116
|
+
|
|
117
|
+
config["mcpServers"]["langprotect-gateway"] = {
|
|
118
|
+
"command": str(wrapper_path),
|
|
119
|
+
"args": []
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
with open(config_path, 'w') as f:
|
|
123
|
+
json.dump(config, f, indent=2)
|
|
124
|
+
|
|
125
|
+
return config_path
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def setup():
|
|
129
|
+
"""Main setup function"""
|
|
130
|
+
print("🚀 Setting up LangProtect MCP Gateway...")
|
|
131
|
+
print()
|
|
132
|
+
|
|
133
|
+
# Create wrapper script
|
|
134
|
+
print("📝 Creating global wrapper script...")
|
|
135
|
+
wrapper_path = create_wrapper_script()
|
|
136
|
+
print(f" ✅ Created: {wrapper_path}")
|
|
137
|
+
print()
|
|
138
|
+
|
|
139
|
+
# Update VS Code settings
|
|
140
|
+
print("⚙️ Configuring VS Code...")
|
|
141
|
+
try:
|
|
142
|
+
settings_path = update_vscode_settings(wrapper_path)
|
|
143
|
+
print(f" ✅ Updated: {settings_path}")
|
|
144
|
+
except Exception as e:
|
|
145
|
+
print(f" ⚠️ Could not update VS Code settings: {e}")
|
|
146
|
+
|
|
147
|
+
# Update Claude Desktop config
|
|
148
|
+
print("🍏 Configuring Claude Desktop (for high compatibility)...")
|
|
149
|
+
try:
|
|
150
|
+
claude_path = update_claude_config(wrapper_path)
|
|
151
|
+
print(f" ✅ Updated: {claude_path}")
|
|
152
|
+
except Exception as e:
|
|
153
|
+
print(f" ⚠️ Could not update Claude Desktop config: {e}")
|
|
154
|
+
print()
|
|
155
|
+
|
|
156
|
+
# Print next steps
|
|
157
|
+
print("✅ Setup complete!")
|
|
158
|
+
print()
|
|
159
|
+
print("📋 Next steps:")
|
|
160
|
+
print()
|
|
161
|
+
print("1. Configure your credentials:")
|
|
162
|
+
print(f" Edit: {wrapper_path}")
|
|
163
|
+
print(" Set LANGPROTECT_URL, LANGPROTECT_EMAIL, and LANGPROTECT_PASSWORD")
|
|
164
|
+
print()
|
|
165
|
+
print("2. Reload VS Code:")
|
|
166
|
+
print(" Press Ctrl+Shift+P → 'Developer: Reload Window'")
|
|
167
|
+
print()
|
|
168
|
+
print("3. Verify it's working:")
|
|
169
|
+
print(" Press Ctrl+Shift+P → 'MCP: List Servers'")
|
|
170
|
+
print(" You should see 'langprotect-gateway' listed")
|
|
171
|
+
print()
|
|
172
|
+
print("🎉 LangProtect will now protect ALL your VS Code workspaces!")
|
|
173
|
+
print()
|
|
174
|
+
print("💡 Tip: You can also set credentials via environment variables:")
|
|
175
|
+
print(" export LANGPROTECT_URL=http://localhost:8000")
|
|
176
|
+
print(" export LANGPROTECT_EMAIL=your.email@company.com")
|
|
177
|
+
print(" export LANGPROTECT_PASSWORD=your-password")
|
|
178
|
+
print()
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
if __name__ == "__main__":
|
|
182
|
+
setup()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langprotect-mcp-gateway
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
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
|
|
@@ -87,6 +87,33 @@ which langprotect-gateway # Should show: ~/.local/bin/langprotect-gateway
|
|
|
87
87
|
langprotect-gateway --help # Should show usage info
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
#### Automatic Setup (Recommended)
|
|
91
|
+
|
|
92
|
+
Run the setup command to automatically configure VS Code:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
langprotect-gateway-setup
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This will:
|
|
99
|
+
- ✅ Create a global wrapper script
|
|
100
|
+
- ✅ Configure VS Code to use LangProtect in ALL workspaces
|
|
101
|
+
- ✅ Enable auto-start
|
|
102
|
+
|
|
103
|
+
Then edit the wrapper script to add your credentials:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Linux/macOS
|
|
107
|
+
nano ~/.local/bin/langprotect-mcp-wrapper.sh
|
|
108
|
+
|
|
109
|
+
# Update these lines:
|
|
110
|
+
export LANGPROTECT_URL="http://localhost:8000"
|
|
111
|
+
export LANGPROTECT_EMAIL="your.email@company.com"
|
|
112
|
+
export LANGPROTECT_PASSWORD="your-password"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Reload VS Code and you're done! LangProtect will protect all your workspaces.
|
|
116
|
+
|
|
90
117
|
### VS Code Setup (Recommended - No Wrapper Script!)
|
|
91
118
|
|
|
92
119
|
**Step 1:** Add this to your `.vscode/mcp.json`:
|
|
@@ -3,6 +3,7 @@ README.md
|
|
|
3
3
|
pyproject.toml
|
|
4
4
|
langprotect_mcp_gateway/__init__.py
|
|
5
5
|
langprotect_mcp_gateway/gateway.py
|
|
6
|
+
langprotect_mcp_gateway/setup_helper.py
|
|
6
7
|
langprotect_mcp_gateway.egg-info/PKG-INFO
|
|
7
8
|
langprotect_mcp_gateway.egg-info/SOURCES.txt
|
|
8
9
|
langprotect_mcp_gateway.egg-info/dependency_links.txt
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "langprotect-mcp-gateway"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.4"
|
|
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"
|
|
@@ -42,6 +42,7 @@ Issues = "https://github.com/langprotect/mcp-gateway/issues"
|
|
|
42
42
|
|
|
43
43
|
[project.scripts]
|
|
44
44
|
langprotect-gateway = "langprotect_mcp_gateway:main"
|
|
45
|
+
langprotect-gateway-setup = "langprotect_mcp_gateway.setup_helper:setup"
|
|
45
46
|
|
|
46
47
|
[tool.setuptools]
|
|
47
48
|
packages = ["langprotect_mcp_gateway"]
|
|
File without changes
|
{langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway/__init__.py
RENAMED
|
File without changes
|
{langprotect_mcp_gateway-1.2.2 → langprotect_mcp_gateway-1.2.4}/langprotect_mcp_gateway/gateway.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|