mcp-proxy-adapter 6.9.7__py3-none-any.whl → 6.9.8__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.
@@ -539,37 +539,71 @@ class ConfigValidator:
539
539
  registration_enabled = self._get_nested_value_safe("proxy_registration.enabled", False)
540
540
 
541
541
  if registration_enabled:
542
- proxy_url = self._get_nested_value("proxy_registration.proxy_url")
543
- if not proxy_url:
542
+ if not self._has_nested_key("proxy_registration.proxy_url"):
544
543
  self.validation_results.append(ValidationResult(
545
544
  level="error",
546
545
  message="Proxy registration is enabled but proxy_url is not specified",
547
546
  section="proxy_registration",
548
547
  key="proxy_url"
549
548
  ))
549
+ else:
550
+ proxy_url = self._get_nested_value("proxy_registration.proxy_url")
551
+ if not proxy_url:
552
+ self.validation_results.append(ValidationResult(
553
+ level="error",
554
+ message="Proxy registration is enabled but proxy_url is not specified",
555
+ section="proxy_registration",
556
+ key="proxy_url"
557
+ ))
550
558
 
551
559
  # Check authentication method consistency
552
560
  auth_method = self._get_nested_value_safe("proxy_registration.auth_method", "none")
553
561
  if auth_method != "none":
554
562
  if auth_method == "certificate":
555
- cert_file = self._get_nested_value("proxy_registration.certificate.cert_file")
556
- key_file = self._get_nested_value("proxy_registration.certificate.key_file")
557
- if not cert_file or not key_file:
558
- self.validation_results.append(ValidationResult(
559
- level="error",
560
- message="Certificate authentication is enabled but certificate files are not specified",
561
- section="proxy_registration",
562
- key="certificate"
563
- ))
564
- elif auth_method == "token":
565
- token = self._get_nested_value("proxy_registration.token.token")
566
- if not token:
563
+ if not self._has_nested_key("proxy_registration.certificate.cert_file"):
567
564
  self.validation_results.append(ValidationResult(
568
565
  level="error",
569
- message="Token authentication is enabled but token is not specified",
566
+ message="Certificate authentication requires cert_file",
567
+ section="proxy_registration.certificate",
568
+ key="cert_file"
569
+ ))
570
+ else:
571
+ cert_file = self._get_nested_value("proxy_registration.certificate.cert_file")
572
+
573
+ if not self._has_nested_key("proxy_registration.certificate.key_file"):
574
+ self.validation_results.append(ValidationResult(
575
+ level="error",
576
+ message="Certificate authentication requires key_file",
577
+ section="proxy_registration.certificate",
578
+ key="key_file"
579
+ ))
580
+ else:
581
+ key_file = self._get_nested_value("proxy_registration.certificate.key_file")
582
+
583
+ if not cert_file or not key_file:
584
+ self.validation_results.append(ValidationResult(
585
+ level="error",
586
+ message="Certificate authentication is enabled but certificate files are not specified",
570
587
  section="proxy_registration",
588
+ key="certificate"
589
+ ))
590
+ elif auth_method == "token":
591
+ if not self._has_nested_key("proxy_registration.token.token"):
592
+ self.validation_results.append(ValidationResult(
593
+ level="error",
594
+ message="Token authentication requires token",
595
+ section="proxy_registration.token",
571
596
  key="token"
572
597
  ))
598
+ else:
599
+ token = self._get_nested_value("proxy_registration.token.token")
600
+ if not token:
601
+ self.validation_results.append(ValidationResult(
602
+ level="error",
603
+ message="Token authentication is enabled but token is not specified",
604
+ section="proxy_registration",
605
+ key="token"
606
+ ))
573
607
 
574
608
  def _validate_ssl_configuration(self) -> None:
575
609
  """Validate SSL configuration with detailed certificate validation."""
@@ -580,9 +614,35 @@ class ConfigValidator:
580
614
  ssl_enabled = self._get_nested_value_safe("ssl.enabled", False)
581
615
 
582
616
  if ssl_enabled:
583
- cert_file = self._get_nested_value("ssl.cert_file")
584
- key_file = self._get_nested_value("ssl.key_file")
585
- ca_cert = self._get_nested_value("ssl.ca_cert")
617
+ if not self._has_nested_key("ssl.cert_file"):
618
+ self.validation_results.append(ValidationResult(
619
+ level="error",
620
+ message="SSL is enabled but cert_file is not specified",
621
+ section="ssl",
622
+ key="cert_file"
623
+ ))
624
+ else:
625
+ cert_file = self._get_nested_value("ssl.cert_file")
626
+
627
+ if not self._has_nested_key("ssl.key_file"):
628
+ self.validation_results.append(ValidationResult(
629
+ level="error",
630
+ message="SSL is enabled but key_file is not specified",
631
+ section="ssl",
632
+ key="key_file"
633
+ ))
634
+ else:
635
+ key_file = self._get_nested_value("ssl.key_file")
636
+
637
+ if not self._has_nested_key("ssl.ca_cert"):
638
+ self.validation_results.append(ValidationResult(
639
+ level="error",
640
+ message="SSL is enabled but ca_cert is not specified",
641
+ section="ssl",
642
+ key="ca_cert"
643
+ ))
644
+ else:
645
+ ca_cert = self._get_nested_value("ssl.ca_cert")
586
646
 
