kl-mcp-client 1.0.4__tar.gz → 1.0.6__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.
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/PKG-INFO +1 -1
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client/tools.py +20 -1
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client.egg-info/PKG-INFO +1 -1
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/pyproject.toml +1 -1
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/README.md +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client/__init__.py +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client/__version__.py +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client/asyncio/__init__.py +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client/asyncio/client.py +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client/asyncio/tools.py +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client/client.py +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client.egg-info/SOURCES.txt +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client.egg-info/dependency_links.txt +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client.egg-info/requires.txt +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/kl_mcp_client.egg-info/top_level.txt +0 -0
- {kl_mcp_client-1.0.4 → kl_mcp_client-1.0.6}/setup.cfg +0 -0
|
@@ -35,7 +35,7 @@ class MCPTools:
|
|
|
35
35
|
def connect_mcp(self, mcpUrl: str) -> Dict[str, Any]:
|
|
36
36
|
# sid = self.client.create_session(mcpUrl)
|
|
37
37
|
self.client = MCPClient(base_url=mcpUrl, headers=None, timeout=30, retries=2)
|
|
38
|
-
return {"ok": True, "cdpUrl": "http://
|
|
38
|
+
return {"ok": True, "cdpUrl": "http://localhost:9222"}
|
|
39
39
|
|
|
40
40
|
@_ensure_client
|
|
41
41
|
def create_session(self, cdpUrl: str) -> Dict[str, Any]:
|
|
@@ -209,3 +209,22 @@ class MCPTools:
|
|
|
209
209
|
return self.client.call_tool(
|
|
210
210
|
"importCookies", {"sessionId": sessionId, "cookies": cookies}
|
|
211
211
|
).get("structuredContent", {})
|
|
212
|
+
|
|
213
|
+
@_ensure_client
|
|
214
|
+
def get_dom_tree(self, sessionId, args=None):
|
|
215
|
+
return self.client.call_tool(
|
|
216
|
+
"getDomTree", {"sessionId": sessionId, "args": args or {}}
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
@_ensure_client
|
|
220
|
+
def get_clickable(self, sessionId, args=None):
|
|
221
|
+
return self.client.call_tool(
|
|
222
|
+
"getClickable", {"sessionId": sessionId, "args": args or {}}
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
@_ensure_client
|
|
226
|
+
def selector_map(self, sessionId, selector, args=None):
|
|
227
|
+
return self.client.call_tool(
|
|
228
|
+
"selectorMap",
|
|
229
|
+
{"sessionId": sessionId, "selector": selector, "args": args or {}},
|
|
230
|
+
)
|
|
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
|