langprotect-mcp-gateway 1.2.1__tar.gz → 1.2.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.
Files changed (15) hide show
  1. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/PKG-INFO +47 -9
  2. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/README.md +44 -6
  3. langprotect_mcp_gateway-1.2.3/langprotect_mcp_gateway/setup_helper.py +137 -0
  4. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/langprotect_mcp_gateway.egg-info/PKG-INFO +47 -9
  5. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/langprotect_mcp_gateway.egg-info/SOURCES.txt +1 -0
  6. langprotect_mcp_gateway-1.2.3/langprotect_mcp_gateway.egg-info/entry_points.txt +3 -0
  7. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/pyproject.toml +4 -3
  8. langprotect_mcp_gateway-1.2.1/langprotect_mcp_gateway.egg-info/entry_points.txt +0 -2
  9. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/LICENSE +0 -0
  10. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/langprotect_mcp_gateway/__init__.py +0 -0
  11. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/langprotect_mcp_gateway/gateway.py +0 -0
  12. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/langprotect_mcp_gateway.egg-info/dependency_links.txt +0 -0
  13. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/langprotect_mcp_gateway.egg-info/requires.txt +0 -0
  14. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/langprotect_mcp_gateway.egg-info/top_level.txt +0 -0
  15. {langprotect_mcp_gateway-1.2.1 → langprotect_mcp_gateway-1.2.3}/setup.cfg +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langprotect-mcp-gateway
3
- Version: 1.2.1
3
+ Version: 1.2.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
7
- Project-URL: Homepage, https://langprotect.com
8
- Project-URL: Documentation, https://docs.langprotect.com
7
+ Project-URL: Homepage, https://www.langprotect.com/
8
+ Project-URL: Documentation, https://www.langprotect.com/docs
9
9
  Project-URL: Repository, https://github.com/langprotect/mcp-gateway
10
10
  Project-URL: Issues, https://github.com/langprotect/mcp-gateway/issues
11
11
  Keywords: mcp,security,ai-security,langprotect,model-context-protocol
@@ -87,14 +87,42 @@ 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
- Just add this to your `.vscode/mcp.json`:
119
+ **Step 1:** Add this to your `.vscode/mcp.json`:
93
120
 
94
121
  ```json
95
122
  {
96
- "mcpServers": {
123
+ "servers": {
97
124
  "langprotect-gateway": {
125
+ "type": "stdio",
98
126
  "command": "langprotect-gateway",
99
127
  "args": ["--mcp-json-path", "${workspaceFolder}/.vscode/mcp.json"],
100
128
  "env": {
@@ -113,8 +141,18 @@ Just add this to your `.vscode/mcp.json`:
113
141
  }
114
142
  ```
115
143
 
144
+ **Step 2 (Optional):** Enable auto-start in `.vscode/settings.json`:
145
+
146
+ ```json
147
+ {
148
+ "chat.mcp.autostart": "newAndOutdated"
149
+ }
150
+ ```
151
+
152
+ This makes VS Code automatically start the gateway when you open the workspace!
153
+
116
154
  That's it! VS Code will:
117
- 1. Start the gateway with your credentials
155
+ 1. Start the gateway with your credentials (automatically if autostart is enabled)
118
156
  2. Gateway reads the `servers` section and proxies those MCP servers
119
157
  3. All tool calls get logged to LangProtect
120
158
 
@@ -318,7 +356,7 @@ pipx install langprotect-mcp-gateway==1.1.0 --force
318
356
 
319
357
  ## Support
320
358
 
321
- - **Documentation:** https://docs.langprotect.com
359
+ - **Documentation:** https://www.langprotect.com/docs
322
360
  - **Issues:** https://github.com/langprotect/mcp-gateway/issues
323
361
  - **Security:** security@langprotect.com
324
362
 
@@ -328,6 +366,6 @@ MIT License - see LICENSE file for details
328
366
 
329
367
  ## Links
330
368
 
331
- - **Homepage:** https://langprotect.com
369
+ - **Homepage:** https://www.langprotect.com/
332
370
  - **GitHub:** https://github.com/langprotect/mcp-gateway