587
647
  # Check certificate file
588
648
  if not cert_file:
@@ -644,21 +704,29 @@ class ConfigValidator:
644
704
  roles_enabled = self._get_nested_value_safe("roles.enabled", False)
645
705
 
646
706
  if roles_enabled:
647
- config_file = self._get_nested_value("roles.config_file")
648
- if not config_file:
707
+ if not self._has_nested_key("roles.config_file"):
649
708
  self.validation_results.append(ValidationResult(
650
709
  level="error",
651
710
  message="Roles are enabled but config_file is not specified",
652
711
  section="roles",
653
712
  key="config_file"
654
713
  ))
655
- elif not os.path.exists(config_file):
656
- self.validation_results.append(ValidationResult(
657
- level="error",
658
- message=f"Roles config file '{config_file}' does not exist",
659
- section="roles",
660
- key="config_file"
661
- ))
714
+ else:
715
+ config_file = self._get_nested_value("roles.config_file")
716
+ if not config_file:
717
+ self.validation_results.append(ValidationResult(
718
+ level="error",
719
+ message="Roles are enabled but config_file is not specified",
720
+ section="roles",
721
+ key="config_file"
722
+ ))
723
+ elif not os.path.exists(config_file):
724
+ self.validation_results.append(ValidationResult(
725
+ level="error",
726
+ message=f"Roles config file '{config_file}' does not exist",
727
+ section="roles",
728
+ key="config_file"
729
+ ))
662
730
 
663
731
  def _get_nested_value(self, key: str) -> Any:
664
732
  """Get value from nested dictionary using dot notation. Raises exception if key not found."""
@@ -16,7 +16,7 @@ from typing import Dict, Any, Optional
16
16
  # Add the current directory to the path to import config_builder
17
17
  sys.path.insert(0, str(Path(__file__).parent))
18
18
 
19
- from config_builder import ConfigBuilder, ConfigFactory, Protocol, AuthMethod
19
+ from config_builder import generate_complete_config
20
20
 
21
21
  # Import validation modules
22
22
  try:
