mle-kit-mcp 0.2.6__tar.gz → 1.0.1__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.
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/PKG-INFO +1 -1
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/server.py +18 -7
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/tools/remote_gpu.py +4 -2
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp.egg-info/PKG-INFO +1 -1
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/pyproject.toml +1 -1
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/LICENSE +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/README.md +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/__init__.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/__main__.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/files.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/llm_proxy.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/py.typed +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/tools/__init__.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/tools/bash.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/tools/llm_proxy.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/tools/text_editor.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp/utils.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp.egg-info/SOURCES.txt +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp.egg-info/dependency_links.txt +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp.egg-info/entry_points.txt +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp.egg-info/requires.txt +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/mle_kit_mcp.egg-info/top_level.txt +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/setup.cfg +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/tests/test_bash.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/tests/test_llm_proxy.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/tests/test_text_editor.py +0 -0
- {mle_kit_mcp-0.2.6 → mle_kit_mcp-1.0.1}/tests/test_truncate_context.py +0 -0
@@ -1,9 +1,8 @@
|
|
1
1
|
import os
|
2
2
|
from pathlib import Path
|
3
|
-
from typing import Optional
|
3
|
+
from typing import Optional, Literal
|
4
4
|
|
5
5
|
import fire # type: ignore
|
6
|
-
import uvicorn
|
7
6
|
from mcp.server.fastmcp import FastMCP
|
8
7
|
from dotenv import load_dotenv
|
9
8
|
|
@@ -21,14 +20,26 @@ from .tools.llm_proxy import (
|
|
21
20
|
from .files import get_workspace_dir, WorkspaceDirectory
|
22
21
|
|
23
22
|
|
24
|
-
def run(
|
23
|
+
def run(
|
24
|
+
host: str = "0.0.0.0",
|
25
|
+
port: int = 5050,
|
26
|
+
mount_path: str = "/",
|
27
|
+
streamable_http_path: str = "/mcp",
|
28
|
+
workspace: Optional[str] = None,
|
29
|
+
transport: Literal["stdio", "sse", "streamable-http"] = "streamable-http",
|
30
|
+
) -> None:
|
25
31
|
load_dotenv()
|
26
32
|
if workspace:
|
27
33
|
WorkspaceDirectory.set_dir(Path(workspace))
|
28
34
|
workspace_path = get_workspace_dir()
|
29
35
|
workspace_path.mkdir(parents=True, exist_ok=True)
|
30
36
|
|
31
|
-
server = FastMCP(
|
37
|
+
server = FastMCP(
|
38
|
+
"MLE kit MCP",
|
39
|
+
stateless_http=True,
|
40
|
+
streamable_http_path=streamable_http_path,
|
41
|
+
mount_path=mount_path,
|
42
|
+
)
|
32
43
|
|
33
44
|
remote_text_editor = create_remote_text_editor(text_editor)
|
34
45
|
|
@@ -41,9 +52,9 @@ def run(host: str = "0.0.0.0", port: int = 5050, workspace: Optional[str] = None
|
|
41
52
|
server.add_tool(llm_proxy_local)
|
42
53
|
server.add_tool(llm_proxy_remote)
|
43
54
|
|
44
|
-
|
45
|
-
|
46
|
-
|
55
|
+
server.settings.port = port
|
56
|
+
server.settings.host = host
|
57
|
+
server.run(transport=transport)
|
47
58
|
|
48
59
|
|
49
60
|
if __name__ == "__main__":
|
@@ -357,7 +357,8 @@ def create_remote_text_editor(
|
|
357
357
|
dir_path = "/".join(path.split("/")[:-1])
|
358
358
|
if dir_path:
|
359
359
|
recieve_rsync(instance, f"/root/{path}", f"{get_workspace_dir()}/{dir_path}")
|
360
|
-
|
360
|
+
else:
|
361
|
+
recieve_rsync(instance, f"/root/{path}", f"{get_workspace_dir()}")
|
361
362
|
|
362
363
|
result: str = text_editor_func(*args, **kwargs)
|
363
364
|
|
@@ -365,7 +366,8 @@ def create_remote_text_editor(
|
|
365
366
|
dir_path = "/".join(path.split("/")[:-1])
|
366
367
|
if dir_path:
|
367
368
|
send_rsync(instance, f"{get_workspace_dir()}/{path}", f"/root/{dir_path}")
|
368
|
-
|
369
|
+
else:
|
370
|
+
send_rsync(instance, f"{get_workspace_dir()}/{path}", "/root")
|
369
371
|
|
370
372
|
return result
|
371
373
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|