333
- - **Documentation:** https://docs.langprotect.com
371
+ - **Documentation:** https://www.langprotect.com/docs
@@ -59,14 +59,42 @@ 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
- Just add this to your `.vscode/mcp.json`:
91
+ **Step 1:** Add this to your `.vscode/mcp.json`:
65
92
 
66
93
  ```json
67
94
  {
68
- "mcpServers": {
95
+ "servers": {
69
96
  "langprotect-gateway": {
97
+ "type": "stdio",
70
98
  "command": "langprotect-gateway",
71
99
  "args": ["--mcp-json-path", "${workspaceFolder}/.vscode/mcp.json"],
72
100
  "env": {
@@ -85,8 +113,18 @@ Just add this to your `.vscode/mcp.json`:
85
113
  }
86
114
  ```
87
115
 
116
+ **Step 2 (Optional):** Enable auto-start in `.vscode/settings.json`:
117
+
118
+ ```json
119
+ {
120
+ "chat.mcp.autostart": "newAndOutdated"
121
+ }
122
+ ```
123
+
124
+ This makes VS Code automatically start the gateway when you open the workspace!
125
+
88
126
  That's it! VS Code will:
89
- 1. Start the gateway with your credentials
127
+ 1. Start the gateway with your credentials (automatically if autostart is enabled)
90
128
  2. Gateway reads the `servers` section and proxies those MCP servers
91
129
  3. All tool calls get logged to LangProtect
92
130
 
@@ -290,7 +328,7 @@ pipx install langprotect-mcp-gateway==1.1.0 --force
290
328
 
291
329
  ## Support
292
330
 
293
- - **Documentation:** https://docs.langprotect.com
331
+ - **Documentation:** https://www.langprotect.com/docs
294
332
  - **Issues:** https://github.com/langprotect/mcp-gateway/issues
295
333
  - **Security:** security@langprotect.com
296
334
 
@@ -300,6 +338,6 @@ MIT License - see LICENSE file for details
300
338
 
301
339
  ## Links
302
340
 
303
- - **Homepage:** https://langprotect.com
341
+ - **Homepage:** https://www.langprotect.com/
304
342
  - **GitHub:** https://github.com/langprotect/mcp-gateway
305
- - **Documentation:** https://docs.langprotect.com
343
+ - **Documentation:** https://www.langprotect.com/docs
@@ -0,0 +1,137 @@
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 setup():
90
+ """Main setup function"""
91
+ print("🚀 Setting up LangProtect MCP Gateway...")
92
+ print()
93
+
94
+ # Create wrapper script
95
+ print("📝 Creating global wrapper script...")
96
+ wrapper_path = create_wrapper_script()
97
+ print(f" ✅ Created: {wrapper_path}")
98
+ print()
99
+
100
+ # Update VS Code settings
101
+ print("⚙️ Configuring VS Code...")
102
+ try:
103
+ settings_path = update_vscode_settings(wrapper_path)
104
+ print(f" ✅ Updated: {settings_path}")
105
+ print()
106
+ except Exception as e:
107
+ print(f" ⚠️ Could not update VS Code settings: {e}")
108
+ print(f" You can manually add the configuration later.")
109
+ print()
110
+
111
+ # Print next steps
112
+ print("✅ Setup complete!")
113
+ print()
114
+ print("📋 Next steps:")
115
+ print()
116
+ print("1. Configure your credentials:")
117
+ print(f" Edit: {wrapper_path}")
118
+ print(" Set LANGPROTECT_URL, LANGPROTECT_EMAIL, and LANGPROTECT_PASSWORD")
119
+ print()
120
+ print("2. Reload VS Code:")
121
+ print(" Press Ctrl+Shift+P → 'Developer: Reload Window'")
122
+ print()
123
+ print("3. Verify it's working:")
124
+ print(" Press Ctrl+Shift+P → 'MCP: List Servers'")
125
+ print(" You should see 'langprotect-gateway' listed")
126
+ print()
127
+ print("🎉 LangProtect will now protect ALL your VS Code workspaces!")
128
+ print()
129
+ print("💡 Tip: You can also set credentials via environment variables:")
130
+ print(" export LANGPROTECT_URL=http://localhost:8000")
131
+ print(" export LANGPROTECT_EMAIL=your.email@company.com")
132
+ print(" export LANGPROTECT_PASSWORD=your-password")
133
+ print()
134
+
135
+
136
+ if __name__ == "__main__":
137
+ setup()
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langprotect-mcp-gateway
3
- Version: 1.2.1
3
+ Version: 1.2.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
7
- Project-URL: Homepage, https://langprotect.com
8
- Project-URL: Documentation, https://docs.langprotect.com
7
+ Project-URL: Homepage, https://www.langprotect.com/
8
+ Project-URL: Documentation, https://www.langprotect.com/docs
9
9
  Project-URL: Repository, https://github.com/langprotect/mcp-gateway
