cli-mcp-server 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl
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.
- cli_mcp_server/server.py +3 -2
- {cli_mcp_server-0.2.4.dist-info → cli_mcp_server-0.2.5.dist-info}/METADATA +2 -2
- cli_mcp_server-0.2.5.dist-info/RECORD +7 -0
- cli_mcp_server-0.2.4.dist-info/RECORD +0 -7
- {cli_mcp_server-0.2.4.dist-info → cli_mcp_server-0.2.5.dist-info}/WHEEL +0 -0
- {cli_mcp_server-0.2.4.dist-info → cli_mcp_server-0.2.5.dist-info}/entry_points.txt +0 -0
- {cli_mcp_server-0.2.4.dist-info → cli_mcp_server-0.2.5.dist-info}/licenses/LICENSE +0 -0
cli_mcp_server/server.py
CHANGED
@@ -202,6 +202,8 @@ class CommandExecutor:
|
|
202
202
|
# Process and validate arguments
|
203
203
|
validated_args = []
|
204
204
|
for arg in args:
|
205
|
+
is_explicit_path = (arg.startswith(("./", "../", "/")) and not arg.startswith("//")) or arg == "."
|
206
|
+
|
205
207
|
if arg.startswith("-"):
|
206
208
|
if (
|
207
209
|
not self.security_config.allow_all_flags
|
@@ -210,9 +212,8 @@ class CommandExecutor:
|
|
210
212
|
raise CommandSecurityError(f"Flag '{arg}' is not allowed")
|
211
213
|
validated_args.append(arg)
|
212
214
|
continue
|
213
|
-
|
214
215
|
# For any path-like argument, validate it
|
215
|
-
if
|
216
|
+
if is_explicit_path or ("/" in arg and os.path.exists(os.path.join(self.allowed_dir, arg))):
|
216
217
|
if self._is_url_path(arg):
|
217
218
|
# If it's a URL, we don't need to normalize it
|
218
219
|
validated_args.append(arg)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cli-mcp-server
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.5
|
4
4
|
Summary: Command line interface for MCP clients with secure execution and customizable security policies
|
5
5
|
Project-URL: Homepage, https://github.com/MladenSU/cli-mcp-server
|
6
6
|
Project-URL: Documentation, https://github.com/MladenSU/cli-mcp-server#readme
|
@@ -9,7 +9,7 @@ Project-URL: Bug Tracker, https://github.com/MladenSU/cli-mcp-server/issues
|
|
9
9
|
Author-email: Mladen <fangs-lever6n@icloud.com>
|
10
10
|
License-File: LICENSE
|
11
11
|
Requires-Python: >=3.10
|
12
|
-
Requires-Dist: mcp>=1.
|
12
|
+
Requires-Dist: mcp>=1.10.1
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
|
15
15
|
# CLI MCP Server
|
@@ -0,0 +1,7 @@
|
|
1
|
+
cli_mcp_server/__init__.py,sha256=bGLiX7XuhVsS-PJdoRIWXiilZ3NTAQ7fb9_8kkNzLlM,216
|
2
|
+
cli_mcp_server/server.py,sha256=Szl_HtnL0HjihMjJSMJdYk6d24R114gD-IIOtjI5UpY,21446
|
3
|
+
cli_mcp_server-0.2.5.dist-info/METADATA,sha256=JQvadoOI3-ysFnt8o5ULC8nHqgKSrgr--LXiHjOG9Pw,7861
|
4
|
+
cli_mcp_server-0.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
+
cli_mcp_server-0.2.5.dist-info/entry_points.txt,sha256=07bDmJJSXg-6VCFEFTOlsGoxI-0faJafT1yEEjUdN-U,55
|
6
|
+
cli_mcp_server-0.2.5.dist-info/licenses/LICENSE,sha256=85rOR_IMpb2VzXBA4VCRZh_KWlaO1Rly8HDYDwGgMWk,1062
|
7
|
+
cli_mcp_server-0.2.5.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
cli_mcp_server/__init__.py,sha256=bGLiX7XuhVsS-PJdoRIWXiilZ3NTAQ7fb9_8kkNzLlM,216
|
2
|
-
cli_mcp_server/server.py,sha256=MCjBmXutf4CZCy32e67-3tDI_AF2b_9qzq49ZkUR2qM,21288
|
3
|
-
cli_mcp_server-0.2.4.dist-info/METADATA,sha256=eJFjLeByTc-sUtiDlDyN4HB_NtmrgAyNSZ8kxg7TlqE,7860
|
4
|
-
cli_mcp_server-0.2.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
-
cli_mcp_server-0.2.4.dist-info/entry_points.txt,sha256=07bDmJJSXg-6VCFEFTOlsGoxI-0faJafT1yEEjUdN-U,55
|
6
|
-
cli_mcp_server-0.2.4.dist-info/licenses/LICENSE,sha256=85rOR_IMpb2VzXBA4VCRZh_KWlaO1Rly8HDYDwGgMWk,1062
|
7
|
-
cli_mcp_server-0.2.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|