@@ -57,10 +57,8 @@ def create_config_from_flags(
57
57
  Returns:
58
58
  Configuration dictionary
59
59
  """
60
- # Use the enhanced config builder
61
- from config_builder import create_config_from_flags as enhanced_create_config
62
-
63
- return enhanced_create_config(protocol, token, roles, port, proxy_registration, proxy_url, auto_registration, server_id)
60
+ # Use the simple config builder
61
+ return generate_complete_config(host, port)
64
62
 
65
63
 
66
64
  def save_config(config: Dict[str, Any], filename: str, output_dir: str, validate: bool = True) -> Path:
@@ -2,4 +2,4 @@
2
2
  Version information for MCP Proxy Adapter.
3
3
  """
4
4
 
5
- __version__ = "6.9.7"
5
+ __version__ = "6.9.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-proxy-adapter
3
- Version: 6.9.7
3
+ Version: 6.9.8
4
4
  Summary: Powerful JSON-RPC microservices framework with built-in security, authentication, and proxy registration
5
5
  Home-page: https://github.com/maverikod/mcp-proxy-adapter
6
6
  Author: Vasiliy Zdanovskiy
@@ -4,7 +4,7 @@ mcp_proxy_adapter/config.py,sha256=1Ngxri2IPGoytYdCF5pXzbLUXsWcf6qYENkaDkAppg0,2
4
4
  mcp_proxy_adapter/custom_openapi.py,sha256=XRviX-C-ZkSKdBhORhDTdeN_1FWyEfXZADiASft3t9I,28149
5
5
  mcp_proxy_adapter/main.py,sha256=NFcSW7WaEnimRWe5zj28D0CH9otHlRZ92d2Um6XiGjE,10399
6
6
  mcp_proxy_adapter/openapi.py,sha256=2UZOI09ZDRJuBYBjKbMyb2U4uASszoCMD5o_4ktRpvg,13480
7
- mcp_proxy_adapter/version.py,sha256=e_sPEsKJLZMvetzVlFPS_CvyEGxkD-vhanbfb-2ii1o,74
7
+ mcp_proxy_adapter/version.py,sha256=Z-uhPZ5DfWcxa-jqj9qDbTk56I3mm3z8leUL7bJdNmM,74
8
8
  mcp_proxy_adapter/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  mcp_proxy_adapter/api/app.py,sha256=PQ1Ch5ydJIHp3Z6gcMCzKkTsXPQAuZ9weHtQ-EXnNGY,37134
10
10
  mcp_proxy_adapter/api/handlers.py,sha256=X-hcMNVeTAu4yVkKJEChEsj2bFptUS6sLNN-Wysjkow,10011
@@ -62,7 +62,7 @@ mcp_proxy_adapter/core/client.py,sha256=qIbPl8prEwK2U65kl-vGJW2_imo1E4i6HxG_VpPe
62
62
  mcp_proxy_adapter/core/client_manager.py,sha256=yD8HZJlOwmDbVU49YfzSbh1XZ-Vib8qfcLVAaH03Jdg,8832
63
63
  mcp_proxy_adapter/core/client_security.py,sha256=siUaYorcDbpZsEIKgLfg-jBKkp7z_Er8wsO63mDD3Is,13127
64
64
  mcp_proxy_adapter/core/config_converter.py,sha256=Wnnsrbw7DxtgDfLG-IyyzK-hkKu0_1yp7-7dW87tu_4,17422
65
- mcp_proxy_adapter/core/config_validator.py,sha256=Jiu3rJ9eJyEUBNsZ88jVQ-cj_Hd5BxhlBbWtyG6QAsA,49313
65
+ mcp_proxy_adapter/core/config_validator.py,sha256=Pu9xh1PZ8fkI_SNAQmB1XecU-9kO4lokEJr9iUhOIRw,52677
66
66
  mcp_proxy_adapter/core/crl_utils.py,sha256=Jnwq2UN52IoCDZCwByRP3XNMOJexftb-mVaH6zes6Fc,11706
67
67
  mcp_proxy_adapter/core/errors.py,sha256=CyhQgvMt0ooQjONa65XRBJ44y-l-E5_ES4KOuRvIpBk,8557
68
68
  mcp_proxy_adapter/core/logging.py,sha256=VIpiC6QTGLukRjiJoVpq3VEoLKhUeLNl8IdfljpW6ZU,9654
@@ -95,7 +95,7 @@ mcp_proxy_adapter/examples/create_test_configs.py,sha256=9TrvLa4-bWLPu0SB1JXwWuC
95
95
  mcp_proxy_adapter/examples/debug_request_state.py,sha256=Z3Gy2-fWtu7KIV9OkzGDLVz7TpL_h9V_99ica40uQBU,4489
96
96
  mcp_proxy_adapter/examples/debug_role_chain.py,sha256=GLVXC2fJUwP8UJnXHchd1t-H53cjWLJI3RqTPrKmaak,8750
97
97
  mcp_proxy_adapter/examples/demo_client.py,sha256=en2Rtb70B1sQmhL-vdQ4PDpKNNl_mfll2YCFT_jFCAg,10191
98
- mcp_proxy_adapter/examples/generate_config.py,sha256=45noGYcZbkFGJNf3Qq5T17bL-PDLh5f9o0UE-dNo0eM,15169
98
+ mcp_proxy_adapter/examples/generate_config.py,sha256=h0_T9gi8ux6xf2nIF56VX1s2YBxLxQVIk3SbhmKsxEg,14977
99
99
  mcp_proxy_adapter/examples/proxy_registration_example.py,sha256=vemRhftnjbiOBCJkmtDGqlWQ8syTG0a8755GCOnaQsg,12503
100
100
  mcp_proxy_adapter/examples/required_certificates.py,sha256=YW9-V78oFiZ-FmHlGP-8FQFS569VdDVyq9hfvCv31pk,7133
101
101
  mcp_proxy_adapter/examples/run_example.py,sha256=yp-a6HIrSk3ddQmbn0KkuKwErId0aNfj028TE6U-zmY,2626
@@ -135,8 +135,8 @@ mcp_proxy_adapter/schemas/base_schema.json,sha256=v9G9cGMd4dRhCZsOQ_FMqOi5VFyVbI
135
135
  mcp_proxy_adapter/schemas/openapi_schema.json,sha256=C3yLkwmDsvnLW9B5gnKKdBGl4zxkeU-rEmjTrNVsQU0,8405
136
136
  mcp_proxy_adapter/schemas/roles.json,sha256=pgf_ZyqKyXbfGUxvobpiLiSJz9zzxrMuoVWEkEpz3N8,764
137
137
  mcp_proxy_adapter/schemas/roles_schema.json,sha256=deHgI7L6GwfBXacOlNtDgDJelDThppClC3Ti4Eh8rJY,5659
138
- mcp_proxy_adapter-6.9.7.dist-info/METADATA,sha256=jPv79sUiL5LIIc9uoDBw4i994eFASaTpiJXisdAGz0g,8510
139
- mcp_proxy_adapter-6.9.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
140
- mcp_proxy_adapter-6.9.7.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
141
- mcp_proxy_adapter-6.9.7.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
142
- mcp_proxy_adapter-6.9.7.dist-info/RECORD,,
138
+ mcp_proxy_adapter-6.9.8.dist-info/METADATA,sha256=309u-iZSLIck5tPqOQNJbrm2GI1BWBsZ6ZIRdwYz0ts,8510
139
+ mcp_proxy_adapter-6.9.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
140
+ mcp_proxy_adapter-6.9.8.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
141
+ mcp_proxy_adapter-6.9.8.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
142
+ mcp_proxy_adapter-6.9.8.dist-info/RECORD,,