mcp-proxy-adapter 6.1.1__py3-none-any.whl → 6.2.1__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.
Files changed (146) hide show
  1. mcp_proxy_adapter/__main__.py +27 -7
  2. mcp_proxy_adapter/api/app.py +18 -7
  3. mcp_proxy_adapter/commands/ssl_setup_command.py +234 -351
  4. mcp_proxy_adapter/core/app_factory.py +87 -3
  5. mcp_proxy_adapter/core/app_runner.py +272 -0
  6. mcp_proxy_adapter/core/certificate_utils.py +291 -73
  7. mcp_proxy_adapter/core/client.py +574 -0
  8. mcp_proxy_adapter/core/client_manager.py +284 -0
  9. mcp_proxy_adapter/core/server_adapter.py +17 -80
  10. mcp_proxy_adapter/core/server_engine.py +5 -99
  11. mcp_proxy_adapter/core/ssl_utils.py +13 -12
  12. mcp_proxy_adapter/core/transport_manager.py +5 -5
  13. mcp_proxy_adapter/examples/__init__.py +16 -0
  14. mcp_proxy_adapter/examples/basic_framework/__init__.py +7 -0
  15. mcp_proxy_adapter/examples/basic_framework/commands/__init__.py +4 -0
  16. mcp_proxy_adapter/examples/basic_framework/hooks/__init__.py +4 -0
  17. mcp_proxy_adapter/examples/basic_framework/main.py +21 -40
  18. mcp_proxy_adapter/examples/commands/__init__.py +5 -1
  19. mcp_proxy_adapter/examples/create_certificates_simple.py +260 -75
  20. mcp_proxy_adapter/examples/debug_request_state.py +4 -36
  21. mcp_proxy_adapter/examples/debug_role_chain.py +2 -49
  22. mcp_proxy_adapter/examples/demo_client.py +0 -66
  23. mcp_proxy_adapter/examples/full_application/__init__.py +11 -0
  24. mcp_proxy_adapter/examples/full_application/commands/__init__.py +7 -0
  25. mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +0 -19
  26. mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +0 -16
  27. mcp_proxy_adapter/examples/full_application/hooks/__init__.py +7 -0
  28. mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +0 -22
  29. mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +0 -24
  30. mcp_proxy_adapter/examples/full_application/main.py +65 -44
  31. mcp_proxy_adapter/examples/full_application/proxy_endpoints.py +154 -0
  32. mcp_proxy_adapter/examples/generate_all_certificates.py +0 -67
  33. mcp_proxy_adapter/examples/generate_certificates.py +0 -15
  34. mcp_proxy_adapter/examples/generate_certificates_and_tokens.py +369 -0
  35. mcp_proxy_adapter/examples/generate_test_configs.py +204 -0
  36. mcp_proxy_adapter/examples/proxy_registration_example.py +3 -70
  37. mcp_proxy_adapter/examples/run_example.py +1 -23
  38. mcp_proxy_adapter/examples/run_security_tests.py +2 -60
  39. mcp_proxy_adapter/examples/run_security_tests_fixed.py +0 -53
  40. mcp_proxy_adapter/examples/security_test_client.py +18 -123
  41. mcp_proxy_adapter/examples/setup_test_environment.py +179 -0
  42. mcp_proxy_adapter/examples/test_config.py +148 -0
  43. mcp_proxy_adapter/examples/test_config_generator.py +1 -25
  44. mcp_proxy_adapter/examples/test_examples.py +4 -67
  45. mcp_proxy_adapter/examples/universal_client.py +154 -162
  46. mcp_proxy_adapter/main.py +51 -161
  47. mcp_proxy_adapter/version.py +1 -1
  48. mcp_proxy_adapter-6.2.1.dist-info/METADATA +676 -0
  49. mcp_proxy_adapter-6.2.1.dist-info/RECORD +119 -0
  50. mcp_proxy_adapter/docs/EN/TROUBLESHOOTING.md +0 -285
  51. mcp_proxy_adapter/docs/RU/TROUBLESHOOTING.md +0 -285
  52. mcp_proxy_adapter/examples/README.md +0 -257
  53. mcp_proxy_adapter/examples/README_EN.md +0 -258
  54. mcp_proxy_adapter/examples/SECURITY_TESTING.md +0 -455
  55. mcp_proxy_adapter/examples/basic_framework/configs/http_auth.json +0 -37
  56. mcp_proxy_adapter/examples/basic_framework/configs/http_simple.json +0 -23
  57. mcp_proxy_adapter/examples/basic_framework/configs/https_auth.json +0 -43
  58. mcp_proxy_adapter/examples/basic_framework/configs/https_no_protocol_middleware.json +0 -36
  59. mcp_proxy_adapter/examples/basic_framework/configs/https_simple.json +0 -29
  60. mcp_proxy_adapter/examples/basic_framework/configs/mtls_no_protocol_middleware.json +0 -34
  61. mcp_proxy_adapter/examples/basic_framework/configs/mtls_no_roles.json +0 -39
  62. mcp_proxy_adapter/examples/basic_framework/configs/mtls_simple.json +0 -35
  63. mcp_proxy_adapter/examples/basic_framework/configs/mtls_with_roles.json +0 -45
  64. mcp_proxy_adapter/examples/basic_framework/roles.json +0 -21
  65. mcp_proxy_adapter/examples/cert_config.json +0 -9
  66. mcp_proxy_adapter/examples/certs/admin.crt +0 -32
  67. mcp_proxy_adapter/examples/certs/admin.key +0 -52
  68. mcp_proxy_adapter/examples/certs/admin_cert.pem +0 -21
  69. mcp_proxy_adapter/examples/certs/admin_key.pem +0 -28
  70. mcp_proxy_adapter/examples/certs/ca_cert.pem +0 -23
  71. mcp_proxy_adapter/examples/certs/ca_cert.srl +0 -1
  72. mcp_proxy_adapter/examples/certs/ca_key.pem +0 -28
  73. mcp_proxy_adapter/examples/certs/cert_config.json +0 -9
  74. mcp_proxy_adapter/examples/certs/client.crt +0 -32
  75. mcp_proxy_adapter/examples/certs/client.key +0 -52
  76. mcp_proxy_adapter/examples/certs/client_admin.crt +0 -32
  77. mcp_proxy_adapter/examples/certs/client_admin.key +0 -52
  78. mcp_proxy_adapter/examples/certs/client_user.crt +0 -32
  79. mcp_proxy_adapter/examples/certs/client_user.key +0 -52
  80. mcp_proxy_adapter/examples/certs/guest_cert.pem +0 -21
  81. mcp_proxy_adapter/examples/certs/guest_key.pem +0 -28
  82. mcp_proxy_adapter/examples/certs/mcp_proxy_adapter_ca_ca.crt +0 -23
  83. mcp_proxy_adapter/examples/certs/proxy_cert.pem +0 -21
  84. mcp_proxy_adapter/examples/certs/proxy_key.pem +0 -28
  85. mcp_proxy_adapter/examples/certs/readonly.crt +0 -32
  86. mcp_proxy_adapter/examples/certs/readonly.key +0 -52
  87. mcp_proxy_adapter/examples/certs/readonly_cert.pem +0 -21
  88. mcp_proxy_adapter/examples/certs/readonly_key.pem +0 -28
  89. mcp_proxy_adapter/examples/certs/server.crt +0 -32
  90. mcp_proxy_adapter/examples/certs/server.key +0 -52
  91. mcp_proxy_adapter/examples/certs/server_cert.pem +0 -32
  92. mcp_proxy_adapter/examples/certs/server_key.pem +0 -52
  93. mcp_proxy_adapter/examples/certs/test_ca_ca.crt +0 -20
  94. mcp_proxy_adapter/examples/certs/user.crt +0 -32
  95. mcp_proxy_adapter/examples/certs/user.key +0 -52
  96. mcp_proxy_adapter/examples/certs/user_cert.pem +0 -21
  97. mcp_proxy_adapter/examples/certs/user_key.pem +0 -28
  98. mcp_proxy_adapter/examples/client_configs/api_key_client.json +0 -13
  99. mcp_proxy_adapter/examples/client_configs/basic_auth_client.json +0 -13
  100. mcp_proxy_adapter/examples/client_configs/certificate_client.json +0 -22
  101. mcp_proxy_adapter/examples/client_configs/jwt_client.json +0 -15
  102. mcp_proxy_adapter/examples/client_configs/no_auth_client.json +0 -9
  103. mcp_proxy_adapter/examples/full_application/configs/http_auth.json +0 -37
  104. mcp_proxy_adapter/examples/full_application/configs/http_simple.json +0 -23
  105. mcp_proxy_adapter/examples/full_application/configs/https_auth.json +0 -39
  106. mcp_proxy_adapter/examples/full_application/configs/https_simple.json +0 -25
  107. mcp_proxy_adapter/examples/full_application/configs/mtls_no_roles.json +0 -39
  108. mcp_proxy_adapter/examples/full_application/configs/mtls_with_roles.json +0 -45
  109. mcp_proxy_adapter/examples/full_application/roles.json +0 -21
  110. mcp_proxy_adapter/examples/keys/ca_key.pem +0 -28
  111. mcp_proxy_adapter/examples/keys/mcp_proxy_adapter_ca_ca.key +0 -28
  112. mcp_proxy_adapter/examples/keys/test_ca_ca.key +0 -28
  113. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log +0 -220
  114. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.1 +0 -1
  115. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.2 +0 -1
  116. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.3 +0 -1
  117. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.4 +0 -1
  118. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.5 +0 -1
  119. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log +0 -220
  120. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.1 +0 -1
  121. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.2 +0 -1
  122. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.3 +0 -1
  123. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.4 +0 -1
  124. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.5 +0 -1
  125. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log +0 -2
  126. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.1 +0 -1
  127. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.2 +0 -1
  128. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.3 +0 -1
  129. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.4 +0 -1
  130. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.5 +0 -1
  131. mcp_proxy_adapter/examples/roles.json +0 -38
  132. mcp_proxy_adapter/examples/server_configs/config_basic_http.json +0 -204
  133. mcp_proxy_adapter/examples/server_configs/config_http_token.json +0 -238
  134. mcp_proxy_adapter/examples/server_configs/config_https.json +0 -215
  135. mcp_proxy_adapter/examples/server_configs/config_https_token.json +0 -231
  136. mcp_proxy_adapter/examples/server_configs/config_mtls.json +0 -215
  137. mcp_proxy_adapter/examples/server_configs/config_proxy_registration.json +0 -250
  138. mcp_proxy_adapter/examples/server_configs/config_simple.json +0 -46
  139. mcp_proxy_adapter/examples/server_configs/roles.json +0 -38
  140. mcp_proxy_adapter/utils/config_generator.py +0 -727
  141. mcp_proxy_adapter-6.1.1.dist-info/METADATA +0 -205
  142. mcp_proxy_adapter-6.1.1.dist-info/RECORD +0 -197
  143. mcp_proxy_adapter-6.1.1.dist-info/entry_points.txt +0 -2
  144. mcp_proxy_adapter-6.1.1.dist-info/licenses/LICENSE +0 -21
  145. {mcp_proxy_adapter-6.1.1.dist-info → mcp_proxy_adapter-6.2.1.dist-info}/WHEEL +0 -0
  146. {mcp_proxy_adapter-6.1.1.dist-info → mcp_proxy_adapter-6.2.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,119 @@
1
+ mcp_proxy_adapter/__init__.py,sha256=B7m1YWyv_Wb87-Q-JqVpHQgwajnfIgDyZ_iIxzdTbBY,1021
2
+ mcp_proxy_adapter/__main__.py,sha256=jxXP9WnXJvuIlurBnTCu3dt9jL-K1wA6VfPnjdGatg0,768
3
+ mcp_proxy_adapter/config.py,sha256=z4rUbJdxYj6vYw05OM_kMXs1Qn2HRQXGHI9PB4hgPd4,12867
4
+ mcp_proxy_adapter/custom_openapi.py,sha256=jYUrCy8C1mShh3sjKj-JkzSMLAvxDLTvtzSJFj5HUNg,15023
5
+ mcp_proxy_adapter/main.py,sha256=_DJwMZdN0393UR-U7xfQh59EpbDDgv1oWPFf-v2MoII,2147
6
+ mcp_proxy_adapter/openapi.py,sha256=36vOEbJjGnVZR6hUhl6mHCD29HYOEFKo2bL0JdGSm-4,13952
7
+ mcp_proxy_adapter/version.py,sha256=7alALj2xnhN0mIeNQ1R7XRGv1R6iGUjP4UWziMB1Kys,75
8
+ mcp_proxy_adapter/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ mcp_proxy_adapter/api/app.py,sha256=pYrsDWhZAYoYbxujD0MGeOWdTnBUGueIGmZqeAbaB9A,27884
10
+ mcp_proxy_adapter/api/handlers.py,sha256=DcZT7MVBV33q-0EJ0iFqxE0VgBkFt6d_SqoRkntwyvc,8477
11
+ mcp_proxy_adapter/api/schemas.py,sha256=xOmiSwHaapY6myEFnLu7o-LWVPM7vwmLYZXFo2c6NfE,12381
12
+ mcp_proxy_adapter/api/tool_integration.py,sha256=MrtX7vUXCGBBuZuOs3C6EF67R_U_0xMfOmlmsAz-wuE,10245
13
+ mcp_proxy_adapter/api/tools.py,sha256=rRCRN2I8Odd2biBJZKByQS15rAWf0XwLRZEHDELc7Tg,8116
14
+ mcp_proxy_adapter/api/middleware/__init__.py,sha256=f3bUYU6iaPsVe1acsRHip0RgLhX3X2qjKWzgO-Ej998,2131
15
+ mcp_proxy_adapter/api/middleware/base.py,sha256=aMV9YPLHkUnJECuQWYbnlEGaj6xUJFHZR_hJb0OKvu8,2282
16
+ mcp_proxy_adapter/api/middleware/command_permission_middleware.py,sha256=sSdHTZ-ZxtcV3fJmcweB3sqlQivrYO_FO0H835jnPFA,5076
17
+ mcp_proxy_adapter/api/middleware/error_handling.py,sha256=avIZTjXj1sNOT3ekKtLAYJKM7V4duX0BF9PW-j18dEY,7134
18
+ mcp_proxy_adapter/api/middleware/factory.py,sha256=yDo7f4E-YL7qQZgGApyk8HZfLYOnrpsNx-Eh3fJBikE,8404
19
+ mcp_proxy_adapter/api/middleware/logging.py,sha256=VvUUX7bN4davCzFO6GYbN1O4sgJjOspV-EBLE3xpwpc,4730
20
+ mcp_proxy_adapter/api/middleware/performance.py,sha256=dHBxTF43LEGXMKHMH3A8ybKmwAWURd_zswqq_oC4xbw,2454
21
+ mcp_proxy_adapter/api/middleware/protocol_middleware.py,sha256=RwXBew04AatChvcmyuOOPCOkyJ2_RwCpnZWbKKn4XPM,5547
22
+ mcp_proxy_adapter/api/middleware/transport_middleware.py,sha256=Esy2gGKpEV5RoUTilr1YKKTDc5jh5RxsomD0VXyR2pE,4396
23
+ mcp_proxy_adapter/api/middleware/unified_security.py,sha256=32BWiQaFyWgEgdIlj-La_4GUgD180zB4jh1O7-DkHDE,5377
24
+ mcp_proxy_adapter/api/middleware/user_info_middleware.py,sha256=dQJWroIihEa5aZmrzrNAYE189K1Uy9OJyeOa9XpWaJk,2682
25
+ mcp_proxy_adapter/commands/__init__.py,sha256=r791wg4FKhWSi5rqA3vekDcGf5kr18pwF1woX-dnZKo,1525
26
+ mcp_proxy_adapter/commands/auth_validation_command.py,sha256=z612WJDVgZwaCrxdQhATwRc5i3qxH37MPuIV6SuZPn8,15083
27
+ mcp_proxy_adapter/commands/base.py,sha256=tunyrmt-LYJMQZslAZQor3KZvOrn1IYNpL5uOAnSdxc,15791
28
+ mcp_proxy_adapter/commands/builtin_commands.py,sha256=oloxk0itnY4Uy1a3ARXqHPm48RqkHxBbHqzXZ4bUGN8,3258
29
+ mcp_proxy_adapter/commands/catalog_manager.py,sha256=FVyF2Ky8DUmvFxjiem3YeC9ASFOzCZ9Lp2MsNobA1wI,34712
30
+ mcp_proxy_adapter/commands/cert_monitor_command.py,sha256=JWitmmHDeooWXt2fWLbcfAHDeHpsTL2AuBaoka7OWNE,24485
31
+ mcp_proxy_adapter/commands/certificate_management_command.py,sha256=4byTb1yCqTQCbNH_L4p_z3HithuugzI3a-H9gjiLDhg,24440
32
+ mcp_proxy_adapter/commands/command_registry.py,sha256=mPNhLnJ4L1lSyVzYXpUjeCBJkWIqEtlzpr9JcprHIf4,35260
33
+ mcp_proxy_adapter/commands/config_command.py,sha256=-Z6BGaEQTf859l56zZpHYBeZFeIVdpMYybDrd7LOPIg,3553
34
+ mcp_proxy_adapter/commands/dependency_container.py,sha256=Uz9OPRAUZN7tsVrMVgXgPQcsRD2N-e2Ixg9XarPOlnY,3410
35
+ mcp_proxy_adapter/commands/dependency_manager.py,sha256=lmY79MBkh-JRIPsYxSkdrUE9XHi4XBCbucaEMT0w6do,7683
36
+ mcp_proxy_adapter/commands/echo_command.py,sha256=R1oDNEAJSOIuODa4Nk3z4WJXhSxniNzaZtYHADlV310,2390
37
+ mcp_proxy_adapter/commands/health_command.py,sha256=uo6iND710oSUHEZm6ueT0TsKXRJKFbxUiVeSK57SBlE,4575
38
+ mcp_proxy_adapter/commands/help_command.py,sha256=PuanwvYmVs64DhB71gaI5rBRi_ozJ6x8afr18bRpTk4,13482
39
+ mcp_proxy_adapter/commands/hooks.py,sha256=Gu5TDSgA9EBHexWMWze8wgT63i6-dMEEwG8edWbrX3U,10060
40
+ mcp_proxy_adapter/commands/key_management_command.py,sha256=qin-iYXksIXOkZEfmJpclJSOyKaz9qRinj9uVa8hkdk,19339
41
+ mcp_proxy_adapter/commands/load_command.py,sha256=2zwPOCSBck6mr5KehyyH8lPRAqYYGeUeIIJdbxMSoZk,5984
42
+ mcp_proxy_adapter/commands/plugins_command.py,sha256=Te6YQH0ukJWIHAAEJE5DmdAilpjO1QMDa_PexhfQLH0,8531
43
+ mcp_proxy_adapter/commands/protocol_management_command.py,sha256=XSrNPGagopM4SinrSmNFW12KLng7-Oc9q6NpiInJ-QI,8485
44
+ mcp_proxy_adapter/commands/proxy_registration_command.py,sha256=yqPKgpv8oPP9mn1Blo-2VRVoWUpMcMJ29stqy2Di7hk,15394
45
+ mcp_proxy_adapter/commands/reload_command.py,sha256=6yJduQlIgXhtDSH4Q8qmfR8wZW1RVC1WT1eBIpxzCNo,7507
46
+ mcp_proxy_adapter/commands/result.py,sha256=9iFyoRRZ17q3d822XTMNyqnBvWypyoyV0NiHtM2bCd4,5604
47
+ mcp_proxy_adapter/commands/role_test_command.py,sha256=Hr45vB3W8tg_GQ4FfKOEOxW10eEb-pApo2nOPjru61M,4281
48
+ mcp_proxy_adapter/commands/roles_management_command.py,sha256=JSMkW9-Hq9ncltUvBjolQdvSeTa1FY2hoU0oD2mBon4,22471
49
+ mcp_proxy_adapter/commands/security_command.py,sha256=zKTVtb8vL_DafRHtrLqC2Mhk_DjOQ-3YwhIUh8NXJfQ,18206
50
+ mcp_proxy_adapter/commands/settings_command.py,sha256=hTBrFRABJDFYwnDf2ryfqoejUe06fM4XMOoiH0Exdyo,6407
51
+ mcp_proxy_adapter/commands/ssl_setup_command.py,sha256=wCWF7VhAB21m1FF7uR7r1mG1uLu6bFkfTfpHINM7LGI,13101
52
+ mcp_proxy_adapter/commands/token_management_command.py,sha256=7sl_fRUjWMRuP7NXoLjpLTB9wEg_aZU9dp5Ji9hbThA,18147
53
+ mcp_proxy_adapter/commands/transport_management_command.py,sha256=yv2lqUqJliYGIbYW7t0HQTrt5Cu2Y02rUjVzdznLtPk,4692
54
+ mcp_proxy_adapter/commands/unload_command.py,sha256=mhRZ23sJtTwUfWkjZzH8KDRpwxUX0kdu8LbAXAURRJc,5079
55
+ mcp_proxy_adapter/core/__init__.py,sha256=Ch50cV5Nd8m-HO9rMnVModajjwDK-OdUy7hxISDFkAM,800
56
+ mcp_proxy_adapter/core/app_factory.py,sha256=Xwyz40GNOWWa7ThArweawNBY4WI4bEI3_cj251mLHCM,17797
57
+ mcp_proxy_adapter/core/app_runner.py,sha256=JPpx9rKmaHAVdFnHRl2rXycptQkTSQ13Er7Qf1KZIA4,10614
58
+ mcp_proxy_adapter/core/auth_validator.py,sha256=lJxBVkoQWSk5CNtnPYMEJSsz4FhcXK-gB5QJ_OP9jEE,20937
59
+ mcp_proxy_adapter/core/certificate_utils.py,sha256=7VOhjRcygCToYgPTUt_MgcNILdpRBRBNZSFpeS_QrfA,39541
60
+ mcp_proxy_adapter/core/client.py,sha256=YxtaHvMoqKcjWJ-2mf2FH22wUGWUZjXMEKPqxypNOPE,21340
61
+ mcp_proxy_adapter/core/client_manager.py,sha256=sKEhapMpogqb54WIWEpz2bMjrX3wvYooX-a844IfCTU,9164
62
+ mcp_proxy_adapter/core/client_security.py,sha256=8isHpvv-7H85QzI8K3Pfyr_KdvpE2xYyIT4wqWrttNU,13575
63
+ mcp_proxy_adapter/core/config_converter.py,sha256=FAA2zx-yRgqMgzg73o9Aq5CEEfodNCeaA8Yluto4wAs,16985
64
+ mcp_proxy_adapter/core/config_validator.py,sha256=qDVmkRatuDeWylIPLjMq02Vpzff6DDTE_CstpzqGi7o,7773
65
+ mcp_proxy_adapter/core/errors.py,sha256=s34OxiIR4NCJu_pYSigKXqrIvRjUUK2OWw0X4dpDjIA,5151
66
+ mcp_proxy_adapter/core/logging.py,sha256=jQlFz52Xwapef6UD4p0acmaGFumD9XuexwW4frDN_ZM,9626
67
+ mcp_proxy_adapter/core/mtls_asgi.py,sha256=X2lAj3wk3L85amRCp_-10sqvZa5wJf_diXhwrrQReSo,5311
68
+ mcp_proxy_adapter/core/mtls_asgi_app.py,sha256=VeolP08TTaqYU5fGeaZexj6EBWBDugoVrEGXzJW4PuM,6406
69
+ mcp_proxy_adapter/core/protocol_manager.py,sha256=a3-JiCWLDUejg0MAdfmi5xQ5TZrCMqLfV1tKVUiRe38,13174
70
+ mcp_proxy_adapter/core/proxy_client.py,sha256=shP373Yelz7Fja22U6XnH0kT9XtPtWEFwOFlYFO97gw,22511
71
+ mcp_proxy_adapter/core/proxy_registration.py,sha256=87ko1vw61nHJGo0-xrObXiyQhrYK2K6nKr8rXID-j8c,19424
72
+ mcp_proxy_adapter/core/role_utils.py,sha256=wMoTVz3gF5fM7jozNMwsEwPkp1tui26M-t_KH1Oz8gs,12880
73
+ mcp_proxy_adapter/core/security_adapter.py,sha256=wZ3OH1WzhUdpN8N8CrGJSFFVNi474DqdazIqQ1T8PN4,13343
74
+ mcp_proxy_adapter/core/security_factory.py,sha256=4r7qvBq30XfosGD_b1ZHyNVLN8rOQ3NAKuaCOCEK8jA,8262
75
+ mcp_proxy_adapter/core/security_integration.py,sha256=yAAgL9Y7-VUMPhOLbDpBT2rRHDmmUWv1xolBrxbX29o,13601
76
+ mcp_proxy_adapter/core/server_adapter.py,sha256=8dhUlLxuYjaoNgMHieFCFgDRjxskP--Y5uoAhbN6RLw,9823
77
+ mcp_proxy_adapter/core/server_engine.py,sha256=SFENSDrVMlBD--HgKSRVklhrtLKSRSZhs_3UHxFCGbg,9540
78
+ mcp_proxy_adapter/core/settings.py,sha256=ZfUnmqD1tjAuaQo2VAF8evC1oHUit7gTu4WkTF0IMYI,10628
79
+ mcp_proxy_adapter/core/ssl_utils.py,sha256=_2mhpuoiRpSbUBifnQvtuziQfBRrXQUKtB58ALWTaqU,8220
80
+ mcp_proxy_adapter/core/transport_manager.py,sha256=ppcgjO-7Ulrk1ovlzlXVM89Iw4VOGA3awKgLf7FFAJ0,9518
81
+ mcp_proxy_adapter/core/unified_config_adapter.py,sha256=cpN_VrliIFGDH3JsfRkTlFdQvLcmuMYYedq0QEzlb0Y,22857
82
+ mcp_proxy_adapter/core/utils.py,sha256=ly8Ttg2v1OBukThJLxudRvmttU1hxJFLJUfat4b2dOI,3268
83
+ mcp_proxy_adapter/examples/__init__.py,sha256=vmf512vnxGHNoHQVJOEoLQ3pFZYO2P7Owhf4ot_c7SE,449
84
+ mcp_proxy_adapter/examples/create_certificates_simple.py,sha256=2KS-s3amvAqasvdh-cxY7ARuFAHVjtbtr_EJF2SKVQ0,23221
85
+ mcp_proxy_adapter/examples/debug_request_state.py,sha256=x_H3NIlkmIS6lZimvEM6kCXxGdpgFw99Sdui8qa_qeU,4347
86
+ mcp_proxy_adapter/examples/debug_role_chain.py,sha256=33l2Tk5mrcnwPFwqm2NTHcrWaJrXUU2wxW2I6Y4uIg4,8344
87
+ mcp_proxy_adapter/examples/demo_client.py,sha256=inic-FP5qG8oQXUaCrtEhmhac_PDZ1pcxp-M1cxSzwA,10240
88
+ mcp_proxy_adapter/examples/generate_all_certificates.py,sha256=rgcwqIkQ1eDfEIRFRXGIOz-jOSS1w0GPBRhYvMl6Vjc,16948
89
+ mcp_proxy_adapter/examples/generate_certificates.py,sha256=KxsltDvO_qpN0MsRv6mCSog-gcEtI18ECyNzpNbKBVw,3672
90
+ mcp_proxy_adapter/examples/generate_certificates_and_tokens.py,sha256=J0qHm_BMY8RYqfuwf7V7xKsHcsRJx8E7x-8JxmW5sPw,15988
91
+ mcp_proxy_adapter/examples/generate_test_configs.py,sha256=RoasOwO1B6gFaP4b6PjFTKsLSX_saBDhrgNbarpTufI,7648
92
+ mcp_proxy_adapter/examples/proxy_registration_example.py,sha256=g59_QG2D1CCqhIXEvgy2XmgXI3toLmLyH7hL3uHZwC8,12647
93
+ mcp_proxy_adapter/examples/run_example.py,sha256=o8rcy9Xo0UuZG4MpKdex3pFWYdtAi6uW8dEBQE6Yzbw,2539
94
+ mcp_proxy_adapter/examples/run_security_tests.py,sha256=xUzsOwKEblZrPFFc-DDfQnWfID9nqGsCvb5VnHtVsT0,10703
95
+ mcp_proxy_adapter/examples/run_security_tests_fixed.py,sha256=fNQsbALf9548xJ0OGPKYx5Crzg1GbcL8CSh1x_oKu_A,10540
96
+ mcp_proxy_adapter/examples/security_test_client.py,sha256=eBy6pZ5Dhdo-qi_7Fk-IWGHq7zAJA-om8RBuOep4XSs,28022
97
+ mcp_proxy_adapter/examples/setup_test_environment.py,sha256=erLnM5X4ys4wRl3u0wrnPJsy2luUPMfqxoyk6OZGNCU,7953
98
+ mcp_proxy_adapter/examples/test_config.py,sha256=1X9X8lNlWOcM1ZbIzteeMvLdgxnJEK_ev1BYTZiA9ws,6451
99
+ mcp_proxy_adapter/examples/test_config_generator.py,sha256=SBKL0bv-kUwUUbwrFVbxuA_6pDvK2573Jxm9wPiyI8s,3927
100
+ mcp_proxy_adapter/examples/test_examples.py,sha256=KH095FFEQDMKYZglclr5qy3cW__t3H8VX1l8dvCkQos,12132
101
+ mcp_proxy_adapter/examples/universal_client.py,sha256=IIKGRa0__KoWVla3VnVl-RjkkG_nPpM8vglPm70pV9c,26948
102
+ mcp_proxy_adapter/examples/basic_framework/__init__.py,sha256=XtgxpS3kKQFLDh4onP9XayNTDPzkaAbP0ExkTw9BLkk,184
103
+ mcp_proxy_adapter/examples/basic_framework/main.py,sha256=cDmqeUN1lDBBwuwLjmnP3qIyofCZ3Jr5Ct7Im-qCsUU,1728
104
+ mcp_proxy_adapter/examples/basic_framework/commands/__init__.py,sha256=_VQNLUEdsxUG-4yt9BZI_vtOxHAdGG0OUSsP6Wj-Vz4,76
105
+ mcp_proxy_adapter/examples/basic_framework/hooks/__init__.py,sha256=IE_EIXMnkdXuakZn7wLD9kBFyfDF5lYi56ejgiBeb-A,70
106
+ mcp_proxy_adapter/examples/commands/__init__.py,sha256=46FZSOABSeKPffw91JqIWL_UQD_RLL3nAR-ufgb2hr8,169
107
+ mcp_proxy_adapter/examples/full_application/__init__.py,sha256=EYSFAgAt4yfcafTFrfdSw_VwlSh7ec4Yk2sn5Z-cLb8,299
108
+ mcp_proxy_adapter/examples/full_application/main.py,sha256=Odw6pdjJkuJd5IhfwLDaRM11YH8Y1oQ_JmqPz_UIMGc,7355
109
+ mcp_proxy_adapter/examples/full_application/proxy_endpoints.py,sha256=-cpb0nIjzp6OltFHoZqrtFvb4wJf1dgT4WvQ2dcY6Bo,6045
110
+ mcp_proxy_adapter/examples/full_application/commands/__init__.py,sha256=yQHxVSFkAyFLUOdk42QOebUODPlQV9IbydPgF3UKsGM,217
111
+ mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py,sha256=u9_XOkoHkiFC-tn9B-yGUXfQi9OL0EDxlVVKSERI1wA,3099
112
+ mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py,sha256=fRWtegpUUVt4wWOz3yE3spMG4h1DM_xbSxg_WqlnbF0,3491
113
+ mcp_proxy_adapter/examples/full_application/hooks/__init__.py,sha256=ORG4cL8cSXEMmZ0CEPz75OVuwg54pdDm2GIBpP4dtcs,200
114
+ mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py,sha256=TYXuHI-KW_mH5r8mSKgNMJCr3moeEKrqC4Eex0U298k,3457
115
+ mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py,sha256=IaskSrckZS6bE3aGxSBL8aTj-iJTSI2ysfsFjhjncyM,2975
116
+ mcp_proxy_adapter-6.2.1.dist-info/METADATA,sha256=XlCYkwOYXSpXiOawdUWc6TV6Bpu8jQDF2_2H-1tx3nE,22047
117
+ mcp_proxy_adapter-6.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
118
+ mcp_proxy_adapter-6.2.1.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
119
+ mcp_proxy_adapter-6.2.1.dist-info/RECORD,,
@@ -1,285 +0,0 @@
1
- # Troubleshooting Guide
2
-
3
- This guide addresses common issues with MCP Proxy Adapter Framework, particularly related to ProtocolMiddleware and SSL/TLS configuration.
4
-
5
- ## Common Issues
6
-
7
- ### Issue 1: ProtocolMiddleware blocks HTTPS requests
8
-
9
- **Problem:** ProtocolMiddleware is initialized with default settings and doesn't update when SSL configuration changes.
10
-
11
- **Symptoms:**
12
- ```
13
- Protocol 'https' not allowed for request to /health
14
- INFO: 127.0.0.1:42038 - "GET /health HTTP/1.1" 403 Forbidden
15
- ```
16
-
17
- **Root Cause:** ProtocolMiddleware was created as a global instance with default settings and didn't update when SSL was enabled.
18
-
19
- **Solution:**
20
- 1. **Use updated ProtocolManager** (Fixed in v1.1.0):
21
- - ProtocolManager now dynamically updates based on SSL configuration
22
- - Automatically allows HTTPS when SSL is enabled
23
-
24
- 2. **Disable ProtocolMiddleware for HTTPS** (Temporary workaround):
25
- ```json
26
- {
27
- "server": {"host": "127.0.0.1", "port": 10004},
28
- "ssl": {"enabled": true, "cert_file": "./certs/server.crt", "key_file": "./certs/server.key"},
29
- "security": {"enabled": true, "auth": {"enabled": true, "methods": ["api_key"]}},
30
- "protocols": {"enabled": false}
31
- }
32
- ```
33
-
34
- ### Issue 2: SSL Configuration Conflicts
35
-
36
- **Problem:** Framework reads SSL configuration from both `ssl` (legacy) and `security.ssl` sections, causing confusion.
37
-
38
- **Symptoms:**
39
- ```
40
- 🔍 Debug: SSL config at start of validation: enabled=False
41
- 🔍 Debug: Root SSL section found: enabled=True
42
- 🔍 Debug: _get_ssl_config: security.ssl key_file=None
43
- 🔍 Debug: _get_ssl_config: legacy ssl key_file=./certs/server.key
44
- ```
45
-
46
- **Solution:**
47
- 1. **Use unified SSL configuration** (Recommended):
48
- ```json
49
- {
50
- "security": {
51
- "ssl": {
52
- "enabled": true,
53
- "cert_file": "./certs/server.crt",
54
- "key_file": "./certs/server.key"
55
- }
56
- }
57
- }
58
- ```
59
-
60
- 2. **Use legacy SSL configuration** (Backward compatible):
61
- ```json
62
- {
63
- "ssl": {
64
- "enabled": true,
65
- "cert_file": "./certs/server.crt",
66
- "key_file": "./certs/server.key"
67
- }
68
- }
69
- ```
70
-
71
- ### Issue 3: Security Framework Initialization Errors
72
-
73
- **Problem:** Security framework fails to initialize due to missing or null configuration values.
74
-
75
- **Symptoms:**
76
- ```
77
- Failed to initialize security components: Failed to load roles configuration: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'NoneType'
78
- ```
79
-
80
- **Solution:**
81
- 1. **Provide roles file** (If using roles):
82
- ```json
83
- {
84
- "security": {
85
- "permissions": {
86
- "enabled": true,
87
- "roles_file": "./roles.json"
88
- }
89
- }
90
- }
91
- ```
92
-
93
- 2. **Disable permissions** (If not using roles):
94
- ```json
95
- {
96
- "security": {
97
- "permissions": {
98
- "enabled": false
99
- }
100
- }
101
- }
102
- ```
103
-
104
- 3. **Use graceful fallback** (Fixed in v1.1.0):
105
- - Security framework now continues without roles if roles_file is null
106
- - Logs warning instead of crashing
107
-
108
- ## Configuration Examples
109
-
110
- ### HTTP Simple
111
- ```json
112
- {
113
- "server": {"host": "127.0.0.1", "port": 10001},
114
- "ssl": {"enabled": false},
115
- "security": {"enabled": false},
116
- "protocols": {"enabled": true, "allowed_protocols": ["http"]}
117
- }
118
- ```
119
-
120
- ### HTTPS Simple
121
- ```json
122
- {
123
- "server": {"host": "127.0.0.1", "port": 10002},
124
- "ssl": {"enabled": true, "cert_file": "./certs/server.crt", "key_file": "./certs/server.key"},
125
- "security": {"enabled": false},
126
- "protocols": {"enabled": true, "allowed_protocols": ["http", "https"]}
127
- }
128
- ```
129
-
130
- ### HTTPS with Token Auth
131
- ```json
132
- {
133
- "server": {"host": "127.0.0.1", "port": 10003},
134
- "ssl": {"enabled": true, "cert_file": "./certs/server.crt", "key_file": "./certs/server.key"},
135
- "security": {
136
- "enabled": true,
137
- "auth": {"enabled": true, "methods": ["api_key"]}
138
- },
139
- "protocols": {"enabled": true, "allowed_protocols": ["http", "https"]}
140
- }
141
- ```
142
-
143
- ### HTTPS without ProtocolMiddleware
144
- ```json
145
- {
146
- "server": {"host": "127.0.0.1", "port": 10004},
147
- "ssl": {"enabled": true, "cert_file": "./certs/server.crt", "key_file": "./certs/server.key"},
148
- "security": {
149
- "enabled": true,
150
- "auth": {"enabled": true, "methods": ["api_key"]}
151
- },
152
- "protocols": {"enabled": false}
153
- }
154
- ```
155
-
156
- ### mTLS Simple
157
- ```json
158
- {
159
- "server": {"host": "127.0.0.1", "port": 10005},
160
- "ssl": {
161
- "enabled": true,
162
- "cert_file": "./certs/server.crt",
163
- "key_file": "./certs/server.key",
164
- "ca_cert": "./certs/ca.crt",
165
- "verify_client": true
166
- },
167
- "security": {
168
- "enabled": true,
169
- "auth": {"enabled": true, "methods": ["certificate"]}
170
- },
171
- "protocols": {"enabled": true, "allowed_protocols": ["https", "mtls"]}
172
- }
173
- ```
174
-
175
- ## Testing Your Configuration
176
-
177
- ### Test HTTP
178
- ```bash
179
- curl http://127.0.0.1:10001/health
180
- ```
181
-
182
- ### Test HTTPS
183
- ```bash
184
- curl -k https://127.0.0.1:10002/health
185
- ```
186
-
187
- ### Test HTTPS with Auth
188
- ```bash
189
- curl -k -H "Authorization: Bearer your-api-key" https://127.0.0.1:10003/health
190
- ```
191
-
192
- ### Test mTLS
193
- ```bash
194
- curl -k --cert ./certs/client.crt --key ./certs/client.key https://127.0.0.1:10005/health
195
- ```
196
-
197
- ## Debugging
198
-
199
- ### Enable Debug Logging
200
- ```json
201
- {
202
- "logging": {
203
- "level": "DEBUG",
204
- "console_output": true
205
- }
206
- }
207
- ```
208
-
209
- ### Check Protocol Manager Status
210
- ```python
211
- from mcp_proxy_adapter.core.protocol_manager import get_protocol_manager
212
- from mcp_proxy_adapter.config import config
213
-
214
- pm = get_protocol_manager(config.get_all())
215
- print(f"Allowed protocols: {pm.get_allowed_protocols()}")
216
- print(f"Protocol info: {pm.get_protocol_info()}")
217
- ```
218
-
219
- ### Check SSL Configuration
220
- ```python
221
- from mcp_proxy_adapter.config import config
222
-
223
- ssl_config = config.get("ssl", {})
224
- security_ssl = config.get("security", {}).get("ssl", {})
225
- print(f"Legacy SSL: {ssl_config}")
226
- print(f"Security SSL: {security_ssl}")
227
- ```
228
-
229
- ## Migration Guide
230
-
231
- ### From Legacy to New Configuration
232
-
233
- **Old (Legacy):**
234
- ```json
235
- {
236
- "ssl": {"enabled": true, "cert_file": "./certs/server.crt", "key_file": "./certs/server.key"}
237
- }
238
- ```
239
-
240
- **New (Recommended):**
241
- ```json
242
- {
243
- "security": {
244
- "ssl": {"enabled": true, "cert_file": "./certs/server.crt", "key_file": "./certs/server.key"}
245
- }
246
- }
247
- ```
248
-
249
- ### Adding Protocol Management
250
-
251
- **Without Protocol Management:**
252
- ```json
253
- {
254
- "protocols": {"enabled": false}
255
- }
256
- ```
257
-
258
- **With Protocol Management:**
259
- ```json
260
- {
261
- "protocols": {
262
- "enabled": true,
263
- "allowed_protocols": ["http", "https"]
264
- }
265
- }
266
- ```
267
-
268
- ## Best Practices
269
-
270
- 1. **Use security.ssl instead of legacy ssl** for new configurations
271
- 2. **Disable ProtocolMiddleware** if you don't need protocol validation
272
- 3. **Provide roles_file** or disable permissions if using security framework
273
- 4. **Test configurations** before deploying to production
274
- 5. **Use debug logging** for troubleshooting
275
- 6. **Keep certificates and keys secure** and properly configured
276
-
277
- ## Support
278
-
279
- If you encounter issues not covered in this guide:
280
-
281
- 1. Check the logs for detailed error messages
282
- 2. Enable debug logging for more information
283
- 3. Verify certificate files exist and are readable
284
- 4. Test with simple configurations first
285
- 5. Report issues with full configuration and error logs