dtlpymcp 0.1.12__tar.gz → 0.1.14__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dtlpymcp
3
- Version: 0.1.12
3
+ Version: 0.1.14
4
4
  Summary: STDIO MCP proxy server for Dataloop platform.
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -1,3 +1,3 @@
1
1
  from .utils.dtlpy_context import DataloopContext, MCPSource
2
2
 
3
- __version__ = "0.1.12"
3
+ __version__ = "0.1.14"
@@ -1,4 +1,3 @@
1
- from imp import source_from_cache
2
1
  from mcp.server.fastmcp.utilities.func_metadata import ArgModelBase, FuncMetadata
3
2
  from mcp.client.streamable_http import streamablehttp_client
4
3
  from typing import List, Tuple, Callable, Optional
@@ -96,7 +95,7 @@ class DataloopContext:
96
95
  server_name, tools, call_fn = result
97
96
  for tool in tools.tools:
98
97
  tool_name = tool.name
99
- ns_tool_name = f"{server_name}.{tool_name}"
98
+ ns_tool_name = f"{server_name}__{tool_name}"
100
99
  description = tool.description
101
100
  input_schema = tool.inputSchema
102
101
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dtlpymcp
3
- Version: 0.1.12
3
+ Version: 0.1.14
4
4
  Summary: STDIO MCP proxy server for Dataloop platform.
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -14,6 +14,7 @@ dtlpymcp.egg-info/top_level.txt
14
14
  dtlpymcp/utils/dtlpy_context.py
15
15
  tests/test_context.py
16
16
  tests/test_custom_sources_file.py
17
+ tests/test_dlchat.py
17
18
  tests/test_list_platform_tools.py
18
19
  tests/test_proxy.py
19
20
  tests/test_run.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dtlpymcp"
7
- version = "0.1.12"
7
+ version = "0.1.14"
8
8
  description = "STDIO MCP proxy server for Dataloop platform."
9
9
  authors = [
10
10
  { name = "Your Name", email = "your.email@example.com" }
@@ -0,0 +1,36 @@
1
+ import asyncio
2
+ import random
3
+ import json
4
+ import os
5
+ from datetime import timedelta
6
+ from mcp.client.stdio import stdio_client
7
+ from mcp import ClientSession, StdioServerParameters
8
+ import dtlpy as dl
9
+
10
+ dl.setenv('prod')
11
+ if dl.token_expired():
12
+ dl.login()
13
+
14
+ # Create server parameters for stdio connection
15
+ server_params = StdioServerParameters(
16
+ command="e:\\Applications\\dtlpy-mcp\\.venv\\Scripts\\python.exe", # Executable
17
+ args=["-m", "dtlpymcp", "start", "-s", "tests/assets/sources.json"], # Command line arguments
18
+ env={"DATALOOP_API_KEY": dl.token()}, # Optional environment variables
19
+ cwd=os.getcwd()
20
+ )
21
+
22
+ async def test_health_check():
23
+ print("[TEST CLIENT] Connecting to MCP server and calling test tool...")
24
+ async with stdio_client(server=server_params) as (read, write):
25
+ async with ClientSession(read, write, read_timeout_seconds=timedelta(seconds=60)) as session:
26
+ await session.initialize()
27
+ tools = await session.list_tools()
28
+ print([tool.name for tool in tools.tools])
29
+ tool_result = await session.call_tool("dl-internal-chat-prod__list_repos")
30
+ print("[RESULT]", tool_result)
31
+ tool_result = await session.call_tool("dl-internal-chat-prod__ping")
32
+ print("[RESULT]", tool_result)
33
+
34
+ if __name__ == "__main__":
35
+ asyncio.run(test_health_check())
36
+ # asyncio.run(test_ask_dataloop())
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes