mbxai 0.8.1__py3-none-any.whl → 0.8.2__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.
mbxai/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
  MBX AI package.
3
3
  """
4
4
 
5
- __version__ = "0.8.1"
5
+ __version__ = "0.8.2"
mbxai/mcp/client.py CHANGED
@@ -3,7 +3,6 @@
3
3
  from typing import Any, TypeVar, Callable
4
4
  import httpx
5
5
  import logging
6
- import asyncio
7
6
  import json
8
7
  from pydantic import BaseModel, Field
9
8
 
@@ -48,15 +47,15 @@ class MCPClient(ToolClient):
48
47
  """Initialize the MCP client."""
49
48
  super().__init__(openrouter_client)
50
49
  self._mcp_servers: dict[str, str] = {}
51
- self._http_client = httpx.AsyncClient()
50
+ self._http_client = httpx.Client()
52
51
 
53
- async def __aenter__(self):
54
- """Enter the async context."""
52
+ def __enter__(self):
53
+ """Enter the context."""
55
54
  return self
56
55
 
57
- async def __aexit__(self, exc_type, exc_val, exc_tb):
58
- """Exit the async context."""
59
- await self._http_client.aclose()
56
+ def __exit__(self, exc_type, exc_val, exc_tb):
57
+ """Exit the context."""
58
+ self._http_client.close()
60
59
 
61
60
  def _create_tool_function(self, tool: MCPTool) -> Callable[..., Any]:
62
61
  """Create a function that invokes an MCP tool."""
@@ -96,12 +95,12 @@ class MCPClient(ToolClient):
96
95
 
97
96
  return tool_function
98
97
 
99
- async def register_mcp_server(self, name: str, base_url: str) -> None:
98
+ def register_mcp_server(self, name: str, base_url: str) -> None:
100
99
  """Register an MCP server and load its tools."""
101
100
  self._mcp_servers[name] = base_url.rstrip("/")
102
101
 
103
102
  # Fetch tools from the server
104
- response = await self._http_client.get(f"{base_url}/tools")
103
+ response = self._http_client.get(f"{base_url}/tools")
105
104
  response_data = response.json()
106
105
 
107
106
  # Extract tools array from response
mbxai/mcp/server.py CHANGED
@@ -31,7 +31,7 @@ class MCPServer:
31
31
  self.app = FastAPI(
32
32
  title=self.name,
33
33
  description=self.description,
34
- version="0.8.1",
34
+ version="0.8.2",
35
35
  )
36
36
 
37
37
  # Initialize MCP server
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbxai
3
- Version: 0.8.1
3
+ Version: 0.8.2
4
4
  Summary: MBX AI SDK
5
5
  Project-URL: Homepage, https://www.mibexx.de
6
6
  Project-URL: Documentation, https://www.mibexx.de
@@ -1,13 +1,13 @@
1
- mbxai/__init__.py,sha256=O1u_IRIkFRKV_NhZnRm65giLILFptqYEhVvTRZqSpuE,47
1
+ mbxai/__init__.py,sha256=fMQtvU0_CdV_rgYF0Y9LxwbjYbJ3w-8VUepL_ID8ARc,47
2
2
  mbxai/core.py,sha256=WMvmU9TTa7M_m-qWsUew4xH8Ul6xseCZ2iBCXJTW-Bs,196
3
3
  mbxai/examples/openrouter_example.py,sha256=-grXHKMmFLoh-yUIEMc31n8Gg1S7uSazBWCIOWxgbyQ,1317
4
4
  mbxai/examples/parse_example.py,sha256=eCKMJoOl6qwo8sDP6Trc6ncgjPlgTqi5tPE2kB5_P0k,3821
5
5
  mbxai/examples/parse_tool_example.py,sha256=duHN8scI9ZK6XZ5hdiz1Adzyc-_7tH9Ls9qP4S0bf5s,5477
6
6
  mbxai/examples/tool_client_example.py,sha256=9DNaejXLA85dPbExMiv5y76qlFhzOJF9E5EnMOsy_Dc,3993
7
7
  mbxai/mcp/__init__.py,sha256=_ek9iYdYqW5saKetj4qDci11jxesQDiHPJRpHMKkxgU,175
8
- mbxai/mcp/client.py,sha256=3h6L9NCw5DpoRhB0QOFcaoWIhnmLvyI5TDUU_SOLEbY,5271
8
+ mbxai/mcp/client.py,sha256=BuKmKTupzbiLMFghseeYE6Ih6xCesJ8mIMHaXHiNwlo,5206
9
9
  mbxai/mcp/example.py,sha256=oaol7AvvZnX86JWNz64KvPjab5gg1VjVN3G8eFSzuaE,2350
10
- mbxai/mcp/server.py,sha256=5qJ7oR_a4zG50PrpecDLonWOS5dkNZ59onMjwwsrWzQ,3462
10
+ mbxai/mcp/server.py,sha256=buS_j1CnDvrOtwNRZiZYLF47w-Df1kvRFn78TgHVfV8,3462
11
11
  mbxai/openrouter/__init__.py,sha256=Ito9Qp_B6q-RLGAQcYyTJVWwR2YAZvNqE-HIYXxhtD8,298
12
12
  mbxai/openrouter/client.py,sha256=GhjyQ5YPDkUsOqlHF0ufkhDtU6g00hLAA5r7qKFU9co,10971
13
13
  mbxai/openrouter/config.py,sha256=Ia93s-auim9Sq71eunVDbn9ET5xX2zusXpV4JBdHAzs,3251
@@ -16,7 +16,7 @@ mbxai/tools/__init__.py,sha256=ogxrHvgJ7OR62Lmd5x9Eh5d2C0jqWyQis7Zy3yKpZ78,218
16
16
  mbxai/tools/client.py,sha256=h_1fxVDBq57f_OXNsj-TBp6-r367sv6Z5nk1qLFcLO8,14951
17
17
  mbxai/tools/example.py,sha256=1HgKK39zzUuwFbnp3f0ThyWVfA_8P28PZcTwaUw5K78,2232
18
18
  mbxai/tools/types.py,sha256=PEJ2AxBqywbJCp689QZhG87rDHWNuKGnmB5CCQsAMlw,5251
19
- mbxai-0.8.1.dist-info/METADATA,sha256=vgm0m08iBpmPhI7IjyKOo3YyXYKWgPwfNIV3RC-TRxU,4147
20
- mbxai-0.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
- mbxai-0.8.1.dist-info/licenses/LICENSE,sha256=hEyhc4FxwYo3NQ40yNgZ7STqwVk-1_XcTXOnAPbGJAw,1069
22
- mbxai-0.8.1.dist-info/RECORD,,
19
+ mbxai-0.8.2.dist-info/METADATA,sha256=hW7vTR9BAPmRvGoBLQhwAeNXAJYnIFlajXP6dZA5eF8,4147
20
+ mbxai-0.8.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
+ mbxai-0.8.2.dist-info/licenses/LICENSE,sha256=hEyhc4FxwYo3NQ40yNgZ7STqwVk-1_XcTXOnAPbGJAw,1069
22
+ mbxai-0.8.2.dist-info/RECORD,,
File without changes