mcp-proxy-adapter 6.0.0__py3-none-any.whl → 6.1.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 (264) hide show
  1. mcp_proxy_adapter/api/app.py +174 -80
  2. mcp_proxy_adapter/api/handlers.py +16 -5
  3. mcp_proxy_adapter/api/middleware/__init__.py +9 -4
  4. mcp_proxy_adapter/api/middleware/command_permission_middleware.py +148 -0
  5. mcp_proxy_adapter/api/middleware/factory.py +36 -12
  6. mcp_proxy_adapter/api/middleware/protocol_middleware.py +32 -13
  7. mcp_proxy_adapter/api/middleware/unified_security.py +160 -0
  8. mcp_proxy_adapter/api/middleware/user_info_middleware.py +83 -0
  9. mcp_proxy_adapter/commands/__init__.py +7 -1
  10. mcp_proxy_adapter/commands/base.py +7 -4
  11. mcp_proxy_adapter/commands/builtin_commands.py +8 -2
  12. mcp_proxy_adapter/commands/command_registry.py +8 -0
  13. mcp_proxy_adapter/commands/echo_command.py +81 -0
  14. mcp_proxy_adapter/commands/help_command.py +21 -14
  15. mcp_proxy_adapter/commands/proxy_registration_command.py +326 -185
  16. mcp_proxy_adapter/commands/role_test_command.py +141 -0
  17. mcp_proxy_adapter/commands/security_command.py +488 -0
  18. mcp_proxy_adapter/commands/ssl_setup_command.py +2 -2
  19. mcp_proxy_adapter/commands/token_management_command.py +1 -1
  20. mcp_proxy_adapter/config.py +81 -21
  21. mcp_proxy_adapter/core/app_factory.py +326 -0
  22. mcp_proxy_adapter/core/client_security.py +384 -0
  23. mcp_proxy_adapter/core/logging.py +8 -3
  24. mcp_proxy_adapter/core/mtls_asgi.py +156 -0
  25. mcp_proxy_adapter/core/mtls_asgi_app.py +187 -0
  26. mcp_proxy_adapter/core/protocol_manager.py +139 -8
  27. mcp_proxy_adapter/core/proxy_client.py +602 -0
  28. mcp_proxy_adapter/core/proxy_registration.py +299 -47
  29. mcp_proxy_adapter/core/security_adapter.py +12 -15
  30. mcp_proxy_adapter/core/security_integration.py +285 -0
  31. mcp_proxy_adapter/core/server_adapter.py +345 -0
  32. mcp_proxy_adapter/core/server_engine.py +364 -0
  33. mcp_proxy_adapter/core/unified_config_adapter.py +579 -0
  34. mcp_proxy_adapter/docs/EN/TROUBLESHOOTING.md +285 -0
  35. mcp_proxy_adapter/docs/RU/TROUBLESHOOTING.md +285 -0
  36. mcp_proxy_adapter/examples/README.md +230 -97
  37. mcp_proxy_adapter/examples/README_EN.md +258 -0
  38. mcp_proxy_adapter/examples/SECURITY_TESTING.md +455 -0
  39. mcp_proxy_adapter/examples/basic_framework/configs/http_auth.json +37 -0
  40. mcp_proxy_adapter/examples/basic_framework/configs/http_simple.json +23 -0
  41. mcp_proxy_adapter/examples/basic_framework/configs/https_auth.json +43 -0
  42. mcp_proxy_adapter/examples/basic_framework/configs/https_no_protocol_middleware.json +36 -0
  43. mcp_proxy_adapter/examples/basic_framework/configs/https_simple.json +29 -0
  44. mcp_proxy_adapter/examples/basic_framework/configs/mtls_no_protocol_middleware.json +34 -0
  45. mcp_proxy_adapter/examples/basic_framework/configs/mtls_no_roles.json +39 -0
  46. mcp_proxy_adapter/examples/basic_framework/configs/mtls_simple.json +35 -0
  47. mcp_proxy_adapter/examples/basic_framework/configs/mtls_with_roles.json +45 -0
  48. mcp_proxy_adapter/examples/basic_framework/main.py +63 -0
  49. mcp_proxy_adapter/examples/basic_framework/roles.json +21 -0
  50. mcp_proxy_adapter/examples/cert_config.json +9 -0
  51. mcp_proxy_adapter/examples/certs/admin.crt +32 -0
  52. mcp_proxy_adapter/examples/certs/admin.key +52 -0
  53. mcp_proxy_adapter/examples/certs/admin_cert.pem +21 -0
  54. mcp_proxy_adapter/examples/certs/admin_key.pem +28 -0
  55. mcp_proxy_adapter/examples/certs/ca_cert.pem +23 -0
  56. mcp_proxy_adapter/examples/certs/ca_cert.srl +1 -0
  57. mcp_proxy_adapter/examples/certs/ca_key.pem +28 -0
  58. mcp_proxy_adapter/examples/certs/cert_config.json +9 -0
  59. mcp_proxy_adapter/examples/certs/client.crt +32 -0
  60. mcp_proxy_adapter/examples/certs/client.key +52 -0
  61. mcp_proxy_adapter/examples/certs/client_admin.crt +32 -0
  62. mcp_proxy_adapter/examples/certs/client_admin.key +52 -0
  63. mcp_proxy_adapter/examples/certs/client_user.crt +32 -0
  64. mcp_proxy_adapter/examples/certs/client_user.key +52 -0
  65. mcp_proxy_adapter/examples/certs/guest_cert.pem +21 -0
  66. mcp_proxy_adapter/examples/certs/guest_key.pem +28 -0
  67. mcp_proxy_adapter/examples/certs/mcp_proxy_adapter_ca_ca.crt +23 -0
  68. mcp_proxy_adapter/examples/certs/proxy_cert.pem +21 -0
  69. mcp_proxy_adapter/examples/certs/proxy_key.pem +28 -0
  70. mcp_proxy_adapter/examples/certs/readonly.crt +32 -0
  71. mcp_proxy_adapter/examples/certs/readonly.key +52 -0
  72. mcp_proxy_adapter/examples/certs/readonly_cert.pem +21 -0
  73. mcp_proxy_adapter/examples/certs/readonly_key.pem +28 -0
  74. mcp_proxy_adapter/examples/certs/server.crt +32 -0
  75. mcp_proxy_adapter/examples/certs/server.key +52 -0
  76. mcp_proxy_adapter/examples/certs/server_cert.pem +32 -0
  77. mcp_proxy_adapter/examples/certs/server_key.pem +52 -0
  78. mcp_proxy_adapter/examples/certs/test_ca_ca.crt +20 -0
  79. mcp_proxy_adapter/examples/certs/user.crt +32 -0
  80. mcp_proxy_adapter/examples/certs/user.key +52 -0
  81. mcp_proxy_adapter/examples/certs/user_cert.pem +21 -0
  82. mcp_proxy_adapter/examples/certs/user_key.pem +28 -0
  83. mcp_proxy_adapter/examples/client_configs/api_key_client.json +13 -0
  84. mcp_proxy_adapter/examples/client_configs/basic_auth_client.json +13 -0
  85. mcp_proxy_adapter/examples/client_configs/certificate_client.json +22 -0
  86. mcp_proxy_adapter/examples/client_configs/jwt_client.json +15 -0
  87. mcp_proxy_adapter/examples/client_configs/no_auth_client.json +9 -0
  88. mcp_proxy_adapter/examples/commands/__init__.py +1 -0
  89. mcp_proxy_adapter/examples/create_certificates_simple.py +307 -0
  90. mcp_proxy_adapter/examples/debug_request_state.py +144 -0
  91. mcp_proxy_adapter/examples/debug_role_chain.py +205 -0
  92. mcp_proxy_adapter/examples/demo_client.py +341 -0
  93. mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +99 -0
  94. mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +106 -0
  95. mcp_proxy_adapter/examples/full_application/configs/http_auth.json +37 -0
  96. mcp_proxy_adapter/examples/full_application/configs/http_simple.json +23 -0
  97. mcp_proxy_adapter/examples/full_application/configs/https_auth.json +39 -0
  98. mcp_proxy_adapter/examples/full_application/configs/https_simple.json +25 -0
  99. mcp_proxy_adapter/examples/full_application/configs/mtls_no_roles.json +39 -0
  100. mcp_proxy_adapter/examples/full_application/configs/mtls_with_roles.json +45 -0
  101. mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +97 -0
  102. mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +95 -0
  103. mcp_proxy_adapter/examples/full_application/main.py +138 -0
  104. mcp_proxy_adapter/examples/full_application/roles.json +21 -0
  105. mcp_proxy_adapter/examples/generate_all_certificates.py +429 -0
  106. mcp_proxy_adapter/examples/generate_certificates.py +121 -0
  107. mcp_proxy_adapter/examples/keys/ca_key.pem +28 -0
  108. mcp_proxy_adapter/examples/keys/mcp_proxy_adapter_ca_ca.key +28 -0
  109. mcp_proxy_adapter/examples/keys/test_ca_ca.key +28 -0
  110. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log +220 -0
  111. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.1 +1 -0
  112. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.2 +1 -0
  113. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.3 +1 -0
  114. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.4 +1 -0
  115. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.5 +1 -0
  116. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log +220 -0
  117. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.1 +1 -0
  118. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.2 +1 -0
  119. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.3 +1 -0
  120. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.4 +1 -0
  121. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.5 +1 -0
  122. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log +2 -0
  123. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.1 +1 -0
  124. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.2 +1 -0
  125. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.3 +1 -0
  126. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.4 +1 -0
  127. mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.5 +1 -0
  128. mcp_proxy_adapter/examples/proxy_registration_example.py +401 -0
  129. mcp_proxy_adapter/examples/roles.json +38 -0
  130. mcp_proxy_adapter/examples/run_example.py +81 -0
  131. mcp_proxy_adapter/examples/run_security_tests.py +326 -0
  132. mcp_proxy_adapter/examples/run_security_tests_fixed.py +300 -0
  133. mcp_proxy_adapter/examples/security_test_client.py +743 -0
  134. mcp_proxy_adapter/examples/server_configs/config_basic_http.json +204 -0
  135. mcp_proxy_adapter/examples/server_configs/config_http_token.json +238 -0
  136. mcp_proxy_adapter/examples/server_configs/config_https.json +215 -0
  137. mcp_proxy_adapter/examples/server_configs/config_https_token.json +231 -0
  138. mcp_proxy_adapter/examples/server_configs/config_mtls.json +215 -0
  139. mcp_proxy_adapter/examples/server_configs/config_proxy_registration.json +250 -0
  140. mcp_proxy_adapter/examples/server_configs/config_simple.json +46 -0
  141. mcp_proxy_adapter/examples/server_configs/roles.json +38 -0
  142. mcp_proxy_adapter/examples/test_config_generator.py +110 -0
  143. mcp_proxy_adapter/examples/test_examples.py +344 -0
  144. mcp_proxy_adapter/examples/universal_client.py +628 -0
  145. mcp_proxy_adapter/main.py +21 -10
  146. mcp_proxy_adapter/utils/config_generator.py +727 -0
  147. mcp_proxy_adapter/version.py +5 -2
  148. mcp_proxy_adapter-6.1.1.dist-info/METADATA +205 -0
  149. mcp_proxy_adapter-6.1.1.dist-info/RECORD +197 -0
  150. mcp_proxy_adapter-6.1.1.dist-info/entry_points.txt +2 -0
  151. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.1.1.dist-info}/licenses/LICENSE +2 -2
  152. mcp_proxy_adapter/api/middleware/auth.py +0 -146
  153. mcp_proxy_adapter/api/middleware/auth_adapter.py +0 -235
  154. mcp_proxy_adapter/api/middleware/mtls_adapter.py +0 -305
  155. mcp_proxy_adapter/api/middleware/mtls_middleware.py +0 -296
  156. mcp_proxy_adapter/api/middleware/rate_limit.py +0 -152
  157. mcp_proxy_adapter/api/middleware/rate_limit_adapter.py +0 -241
  158. mcp_proxy_adapter/api/middleware/roles_adapter.py +0 -365
  159. mcp_proxy_adapter/api/middleware/roles_middleware.py +0 -381
  160. mcp_proxy_adapter/api/middleware/security.py +0 -376
  161. mcp_proxy_adapter/api/middleware/token_auth_middleware.py +0 -261
  162. mcp_proxy_adapter/examples/__init__.py +0 -7
  163. mcp_proxy_adapter/examples/basic_server/README.md +0 -60
  164. mcp_proxy_adapter/examples/basic_server/__init__.py +0 -7
  165. mcp_proxy_adapter/examples/basic_server/basic_custom_settings.json +0 -39
  166. mcp_proxy_adapter/examples/basic_server/config.json +0 -70
  167. mcp_proxy_adapter/examples/basic_server/config_all_protocols.json +0 -54
  168. mcp_proxy_adapter/examples/basic_server/config_http.json +0 -70
  169. mcp_proxy_adapter/examples/basic_server/config_http_only.json +0 -52
  170. mcp_proxy_adapter/examples/basic_server/config_https.json +0 -58
  171. mcp_proxy_adapter/examples/basic_server/config_mtls.json +0 -58
  172. mcp_proxy_adapter/examples/basic_server/config_ssl.json +0 -46
  173. mcp_proxy_adapter/examples/basic_server/custom_settings_example.py +0 -238
  174. mcp_proxy_adapter/examples/basic_server/server.py +0 -114
  175. mcp_proxy_adapter/examples/custom_commands/README.md +0 -127
  176. mcp_proxy_adapter/examples/custom_commands/__init__.py +0 -27
  177. mcp_proxy_adapter/examples/custom_commands/advanced_hooks.py +0 -566
  178. mcp_proxy_adapter/examples/custom_commands/auto_commands/__init__.py +0 -6
  179. mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_echo_command.py +0 -103
  180. mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_info_command.py +0 -111
  181. mcp_proxy_adapter/examples/custom_commands/auto_commands/test_command.py +0 -105
  182. mcp_proxy_adapter/examples/custom_commands/catalog/commands/test_command.py +0 -129
  183. mcp_proxy_adapter/examples/custom_commands/config.json +0 -118
  184. mcp_proxy_adapter/examples/custom_commands/config_all_protocols.json +0 -46
  185. mcp_proxy_adapter/examples/custom_commands/config_https_only.json +0 -46
  186. mcp_proxy_adapter/examples/custom_commands/config_https_transport.json +0 -33
  187. mcp_proxy_adapter/examples/custom_commands/config_mtls_only.json +0 -46
  188. mcp_proxy_adapter/examples/custom_commands/config_mtls_transport.json +0 -33
  189. mcp_proxy_adapter/examples/custom_commands/config_single_transport.json +0 -33
  190. mcp_proxy_adapter/examples/custom_commands/custom_health_command.py +0 -169
  191. mcp_proxy_adapter/examples/custom_commands/custom_help_command.py +0 -215
  192. mcp_proxy_adapter/examples/custom_commands/custom_openapi_generator.py +0 -76
  193. mcp_proxy_adapter/examples/custom_commands/custom_settings.json +0 -96
  194. mcp_proxy_adapter/examples/custom_commands/custom_settings_manager.py +0 -241
  195. mcp_proxy_adapter/examples/custom_commands/data_transform_command.py +0 -135
  196. mcp_proxy_adapter/examples/custom_commands/echo_command.py +0 -122
  197. mcp_proxy_adapter/examples/custom_commands/full_help_response.json +0 -1
  198. mcp_proxy_adapter/examples/custom_commands/generated_openapi.json +0 -629
  199. mcp_proxy_adapter/examples/custom_commands/get_openapi.py +0 -103
  200. mcp_proxy_adapter/examples/custom_commands/hooks.py +0 -230
  201. mcp_proxy_adapter/examples/custom_commands/intercept_command.py +0 -123
  202. mcp_proxy_adapter/examples/custom_commands/loadable_commands/test_ignored.py +0 -129
  203. mcp_proxy_adapter/examples/custom_commands/manual_echo_command.py +0 -103
  204. mcp_proxy_adapter/examples/custom_commands/proxy_connection_manager.py +0 -278
  205. mcp_proxy_adapter/examples/custom_commands/server.py +0 -252
  206. mcp_proxy_adapter/examples/custom_commands/simple_openapi_server.py +0 -75
  207. mcp_proxy_adapter/examples/custom_commands/start_server_with_proxy_manager.py +0 -299
  208. mcp_proxy_adapter/examples/custom_commands/start_server_with_registration.py +0 -278
  209. mcp_proxy_adapter/examples/custom_commands/test_hooks.py +0 -176
  210. mcp_proxy_adapter/examples/custom_commands/test_openapi.py +0 -27
  211. mcp_proxy_adapter/examples/custom_commands/test_registry.py +0 -23
  212. mcp_proxy_adapter/examples/custom_commands/test_simple.py +0 -19
  213. mcp_proxy_adapter/examples/custom_project_example/README.md +0 -103
  214. mcp_proxy_adapter/examples/custom_project_example/README_EN.md +0 -103
  215. mcp_proxy_adapter/examples/deployment/README.md +0 -49
  216. mcp_proxy_adapter/examples/deployment/__init__.py +0 -7
  217. mcp_proxy_adapter/examples/deployment/config.development.json +0 -8
  218. mcp_proxy_adapter/examples/deployment/config.json +0 -29
  219. mcp_proxy_adapter/examples/deployment/config.production.json +0 -12
  220. mcp_proxy_adapter/examples/deployment/config.staging.json +0 -11
  221. mcp_proxy_adapter/examples/deployment/docker-compose.yml +0 -31
  222. mcp_proxy_adapter/examples/deployment/run.sh +0 -43
  223. mcp_proxy_adapter/examples/deployment/run_docker.sh +0 -84
  224. mcp_proxy_adapter/examples/simple_custom_commands/README.md +0 -149
  225. mcp_proxy_adapter/examples/simple_custom_commands/README_EN.md +0 -149
  226. mcp_proxy_adapter/schemas/base_schema.json +0 -114
  227. mcp_proxy_adapter/schemas/openapi_schema.json +0 -314
  228. mcp_proxy_adapter/schemas/roles_schema.json +0 -162
  229. mcp_proxy_adapter/tests/__init__.py +0 -0
  230. mcp_proxy_adapter/tests/api/__init__.py +0 -3
  231. mcp_proxy_adapter/tests/api/test_cmd_endpoint.py +0 -115
  232. mcp_proxy_adapter/tests/api/test_custom_openapi.py +0 -617
  233. mcp_proxy_adapter/tests/api/test_handlers.py +0 -522
  234. mcp_proxy_adapter/tests/api/test_middleware.py +0 -340
  235. mcp_proxy_adapter/tests/api/test_schemas.py +0 -546
  236. mcp_proxy_adapter/tests/api/test_tool_integration.py +0 -531
  237. mcp_proxy_adapter/tests/commands/__init__.py +0 -3
  238. mcp_proxy_adapter/tests/commands/test_config_command.py +0 -211
  239. mcp_proxy_adapter/tests/commands/test_echo_command.py +0 -127
  240. mcp_proxy_adapter/tests/commands/test_help_command.py +0 -136
  241. mcp_proxy_adapter/tests/conftest.py +0 -131
  242. mcp_proxy_adapter/tests/functional/__init__.py +0 -3
  243. mcp_proxy_adapter/tests/functional/test_api.py +0 -253
  244. mcp_proxy_adapter/tests/integration/__init__.py +0 -3
  245. mcp_proxy_adapter/tests/integration/test_cmd_integration.py +0 -129
  246. mcp_proxy_adapter/tests/integration/test_integration.py +0 -255
  247. mcp_proxy_adapter/tests/performance/__init__.py +0 -3
  248. mcp_proxy_adapter/tests/performance/test_performance.py +0 -189
  249. mcp_proxy_adapter/tests/stubs/__init__.py +0 -10
  250. mcp_proxy_adapter/tests/stubs/echo_command.py +0 -104
  251. mcp_proxy_adapter/tests/test_api_endpoints.py +0 -271
  252. mcp_proxy_adapter/tests/test_api_handlers.py +0 -289
  253. mcp_proxy_adapter/tests/test_base_command.py +0 -123
  254. mcp_proxy_adapter/tests/test_batch_requests.py +0 -117
  255. mcp_proxy_adapter/tests/test_command_registry.py +0 -281
  256. mcp_proxy_adapter/tests/test_config.py +0 -127
  257. mcp_proxy_adapter/tests/test_utils.py +0 -65
  258. mcp_proxy_adapter/tests/unit/__init__.py +0 -3
  259. mcp_proxy_adapter/tests/unit/test_base_command.py +0 -436
  260. mcp_proxy_adapter/tests/unit/test_config.py +0 -270
  261. mcp_proxy_adapter-6.0.0.dist-info/METADATA +0 -201
  262. mcp_proxy_adapter-6.0.0.dist-info/RECORD +0 -179
  263. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.1.1.dist-info}/WHEEL +0 -0
  264. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,204 @@
