mcp-proxy-adapter 4.0.0__py3-none-any.whl → 4.1.0__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.
@@ -257,15 +257,20 @@ class CommandRegistry:
257
257
  commands_info[name] = self.get_command_info(name)
258
258
  return commands_info
259
259
 
260
- def discover_commands(self, package_path: str = "mcp_proxy_adapter.commands") -> None:
260
+ def discover_commands(self, package_path: str = "mcp_proxy_adapter.commands") -> int:
261
261
  """
262
262
  Automatically discovers and registers commands in the specified package.
263
263
 
264
264
  Args:
265
265
  package_path: Path to package with commands.
266
+
267
+ Returns:
268
+ Number of commands discovered and registered.
266
269
  """
267
270
  logger.info(f"Discovering commands in package: {package_path}")
268
271
 
272
+ commands_discovered = 0
273
+
269
274
  try:
270
275
  package = importlib.import_module(package_path)
271
276
  package_dir = os.path.dirname(package.__file__ or "")
@@ -273,7 +278,7 @@ class CommandRegistry:
273
278
  for _, module_name, is_pkg in pkgutil.iter_modules([package_dir]):
274
279
  if is_pkg:
275
280
  # Recursively traverse subpackages
276
- self.discover_commands(f"{package_path}.{module_name}")
281
+ commands_discovered += self.discover_commands(f"{package_path}.{module_name}")
277
282
  elif module_name.endswith("_command"):
278
283
  # Import only command modules
279
284
  module_path = f"{package_path}.{module_name}"
@@ -297,6 +302,8 @@ class CommandRegistry:
297
302
  # Register the command only if it doesn't exist
298
303
  if not self.command_exists(command_name):
299
304
  self.register(cast(Type[Command], obj))
305
+ commands_discovered += 1
306
+ logger.debug(f"Registered command: {command_name}")
300
307
  else:
301
308
  logger.debug(f"Command '{command_name}' is already registered, skipping")
302
309
  except ValueError as e:
@@ -307,6 +314,8 @@ class CommandRegistry:
307
314
  except Exception as e:
308
315
  logger.error(f"Error discovering commands: {e}")
309
316
 
317
+ return commands_discovered
318
+
310
319
  def register_custom_command(self, command: Union[Type[Command], Command]) -> None:
311
320
  """
312
321
  Register a custom command with priority over built-in commands.
@@ -1,3 +1,3 @@
1
1
  """Version information for MCP Microservice."""
2
2
 
3
- __version__ = "4.0.0"
3
+ __version__ = "4.1.0"
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-proxy-adapter
3
- Version: 4.0.0
3
+ Version: 4.1.0
4
4
  Summary: Reliable microservice with unified JSON-RPC endpoint
5
- Home-page: https://github.com/yourusername/mcp-proxy-adapter
6
- Author: MCP Team
5
+ Home-page: https://github.com/maverikod/mcp-proxy-adapter
6
+ Author: Vasiliy Zdanovskiy
7
7
  Author-email: Vasiliy Zubarev <vasiliy.zubarev@example.com>
8
8
  License: MIT License
9
9
 
@@ -2,7 +2,7 @@ mcp_proxy_adapter/__init__.py,sha256=B7m1YWyv_Wb87-Q-JqVpHQgwajnfIgDyZ_iIxzdTbBY
2
2
  mcp_proxy_adapter/config.py,sha256=FS-Zwg8F5lfb0WqaXRrVlPLgjHEvPCV5MtTmE6Qj0Cw,6447
3
3
  mcp_proxy_adapter/custom_openapi.py,sha256=1A7y8r65WfZSqhhzhJyEIpwqwV-qbTXzRrRX04amluk,14472
4
4
  mcp_proxy_adapter/openapi.py,sha256=36vOEbJjGnVZR6hUhl6mHCD29HYOEFKo2bL0JdGSm-4,13952
5
- mcp_proxy_adapter/version.py,sha256=pZH64hpMX6h1LI8B0EIOOH2Az1Ddq7bHT-eXKNOvy2Y,71
5
+ mcp_proxy_adapter/version.py,sha256=92OLC5449Zo3k37tGhA1bpS09AYJa0q_UnsvNKmL3gg,71
6
6
  mcp_proxy_adapter/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  mcp_proxy_adapter/api/app.py,sha256=Haj0ogy70KRMyAAwU2PQhQFPf28On9ynnUX2FPk0l94,16602
8
8
  mcp_proxy_adapter/api/handlers.py,sha256=LqPMRMGYtepoZUoJiKjjycRE2fJxsE545osoEsgHKQg,7208
@@ -18,7 +18,7 @@ mcp_proxy_adapter/api/middleware/performance.py,sha256=dHBxTF43LEGXMKHMH3A8ybKmw
18
18
  mcp_proxy_adapter/api/middleware/rate_limit.py,sha256=DIv_-ZUVmL-jEo_A5BlfnasZf25zT84AiIJDUUnXkpM,5041
19
19
  mcp_proxy_adapter/commands/__init__.py,sha256=bHZZcVYkXVL9g-YZOnWkHOxSP2WzT-I4_OleYycQhbw,610
20
20
  mcp_proxy_adapter/commands/base.py,sha256=-OwzKXVwt9Ov4BLmHE6CAu9966__RgMOl1bkstlWCuE,14719
21
- mcp_proxy_adapter/commands/command_registry.py,sha256=Dd78qQ0N7ApsbJ_S0NHG4h9I4wjlILR9M85EFbfs_So,20146
21
+ mcp_proxy_adapter/commands/command_registry.py,sha256=zErrZvJFYA0amJ9ruo5W09QY2JJSlj5ezlkesR4xfCo,20494
22
22
  mcp_proxy_adapter/commands/config_command.py,sha256=-Z6BGaEQTf859l56zZpHYBeZFeIVdpMYybDrd7LOPIg,3553
23
23
  mcp_proxy_adapter/commands/dependency_container.py,sha256=Uz9OPRAUZN7tsVrMVgXgPQcsRD2N-e2Ixg9XarPOlnY,3410
24
24
  mcp_proxy_adapter/commands/health_command.py,sha256=_tzxHwB_8vo53VBC6HnBv5fSfZL1pEuwlbrCcy_K78c,4087
@@ -103,8 +103,8 @@ mcp_proxy_adapter/tests/stubs/echo_command.py,sha256=Y7SA4IB5Lo_ncn78SDm9iRZvJSK
103
103
  mcp_proxy_adapter/tests/unit/__init__.py,sha256=RS-5UoSCcLKtr2jrAaZw_NG9MquA6BZmxq-P6cTw9ok,53
104
104
  mcp_proxy_adapter/tests/unit/test_base_command.py,sha256=iCJzmfcvknS6pnzqu9TSkpgKBGoYCLWu0aQekcj1AME,18183
105
105
  mcp_proxy_adapter/tests/unit/test_config.py,sha256=SZ62LXFOv_fsV0fmSIBdHWvapEyexKrioFRQo0I4pkg,5900
106
- mcp_proxy_adapter-4.0.0.dist-info/licenses/LICENSE,sha256=OkApFEwdgMCt_mbvUI-eIwKMSTe38K3XnU2DT5ub-wI,1072
107
- mcp_proxy_adapter-4.0.0.dist-info/METADATA,sha256=e6Os1z7lPFN940_oTni0A07rkIV9QBb-iWBThps3Agw,7537
108
- mcp_proxy_adapter-4.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
109
- mcp_proxy_adapter-4.0.0.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
110
- mcp_proxy_adapter-4.0.0.dist-info/RECORD,,
106
+ mcp_proxy_adapter-4.1.0.dist-info/licenses/LICENSE,sha256=OkApFEwdgMCt_mbvUI-eIwKMSTe38K3XnU2DT5ub-wI,1072
107
+ mcp_proxy_adapter-4.1.0.dist-info/METADATA,sha256=VI60yNbcWG46NIhvDVcbEP2NvYZZdcCqe8oCwJNw1Do,7544
108
+ mcp_proxy_adapter-4.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
109
+ mcp_proxy_adapter-4.1.0.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
110
+ mcp_proxy_adapter-4.1.0.dist-info/RECORD,,