10
10
  Project-URL: Issues, https://github.com/langprotect/mcp-gateway/issues
11
11
  Keywords: mcp,security,ai-security,langprotect,model-context-protocol
@@ -87,14 +87,42 @@ 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
- Just add this to your `.vscode/mcp.json`:
119
+ **Step 1:** Add this to your `.vscode/mcp.json`:
93
120
 
94
121
  ```json
95
122
  {
96
- "mcpServers": {
123
+ "servers": {
97
124
  "langprotect-gateway": {
125
+ "type": "stdio",
98
126
  "command": "langprotect-gateway",
99
127
  "args": ["--mcp-json-path", "${workspaceFolder}/.vscode/mcp.json"],
100
128
  "env": {
@@ -113,8 +141,18 @@ Just add this to your `.vscode/mcp.json`:
113
141
  }
114
142
  ```
115
143
 
144
+ **Step 2 (Optional):** Enable auto-start in `.vscode/settings.json`:
145
+
146
+ ```json
147
+ {
148
+ "chat.mcp.autostart": "newAndOutdated"
149
+ }
150
+ ```
151
+
152
+ This makes VS Code automatically start the gateway when you open the workspace!
153
+
116
154
  That's it! VS Code will:
117
- 1. Start the gateway with your credentials
155
+ 1. Start the gateway with your credentials (automatically if autostart is enabled)
118
156
  2. Gateway reads the `servers` section and proxies those MCP servers
119
157
  3. All tool calls get logged to LangProtect
120
158
 
@@ -318,7 +356,7 @@ pipx install langprotect-mcp-gateway==1.1.0 --force
318
356
 
319
357
  ## Support
320
358
 
321
- - **Documentation:** https://docs.langprotect.com
359
+ - **Documentation:** https://www.langprotect.com/docs
322
360
  - **Issues:** https://github.com/langprotect/mcp-gateway/issues
323
361
  - **Security:** security@langprotect.com
324
362
 
@@ -328,6 +366,6 @@ MIT License - see LICENSE file for details
328
366
 
329
367
  ## Links
330
368
 
331
- - **Homepage:** https://langprotect.com
369
+ - **Homepage:** https://www.langprotect.com/
332
370
  - **GitHub:** https://github.com/langprotect/mcp-gateway
333
- - **Documentation:** https://docs.langprotect.com
371
+ - **Documentation:** https://www.langprotect.com/docs
@@ -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
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ langprotect-gateway = langprotect_mcp_gateway:main
3
+ langprotect-gateway-setup = langprotect_mcp_gateway.setup_helper:setup
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "langprotect-mcp-gateway"
7
- version = "1.2.1"
7
+ version = "1.2.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"
@@ -35,13 +35,14 @@ dev = [
35
35
  ]
36
36
 
37
37
  [project.urls]
38
- Homepage = "https://langprotect.com"
39
- Documentation = "https://docs.langprotect.com"
38
+ Homepage = "https://www.langprotect.com/"
39
+ Documentation = "https://www.langprotect.com/docs"
40
40
  Repository = "https://github.com/langprotect/mcp-gateway"
41
41
  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"]
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- langprotect-gateway = langprotect_mcp_gateway:main