1
+ {
2
+ "server": {
3
+ "host": "0.0.0.0",
4
+ "port": 8000,
5
+ "debug": false,
6
+ "log_level": "INFO",
7
+ "workers": 1,
8
+ "reload": false
9
+ },
10
+ "security": {
11
+ "framework": "mcp_security_framework",
12
+ "enabled": false,
13
+ "debug": false,
14
+ "environment": "test",
15
+ "version": "1.0.0",
16
+
17
+ "ssl": {
18
+ "enabled": false,
19
+ "cert_file": null,
20
+ "key_file": null,
21
+ "ca_cert_file": null,
22
+ "client_cert_file": null,
23
+ "client_key_file": null,
24
+ "verify_mode": "CERT_NONE",
25
+ "min_tls_version": "TLSv1.2",
26
+ "max_tls_version": null,
27
+ "cipher_suite": null,
28
+ "check_hostname": false,
29
+ "check_expiry": false,
30
+ "expiry_warning_days": 30
31
+ },
32
+
33
+ "auth": {
34
+ "enabled": false,
35
+ "methods": [],
36
+ "api_keys": {},
37
+ "user_roles": {},
38
+ "jwt_secret": null,
39
+ "jwt_algorithm": "HS256",
40
+ "jwt_expiry_hours": 24,
41
+ "certificate_auth": false,
42
+ "certificate_roles_oid": "1.3.6.1.4.1.99999.1.1",
43
+ "certificate_permissions_oid": "1.3.6.1.4.1.99999.1.2",
44
+ "basic_auth": false,
45
+ "oauth2_config": null,
46
+ "public_paths": ["/health", "/docs", "/openapi.json"],
47
+ "security_headers": null
48
+ },
49
+
50
+ "certificates": {
51
+ "enabled": false,
52
+ "ca_cert_path": null,
53
+ "ca_key_path": null,
54
+ "cert_storage_path": "./certs",
55
+ "key_storage_path": "./keys",
56
+ "default_validity_days": 365,
57
+ "key_size": 2048,
58
+ "hash_algorithm": "sha256",
59
+ "crl_enabled": false,
60
+ "crl_path": null,
61
+ "crl_validity_days": 30,
62
+ "auto_renewal": false,
63
+ "renewal_threshold_days": 30
64
+ },
65
+
66
+ "permissions": {
67
+ "enabled": false,
68
+ "roles_file": null,
69
+ "default_role": "guest",
70
+ "admin_role": "admin",
71
+ "role_hierarchy": {},
72
+ "permission_cache_enabled": false,
73
+ "permission_cache_ttl": 300,
74
+ "wildcard_permissions": false,
75
+ "strict_mode": false,
76
+ "roles": {}
77
+ },
78
+
79
+ "rate_limit": {
80
+ "enabled": false,
81
+ "default_requests_per_minute": 60,
82
+ "default_requests_per_hour": 1000,
83
+ "burst_limit": 2,
84
+ "window_size_seconds": 60,
85
+ "storage_backend": "memory",
86
+ "redis_config": null,
87
+ "cleanup_interval": 300,
88
+ "exempt_paths": ["/health", "/docs", "/openapi.json"],
89
+ "exempt_roles": ["admin"]
90
+ },
91
+
92
+ "logging": {
93
+ "enabled": true,
94
+ "level": "INFO",
95
+ "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
96
+ "date_format": "%Y-%m-%d %H:%M:%S",
97
+ "file_path": null,
98
+ "max_file_size": 10,
99
+ "backup_count": 5,
100
+ "console_output": true,
101
+ "json_format": false,
102
+ "include_timestamp": true,
103
+ "include_level": true,
104
+ "include_module": true
105
+ }
106
+ },
107
+
108
+ "registration": {
109
+ "enabled": false,
110
+ "server_url": null,
111
+ "auth_method": "none",
112
+ "certificate": {
113
+ "enabled": false,
114
+ "cert_file": null,
115
+ "key_file": null,
116
+ "ca_cert_file": null,
117
+ "verify_server": false
118
+ },
119
+ "token": {
120
+ "enabled": false,
121
+ "token": null,
122
+ "token_type": "bearer",
123
+ "refresh_interval": 3600
124
+ },
125
+ "api_key": {
126
+ "enabled": false,
127
+ "key": null,
128
+ "key_header": "X-Proxy-API-Key"
129
+ },
130
+ "proxy_info": {
131
+ "name": "mcp_proxy_adapter",
132
+ "version": "1.0.0",
133
+ "description": "MCP Proxy Adapter - Basic HTTP",
134
+ "capabilities": ["jsonrpc", "rest"],
135
+ "endpoints": {
136
+ "jsonrpc": "/api/jsonrpc",
137
+ "rest": "/cmd",
138
+ "health": "/health"
139
+ }
140
+ },
141
+ "heartbeat": {
142
+ "enabled": false,
143
+ "interval": 300,
144
+ "timeout": 30,
145
+ "retry_attempts": 3,
146
+ "retry_delay": 60
147
+ },
148
+ "auto_discovery": {
149
+ "enabled": false,
150
+ "discovery_urls": [],
151
+ "discovery_interval": 3600,
152
+ "register_on_discovery": false
153
+ }
154
+ },
155
+
156
+ "logging": {
157
+ "level": "INFO",
158
+ "console_output": true,
159
+ "file_output": false,
160
+ "file_path": null,
161
+ "max_file_size": 10,
162
+ "backup_count": 5,
163
+ "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
164
+ },
165
+
166
+ "commands": {
167
+ "auto_discovery": true,
168
+ "commands_directory": "./commands",
169
+ "builtin_commands": ["echo", "health", "config"],
170
+ "custom_commands": [],
171
+ "command_timeout": 30
172
+ },
173
+
174
+ "hooks": {
175
+ "enabled": true,
176
+ "application_hooks": {
177
+ "on_startup": [],
178
+ "on_shutdown": [],
179
+ "before_request": [],
180
+ "after_request": [],
181
+ "on_error": []
182
+ },
183
+ "command_hooks": {
184
+ "before_echo_command": [],
185
+ "after_echo_command": [],
186
+ "before_health_command": [],
187
+ "after_health_command": [],
188
+ "before_config_command": [],
189
+ "after_config_command": []
190
+ }
191
+ },
192
+
193
+ "protocol": {
194
+ "jsonrpc": {
195
+ "enabled": true,
196
+ "version": "2.0",
197
+ "endpoint": "/api/jsonrpc"
198
+ },
199
+ "rest": {
200
+ "enabled": true,
201
+ "endpoint": "/cmd"
202
+ }
203
+ }
204
+ }
@@ -0,0 +1,238 @@
1
+ {
2
+ "server": {
3
+ "host": "0.0.0.0",
4
+ "port": 8001,
5
+ "debug": false,
6
+ "log_level": "INFO",
7
+ "workers": 1,
8
+ "reload": false
9
+ },
10
+ "security": {
11
+ "framework": "mcp_security_framework",
12
+ "enabled": true,
13
+ "debug": false,
14
+ "environment": "test",
15
+ "version": "1.0.0",
16
+
17
+ "ssl": {
18
+ "enabled": false,
19
+ "cert_file": null,
20
+ "key_file": null,
21
+ "ca_cert_file": null,
22
+ "client_cert_file": null,
23
+ "client_key_file": null,
24
+ "verify_mode": "CERT_NONE",
25
+ "min_tls_version": "TLSv1.2",
26
+ "max_tls_version": null,
27
+ "cipher_suite": null,
28
+ "check_hostname": false,
29
+ "check_expiry": false,
30
+ "expiry_warning_days": 30
31
+ },
32
+
33
+ "auth": {
34
+ "enabled": true,
35
+ "methods": ["api_key"],
36
+ "api_keys": {
37
+ "test-token-123": {
38
+ "roles": ["admin"],
39
+ "permissions": ["*"],
40
+ "expires": null
41
+ },
42
+ "user-token-456": {
43
+ "roles": ["user"],
44
+ "permissions": ["read", "execute"],
45
+ "expires": null
46
+ },
47
+ "readonly-token-123": {
48
+ "roles": ["readonly"],
49
+ "permissions": ["read"],
50
+ "expires": null
51
+ }
52
+ },
53
+ "user_roles": {
54
+ "admin": ["admin"],
55
+ "user": ["user"],
56
+ "readonly": ["readonly"],
57
+ "test": ["user"]
58
+ },
59
+ "jwt_secret": "test-jwt-secret-key-change-in-production",
60
+ "jwt_algorithm": "HS256",
61
+ "jwt_expiry_hours": 24,
62
+ "certificate_auth": false,
63
+ "certificate_roles_oid": "1.3.6.1.4.1.99999.1.1",
64
+ "certificate_permissions_oid": "1.3.6.1.4.1.99999.1.2",
65
+ "basic_auth": false,
66
+ "oauth2_config": null,
67
+ "public_paths": ["/health", "/docs", "/openapi.json"],
68
+ "security_headers": {
69
+ "X-Content-Type-Options": "nosniff",
70
+ "X-Frame-Options": "DENY",
71
+ "X-XSS-Protection": "1; mode=block"
72
+ }
73
+ },
74
+
75
+ "certificates": {
76
+ "enabled": false,
77
+ "ca_cert_path": null,
78
+ "ca_key_path": null,
79
+ "cert_storage_path": "./certs",
80
+ "key_storage_path": "./keys",
81
+ "default_validity_days": 365,
82
+ "key_size": 2048,
83
+ "hash_algorithm": "sha256",
84
+ "crl_enabled": false,
85
+ "crl_path": null,
86
+ "crl_validity_days": 30,
87
+ "auto_renewal": false,
88
+ "renewal_threshold_days": 30
89
+ },
90
+
91
+ "permissions": {
92
+ "enabled": true,
93
+ "roles_file": "./server_configs/roles.json",
94
+ "default_role": "guest",
95
+ "admin_role": "admin",
96
+ "role_hierarchy": {
97
+ "admin": ["user", "readonly", "guest"],
98
+ "user": ["readonly", "guest"],
99
+ "readonly": ["guest"]
100
+ },
101
+ "permission_cache_enabled": true,
102
+ "permission_cache_ttl": 300,
103
+ "wildcard_permissions": false,
104
+ "strict_mode": true,
105
+ "roles": {
106
+ "admin": ["*"],
107
+ "user": ["read", "write"],
108
+ "readonly": ["read"],
109
+ "guest": ["read"]
110
+ }
111
+ },
112
+
113
+ "rate_limit": {
114
+ "enabled": true,
115
+ "default_requests_per_minute": 60,
116
+ "default_requests_per_hour": 1000,
117
+ "burst_limit": 2,
118
+ "window_size_seconds": 60,
119
+ "storage_backend": "memory",
120
+ "redis_config": null,
121
+ "cleanup_interval": 300,
122
+ "exempt_paths": ["/health", "/docs", "/openapi.json"],
123
+ "exempt_roles": ["admin"]
124
+ },
125
+
126
+ "logging": {
127
+ "enabled": true,
128
+ "level": "INFO",
129
+ "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
130
+ "date_format": "%Y-%m-%d %H:%M:%S",
131
+ "file_path": "./logs/security.log",
132
+ "max_file_size": 10,
133
+ "backup_count": 5,
134
+ "console_output": true,
135
+ "json_format": false,
136
+ "include_timestamp": true,
137
+ "include_level": true,
138
+ "include_module": true
139
+ }
140
+ },
141
+
142
+ "registration": {
143
+ "enabled": false,
144
+ "server_url": null,
145
+ "auth_method": "none",
146
+ "certificate": {
147
+ "enabled": false,
148
+ "cert_file": null,
149
+ "key_file": null,
150
+ "ca_cert_file": null,
151
+ "verify_server": false
152
+ },
153
+ "token": {
154
+ "enabled": false,
155
+ "token": null,
156
+ "token_type": "bearer",
157
+ "refresh_interval": 3600
158
+ },
159
+ "api_key": {
160
+ "enabled": false,
161
+ "key": null,
162
+ "key_header": "X-Proxy-API-Key"
163
+ },
164
+ "proxy_info": {
165
+ "name": "mcp_proxy_adapter",
166
+ "version": "1.0.0",
167
+ "description": "MCP Proxy Adapter - HTTP with Token Auth",
168
+ "capabilities": ["jsonrpc", "rest", "security"],
169
+ "endpoints": {
170
+ "jsonrpc": "/api/jsonrpc",
171
+ "rest": "/cmd",
172
+ "health": "/health"
173
+ }
174
+ },
175
+ "heartbeat": {
176
+ "enabled": false,
177
+ "interval": 300,
178
+ "timeout": 30,
179
+ "retry_attempts": 3,
180
+ "retry_delay": 60
181
+ },
182
+ "auto_discovery": {
183
+ "enabled": false,
184
+ "discovery_urls": [],
185
+ "discovery_interval": 3600,
186
+ "register_on_discovery": false
187
+ }
188
+ },
189
+
190
+ "logging": {
191
+ "level": "INFO",
192
+ "console_output": true,
193
+ "file_output": true,
194
+ "file_path": "./logs/server.log",
195
+ "max_file_size": 10,
196
+ "backup_count": 5,
197
+ "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
198
+ },
199
+
200
+ "commands": {
201
+ "auto_discovery": true,
202
+ "commands_directory": "./commands",
203
+ "builtin_commands": ["echo", "health", "config"],
204
+ "custom_commands": [],
205
+ "command_timeout": 30
206
+ },
207
+
208
+ "hooks": {
209
+ "enabled": true,
210
+ "application_hooks": {
211
+ "on_startup": [],
212
+ "on_shutdown": [],
213
+ "before_request": [],
214
+ "after_request": [],
215
+ "on_error": []
216
+ },
217
+ "command_hooks": {
218
+ "before_echo_command": [],
219
+ "after_echo_command": [],
220
+ "before_health_command": [],
221
+ "after_health_command": [],
222
+ "before_config_command": [],
223
+ "after_config_command": []
224
+ }
225
+ },
226
+
227
+ "protocol": {
228
+ "jsonrpc": {
229
+ "enabled": true,
230
+ "version": "2.0",
231
+ "endpoint": "/api/jsonrpc"
232
+ },
233
+ "rest": {
234
+ "enabled": true,
235
+ "endpoint": "/cmd"
236
+ }
237
+ }
238
+ }
@@ -0,0 +1,215 @@
1
+ {
2
+ "server": {
3
+ "host": "0.0.0.0",
4
+ "port": 8443,
5
+ "debug": false,
6
+ "log_level": "INFO",
7
+ "workers": 1,
8
+ "reload": false
9
+ },
10
+ "ssl": {
11
+ "enabled": true,
12
+ "cert_file": "./mcp_proxy_adapter/examples/certs/server_cert.pem",
13
+ "key_file": "./mcp_proxy_adapter/examples/certs/server_key.pem",
14
+ "ca_cert": "./mcp_proxy_adapter/examples/certs/ca_cert.pem",
15
+ "verify_client": false,
16
+ "client_cert_required": false,
17
+ "cipher_suites": ["TLS_AES_256_GCM_SHA384", "TLS_CHACHA20_POLY1305_SHA256"],
18
+ "min_tls_version": "TLSv1.2",
19
+ "max_tls_version": "1.3"
20
+ },
21
+ "security": {
22
+ "framework": "mcp_security_framework",
23
+ "enabled": true,
24
+ "debug": false,
25
+ "environment": "test",
26
+ "version": "1.0.0",
27
+
28
+ "ssl": {
29
+ "enabled": true,
30
+ "cert_file": "./mcp_proxy_adapter/examples/certs/server_cert.pem",
31
+ "key_file": "./mcp_proxy_adapter/examples/certs/server_key.pem",
32
+ "ca_cert_file": "./mcp_proxy_adapter/examples/certs/ca_cert.pem",
33
+ "client_cert_file": null,
34
+ "client_key_file": null,
35
+ "verify_mode": "CERT_NONE",
36
+ "min_tls_version": "TLSv1.2",
37
+ "max_tls_version": null,
38
+ "cipher_suite": null,
39
+ "check_hostname": false,
40
+ "check_expiry": true,
41
+ "expiry_warning_days": 30
42
+ },
43
+
44
+ "auth": {
45
+ "enabled": false,
46
+ "methods": [],
47
+ "api_keys": {},
48
+ "user_roles": {},
49
+ "jwt_secret": null,
50
+ "jwt_algorithm": "HS256",
51
+ "jwt_expiry_hours": 24,
52
+ "certificate_auth": false,
53
+ "certificate_roles_oid": "1.3.6.1.4.1.99999.1.1",
54
+ "certificate_permissions_oid": "1.3.6.1.4.1.99999.1.2",
55
+ "basic_auth": false,
56
+ "oauth2_config": null,
57
+ "public_paths": ["/health", "/docs", "/openapi.json"],
58
+ "security_headers": {
59
+ "X-Content-Type-Options": "nosniff",
60
+ "X-Frame-Options": "DENY",
61
+ "X-XSS-Protection": "1; mode=block",
62
+ "Strict-Transport-Security": "max-age=31536000; includeSubDomains"
63
+ }
64
+ },
65
+
66
+ "certificates": {
67
+ "enabled": true,
68
+ "ca_cert_path": "./mcp_proxy_adapter/examples/certs/ca_cert.pem",
69
+ "ca_key_path": "./mcp_proxy_adapter/examples/keys/mcp_proxy_adapter_ca_ca.key",
70
+ "cert_storage_path": "./mcp_proxy_adapter/examples/certs",
71
+ "key_storage_path": "./mcp_proxy_adapter/examples/keys",
72
+ "default_validity_days": 365,
73
+ "key_size": 2048,
74
+ "hash_algorithm": "sha256",
75
+ "crl_enabled": false,
76
+ "crl_path": null,
77
+ "crl_validity_days": 30,
78
+ "auto_renewal": false,
79
+ "renewal_threshold_days": 30
80
+ },
81
+
82
+ "permissions": {
83
+ "enabled": false,
84
+ "roles_file": null,
85
+ "default_role": "guest",
86
+ "admin_role": "admin",
87
+ "role_hierarchy": {},
88
+ "permission_cache_enabled": false,
89
+ "permission_cache_ttl": 300,
90
+ "wildcard_permissions": false,
91
+ "strict_mode": false,
92
+ "roles": {}
93
+ },
94
+
95
+ "rate_limit": {
96
+ "enabled": false,
97
+ "default_requests_per_minute": 60,
98
+ "default_requests_per_hour": 1000,
99
+ "burst_limit": 2,
100
+ "window_size_seconds": 60,
101
+ "storage_backend": "memory",
102
+ "redis_config": null,
103
+ "cleanup_interval": 300,
104
+ "exempt_paths": ["/health", "/docs", "/openapi.json"],
105
+ "exempt_roles": ["admin"]
106
+ },
107
+
108
+ "logging": {
109
+ "enabled": true,
110
+ "level": "INFO",
111
+ "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
112
+ "date_format": "%Y-%m-%d %H:%M:%S",
113
+ "file_path": "./logs/security.log",
114
+ "max_file_size": 10,
115
+ "backup_count": 5,
116
+ "console_output": true,
117
+ "json_format": false,
118
+ "include_timestamp": true,
119
+ "include_level": true,
120
+ "include_module": true
121
+ }
122
+ },
123
+
124
+ "registration": {
125
+ "enabled": false,
126
+ "server_url": null,
127
+ "auth_method": "none",
128
+ "certificate": {
129
+ "enabled": false,
130
+ "cert_file": null,
131
+ "key_file": null,
132
+ "ca_cert_file": null,
133
+ "verify_server": false
134
+ },
135
+ "token": {
136
+ "enabled": false,
137
+ "token": null,
138
+ "token_type": "bearer",
139
+ "refresh_interval": 3600
140
+ },
141
+ "api_key": {
142
+ "enabled": false,
143
+ "key": null,
144
+ "key_header": "X-Proxy-API-Key"
145
+ },
146
+ "proxy_info": {
147
+ "name": "mcp_proxy_adapter",
148
+ "version": "1.0.0",
149
+ "description": "MCP Proxy Adapter - HTTPS",
150
+ "capabilities": ["jsonrpc", "rest", "ssl"],
151
+ "endpoints": {
152
+ "jsonrpc": "/api/jsonrpc",
153
+ "rest": "/cmd",
154
+ "health": "/health"
155
+ }
156
+ },
157
+ "heartbeat": {
158
+ "enabled": false,
159
+ "interval": 300,
160
+ "timeout": 30,
161
+ "retry_attempts": 3,
162
+ "retry_delay": 60
163
+ },
164
+ "auto_discovery": {
165
+ "enabled": false,
166
+ "discovery_urls": [],
167
+ "discovery_interval": 3600,
168
+ "register_on_discovery": false
169
+ }
170
+ },
171
+
172
+ "logging": {
173
+ "level": "INFO",
174
+ "console_output": true,
175
+ "file_output": true,
176
+ "file_path": "./logs/server.log",
177
+ "max_file_size": 10,
178
+ "backup_count": 5,
179
+ "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
180
+ },
181
+
182
+ "commands": {
183
+ "auto_discovery": true,
184
+ "commands_directory": "./commands",
185
+ "builtin_commands": ["echo", "health", "config"],
186
+ "custom_commands": [],
187
+ "command_timeout": 30
188
+ },
189
+
190
+ "hooks": {
191
+ "enabled": true,
192
+ "application_hooks": {
193
+ "on_startup": [],
194
+ "on_shutdown": [],
195
+ "before_request": [],
196
+ "after_request": [],
197
+ "on_error": []
198
+ },
199
+ "command_hooks": {
200
+ "before_echo_command": [],
201
+ "after_echo_command": [],
202
+ "before_health_command": [],
203
+ "after_health_command": [],
204
+ "before_config_command": [],
205
+ "after_config_command": []
206
+ }
207
+ },
208
+
209
+ "protocols": {
210
+ "enabled": true,
211
+ "allowed_protocols": ["http", "https"],
212
+ "default_protocol": "https",
213
+ "strict_mode": false
214
+ }
215
+ }