mcp-proxy-adapter 6.0.0__py3-none-any.whl → 6.0.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 (212) hide show
  1. mcp_proxy_adapter/__main__.py +27 -7
  2. mcp_proxy_adapter/api/app.py +209 -79
  3. mcp_proxy_adapter/api/handlers.py +16 -5
  4. mcp_proxy_adapter/api/middleware/__init__.py +14 -9
  5. mcp_proxy_adapter/api/middleware/command_permission_middleware.py +148 -0
  6. mcp_proxy_adapter/api/middleware/factory.py +36 -12
  7. mcp_proxy_adapter/api/middleware/protocol_middleware.py +84 -18
  8. mcp_proxy_adapter/api/middleware/unified_security.py +197 -0
  9. mcp_proxy_adapter/api/middleware/user_info_middleware.py +158 -0
  10. mcp_proxy_adapter/commands/__init__.py +7 -1
  11. mcp_proxy_adapter/commands/base.py +7 -4
  12. mcp_proxy_adapter/commands/builtin_commands.py +8 -2
  13. mcp_proxy_adapter/commands/command_registry.py +8 -0
  14. mcp_proxy_adapter/commands/echo_command.py +81 -0
  15. mcp_proxy_adapter/commands/health_command.py +1 -1
  16. mcp_proxy_adapter/commands/help_command.py +21 -14
  17. mcp_proxy_adapter/commands/proxy_registration_command.py +326 -185
  18. mcp_proxy_adapter/commands/role_test_command.py +141 -0
  19. mcp_proxy_adapter/commands/security_command.py +488 -0
  20. mcp_proxy_adapter/commands/ssl_setup_command.py +234 -351
  21. mcp_proxy_adapter/commands/token_management_command.py +1 -1
  22. mcp_proxy_adapter/config.py +323 -40
  23. mcp_proxy_adapter/core/app_factory.py +410 -0
  24. mcp_proxy_adapter/core/app_runner.py +272 -0
  25. mcp_proxy_adapter/core/certificate_utils.py +291 -73
  26. mcp_proxy_adapter/core/client.py +574 -0
  27. mcp_proxy_adapter/core/client_manager.py +284 -0
  28. mcp_proxy_adapter/core/client_security.py +384 -0
  29. mcp_proxy_adapter/core/logging.py +8 -3
  30. mcp_proxy_adapter/core/mtls_asgi.py +156 -0
  31. mcp_proxy_adapter/core/mtls_asgi_app.py +187 -0
  32. mcp_proxy_adapter/core/protocol_manager.py +169 -10
  33. mcp_proxy_adapter/core/proxy_client.py +602 -0
  34. mcp_proxy_adapter/core/proxy_registration.py +299 -47
  35. mcp_proxy_adapter/core/security_adapter.py +12 -15
  36. mcp_proxy_adapter/core/security_integration.py +286 -0
  37. mcp_proxy_adapter/core/server_adapter.py +282 -0
  38. mcp_proxy_adapter/core/server_engine.py +270 -0
  39. mcp_proxy_adapter/core/ssl_utils.py +13 -12
  40. mcp_proxy_adapter/core/transport_manager.py +5 -5
  41. mcp_proxy_adapter/core/unified_config_adapter.py +579 -0
  42. mcp_proxy_adapter/examples/__init__.py +13 -4
  43. mcp_proxy_adapter/examples/basic_framework/__init__.py +9 -0
  44. mcp_proxy_adapter/examples/basic_framework/commands/__init__.py +4 -0
  45. mcp_proxy_adapter/examples/basic_framework/hooks/__init__.py +4 -0
  46. mcp_proxy_adapter/examples/basic_framework/main.py +44 -0
  47. mcp_proxy_adapter/examples/commands/__init__.py +5 -0
  48. mcp_proxy_adapter/examples/create_certificates_simple.py +550 -0
  49. mcp_proxy_adapter/examples/debug_request_state.py +112 -0
  50. mcp_proxy_adapter/examples/debug_role_chain.py +158 -0
  51. mcp_proxy_adapter/examples/demo_client.py +275 -0
  52. mcp_proxy_adapter/examples/examples/basic_framework/__init__.py +9 -0
  53. mcp_proxy_adapter/examples/examples/basic_framework/commands/__init__.py +4 -0
  54. mcp_proxy_adapter/examples/examples/basic_framework/hooks/__init__.py +4 -0
  55. mcp_proxy_adapter/examples/examples/basic_framework/main.py +44 -0
  56. mcp_proxy_adapter/examples/examples/full_application/__init__.py +12 -0
  57. mcp_proxy_adapter/examples/examples/full_application/commands/__init__.py +7 -0
  58. mcp_proxy_adapter/examples/examples/full_application/commands/custom_echo_command.py +80 -0
  59. mcp_proxy_adapter/examples/examples/full_application/commands/dynamic_calculator_command.py +90 -0
  60. mcp_proxy_adapter/examples/examples/full_application/hooks/__init__.py +7 -0
  61. mcp_proxy_adapter/examples/examples/full_application/hooks/application_hooks.py +75 -0
  62. mcp_proxy_adapter/examples/examples/full_application/hooks/builtin_command_hooks.py +71 -0
  63. mcp_proxy_adapter/examples/examples/full_application/main.py +173 -0
  64. mcp_proxy_adapter/examples/examples/full_application/proxy_endpoints.py +154 -0
  65. mcp_proxy_adapter/examples/full_application/__init__.py +12 -0
  66. mcp_proxy_adapter/examples/full_application/commands/__init__.py +7 -0
  67. mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +80 -0
  68. mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +90 -0
  69. mcp_proxy_adapter/examples/full_application/hooks/__init__.py +7 -0
  70. mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +75 -0
  71. mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +71 -0
  72. mcp_proxy_adapter/examples/full_application/main.py +173 -0
  73. mcp_proxy_adapter/examples/full_application/proxy_endpoints.py +154 -0
  74. mcp_proxy_adapter/examples/generate_all_certificates.py +362 -0
  75. mcp_proxy_adapter/examples/generate_certificates.py +177 -0
  76. mcp_proxy_adapter/examples/generate_certificates_and_tokens.py +369 -0
  77. mcp_proxy_adapter/examples/generate_test_configs.py +331 -0
  78. mcp_proxy_adapter/examples/proxy_registration_example.py +334 -0
  79. mcp_proxy_adapter/examples/run_example.py +59 -0
  80. mcp_proxy_adapter/examples/run_full_test_suite.py +318 -0
  81. mcp_proxy_adapter/examples/run_proxy_server.py +146 -0
  82. mcp_proxy_adapter/examples/run_security_tests.py +544 -0
  83. mcp_proxy_adapter/examples/run_security_tests_fixed.py +247 -0
  84. mcp_proxy_adapter/examples/scripts/config_generator.py +740 -0
  85. mcp_proxy_adapter/examples/scripts/create_certificates_simple.py +560 -0
  86. mcp_proxy_adapter/examples/scripts/generate_certificates_and_tokens.py +369 -0
  87. mcp_proxy_adapter/examples/security_test_client.py +782 -0
  88. mcp_proxy_adapter/examples/setup_test_environment.py +328 -0
  89. mcp_proxy_adapter/examples/test_config.py +148 -0
  90. mcp_proxy_adapter/examples/test_config_generator.py +86 -0
  91. mcp_proxy_adapter/examples/test_examples.py +281 -0
  92. mcp_proxy_adapter/examples/universal_client.py +620 -0
  93. mcp_proxy_adapter/main.py +66 -148
  94. mcp_proxy_adapter/utils/config_generator.py +1008 -0
  95. mcp_proxy_adapter/version.py +5 -2
  96. mcp_proxy_adapter-6.0.1.dist-info/METADATA +679 -0
  97. mcp_proxy_adapter-6.0.1.dist-info/RECORD +140 -0
  98. mcp_proxy_adapter-6.0.1.dist-info/entry_points.txt +2 -0
  99. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.0.1.dist-info}/licenses/LICENSE +2 -2
  100. mcp_proxy_adapter/api/middleware/auth.py +0 -146
  101. mcp_proxy_adapter/api/middleware/auth_adapter.py +0 -235
  102. mcp_proxy_adapter/api/middleware/mtls_adapter.py +0 -305
  103. mcp_proxy_adapter/api/middleware/mtls_middleware.py +0 -296
  104. mcp_proxy_adapter/api/middleware/rate_limit.py +0 -152
  105. mcp_proxy_adapter/api/middleware/rate_limit_adapter.py +0 -241
  106. mcp_proxy_adapter/api/middleware/roles_adapter.py +0 -365
  107. mcp_proxy_adapter/api/middleware/roles_middleware.py +0 -381
  108. mcp_proxy_adapter/api/middleware/security.py +0 -376
  109. mcp_proxy_adapter/api/middleware/token_auth_middleware.py +0 -261
  110. mcp_proxy_adapter/examples/README.md +0 -124
  111. mcp_proxy_adapter/examples/basic_server/README.md +0 -60
  112. mcp_proxy_adapter/examples/basic_server/__init__.py +0 -7
  113. mcp_proxy_adapter/examples/basic_server/basic_custom_settings.json +0 -39
  114. mcp_proxy_adapter/examples/basic_server/config.json +0 -70
  115. mcp_proxy_adapter/examples/basic_server/config_all_protocols.json +0 -54
  116. mcp_proxy_adapter/examples/basic_server/config_http.json +0 -70
  117. mcp_proxy_adapter/examples/basic_server/config_http_only.json +0 -52
  118. mcp_proxy_adapter/examples/basic_server/config_https.json +0 -58
  119. mcp_proxy_adapter/examples/basic_server/config_mtls.json +0 -58
  120. mcp_proxy_adapter/examples/basic_server/config_ssl.json +0 -46
  121. mcp_proxy_adapter/examples/basic_server/custom_settings_example.py +0 -238
  122. mcp_proxy_adapter/examples/basic_server/server.py +0 -114
  123. mcp_proxy_adapter/examples/custom_commands/README.md +0 -127
  124. mcp_proxy_adapter/examples/custom_commands/__init__.py +0 -27
  125. mcp_proxy_adapter/examples/custom_commands/advanced_hooks.py +0 -566
  126. mcp_proxy_adapter/examples/custom_commands/auto_commands/__init__.py +0 -6
  127. mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_echo_command.py +0 -103
  128. mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_info_command.py +0 -111
  129. mcp_proxy_adapter/examples/custom_commands/auto_commands/test_command.py +0 -105
  130. mcp_proxy_adapter/examples/custom_commands/catalog/commands/test_command.py +0 -129
  131. mcp_proxy_adapter/examples/custom_commands/config.json +0 -118
  132. mcp_proxy_adapter/examples/custom_commands/config_all_protocols.json +0 -46
  133. mcp_proxy_adapter/examples/custom_commands/config_https_only.json +0 -46
  134. mcp_proxy_adapter/examples/custom_commands/config_https_transport.json +0 -33
  135. mcp_proxy_adapter/examples/custom_commands/config_mtls_only.json +0 -46
  136. mcp_proxy_adapter/examples/custom_commands/config_mtls_transport.json +0 -33
  137. mcp_proxy_adapter/examples/custom_commands/config_single_transport.json +0 -33
  138. mcp_proxy_adapter/examples/custom_commands/custom_health_command.py +0 -169
  139. mcp_proxy_adapter/examples/custom_commands/custom_help_command.py +0 -215
  140. mcp_proxy_adapter/examples/custom_commands/custom_openapi_generator.py +0 -76
  141. mcp_proxy_adapter/examples/custom_commands/custom_settings.json +0 -96
  142. mcp_proxy_adapter/examples/custom_commands/custom_settings_manager.py +0 -241
  143. mcp_proxy_adapter/examples/custom_commands/data_transform_command.py +0 -135
  144. mcp_proxy_adapter/examples/custom_commands/echo_command.py +0 -122
  145. mcp_proxy_adapter/examples/custom_commands/full_help_response.json +0 -1
  146. mcp_proxy_adapter/examples/custom_commands/generated_openapi.json +0 -629
  147. mcp_proxy_adapter/examples/custom_commands/get_openapi.py +0 -103
  148. mcp_proxy_adapter/examples/custom_commands/hooks.py +0 -230
  149. mcp_proxy_adapter/examples/custom_commands/intercept_command.py +0 -123
  150. mcp_proxy_adapter/examples/custom_commands/loadable_commands/test_ignored.py +0 -129
  151. mcp_proxy_adapter/examples/custom_commands/manual_echo_command.py +0 -103
  152. mcp_proxy_adapter/examples/custom_commands/proxy_connection_manager.py +0 -278
  153. mcp_proxy_adapter/examples/custom_commands/server.py +0 -252
  154. mcp_proxy_adapter/examples/custom_commands/simple_openapi_server.py +0 -75
  155. mcp_proxy_adapter/examples/custom_commands/start_server_with_proxy_manager.py +0 -299
  156. mcp_proxy_adapter/examples/custom_commands/start_server_with_registration.py +0 -278
  157. mcp_proxy_adapter/examples/custom_commands/test_hooks.py +0 -176
  158. mcp_proxy_adapter/examples/custom_commands/test_openapi.py +0 -27
  159. mcp_proxy_adapter/examples/custom_commands/test_registry.py +0 -23
  160. mcp_proxy_adapter/examples/custom_commands/test_simple.py +0 -19
  161. mcp_proxy_adapter/examples/custom_project_example/README.md +0 -103
  162. mcp_proxy_adapter/examples/custom_project_example/README_EN.md +0 -103
  163. mcp_proxy_adapter/examples/deployment/README.md +0 -49
  164. mcp_proxy_adapter/examples/deployment/__init__.py +0 -7
  165. mcp_proxy_adapter/examples/deployment/config.development.json +0 -8
  166. mcp_proxy_adapter/examples/deployment/config.json +0 -29
  167. mcp_proxy_adapter/examples/deployment/config.production.json +0 -12
  168. mcp_proxy_adapter/examples/deployment/config.staging.json +0 -11
  169. mcp_proxy_adapter/examples/deployment/docker-compose.yml +0 -31
  170. mcp_proxy_adapter/examples/deployment/run.sh +0 -43
  171. mcp_proxy_adapter/examples/deployment/run_docker.sh +0 -84
  172. mcp_proxy_adapter/examples/simple_custom_commands/README.md +0 -149
  173. mcp_proxy_adapter/examples/simple_custom_commands/README_EN.md +0 -149
  174. mcp_proxy_adapter/schemas/base_schema.json +0 -114
  175. mcp_proxy_adapter/schemas/openapi_schema.json +0 -314
  176. mcp_proxy_adapter/schemas/roles_schema.json +0 -162
  177. mcp_proxy_adapter/tests/__init__.py +0 -0
  178. mcp_proxy_adapter/tests/api/__init__.py +0 -3
  179. mcp_proxy_adapter/tests/api/test_cmd_endpoint.py +0 -115
  180. mcp_proxy_adapter/tests/api/test_custom_openapi.py +0 -617
  181. mcp_proxy_adapter/tests/api/test_handlers.py +0 -522
  182. mcp_proxy_adapter/tests/api/test_middleware.py +0 -340
  183. mcp_proxy_adapter/tests/api/test_schemas.py +0 -546
  184. mcp_proxy_adapter/tests/api/test_tool_integration.py +0 -531
  185. mcp_proxy_adapter/tests/commands/__init__.py +0 -3
  186. mcp_proxy_adapter/tests/commands/test_config_command.py +0 -211
  187. mcp_proxy_adapter/tests/commands/test_echo_command.py +0 -127
  188. mcp_proxy_adapter/tests/commands/test_help_command.py +0 -136
  189. mcp_proxy_adapter/tests/conftest.py +0 -131
  190. mcp_proxy_adapter/tests/functional/__init__.py +0 -3
  191. mcp_proxy_adapter/tests/functional/test_api.py +0 -253
  192. mcp_proxy_adapter/tests/integration/__init__.py +0 -3
  193. mcp_proxy_adapter/tests/integration/test_cmd_integration.py +0 -129
  194. mcp_proxy_adapter/tests/integration/test_integration.py +0 -255
  195. mcp_proxy_adapter/tests/performance/__init__.py +0 -3
  196. mcp_proxy_adapter/tests/performance/test_performance.py +0 -189
  197. mcp_proxy_adapter/tests/stubs/__init__.py +0 -10
  198. mcp_proxy_adapter/tests/stubs/echo_command.py +0 -104
  199. mcp_proxy_adapter/tests/test_api_endpoints.py +0 -271
  200. mcp_proxy_adapter/tests/test_api_handlers.py +0 -289
  201. mcp_proxy_adapter/tests/test_base_command.py +0 -123
  202. mcp_proxy_adapter/tests/test_batch_requests.py +0 -117
  203. mcp_proxy_adapter/tests/test_command_registry.py +0 -281
  204. mcp_proxy_adapter/tests/test_config.py +0 -127
  205. mcp_proxy_adapter/tests/test_utils.py +0 -65
  206. mcp_proxy_adapter/tests/unit/__init__.py +0 -3
  207. mcp_proxy_adapter/tests/unit/test_base_command.py +0 -436
  208. mcp_proxy_adapter/tests/unit/test_config.py +0 -270
  209. mcp_proxy_adapter-6.0.0.dist-info/METADATA +0 -201
  210. mcp_proxy_adapter-6.0.0.dist-info/RECORD +0 -179
  211. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.0.1.dist-info}/WHEEL +0 -0
  212. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.0.1.dist-info}/top_level.txt +0 -0
@@ -1,241 +0,0 @@
1
- """
2
- Custom Settings Manager Example
3
-
4
- This module demonstrates how to create a custom settings manager
5
- that extends the framework's settings system with application-specific settings.
6
- """
7
-
8
- import json
9
- import os
10
- from typing import Dict, Any, Optional
11
- from mcp_proxy_adapter.core.settings import (
12
- add_custom_settings,
13
- get_custom_settings,
14
- get_custom_setting_value,
15
- set_custom_setting_value
16
- )
17
- from mcp_proxy_adapter.core.logging import get_logger
18
-
19
-
20
- class CustomSettingsManager:
21
- """
22
- Custom settings manager for the extended server example.
23
-
24
- This class demonstrates how to:
25
- 1. Load custom settings from JSON files
26
- 2. Add them to the framework's settings system
27
- 3. Provide convenient access methods
28
- 4. Handle settings validation and defaults
29
- """
30
-
31
- def __init__(self, config_file: str = "custom_settings.json"):
32
- """
33
- Initialize the custom settings manager.
34
-
35
- Args:
36
- config_file: Path to custom settings JSON file
37
- """
38
- self.config_file = config_file
39
- self.logger = get_logger("custom_settings_manager")
40
- self._load_custom_settings()
41
-
42
- def _load_custom_settings(self) -> None:
43
- """Load custom settings from JSON file."""
44
- try:
45
- if os.path.exists(self.config_file):
46
- with open(self.config_file, 'r', encoding='utf-8') as f:
47
- custom_settings = json.load(f)
48
-
49
- self.logger.info(f"📁 Loaded custom settings from: {self.config_file}")
50
- self.logger.debug(f"📋 Custom settings: {custom_settings}")
51
-
52
- # Add to framework's settings system
53
- add_custom_settings(custom_settings)
54
-
55
- else:
56
- self.logger.warning(f"⚠️ Custom settings file not found: {self.config_file}")
57
- self.logger.info("📝 Using default custom settings")
58
-
59
- # Use default settings
60
- default_settings = self._get_default_settings()
61
- add_custom_settings(default_settings)
62
-
63
- except Exception as e:
64
- self.logger.error(f"❌ Failed to load custom settings: {e}")
65
- self.logger.info("📝 Using default custom settings")
66
-
67
- # Use default settings on error
68
- default_settings = self._get_default_settings()
69
- add_custom_settings(default_settings)
70
-
71
- def _get_default_settings(self) -> Dict[str, Any]:
72
- """Get default custom settings."""
73
- return {
74
- "application": {
75
- "name": "Extended MCP Proxy Server",
76
- "version": "2.0.0",
77
- "environment": "development"
78
- },
79
- "features": {
80
- "advanced_hooks": True,
81
- "custom_commands": True,
82
- "data_transformation": True,
83
- "command_interception": True,
84
- "performance_monitoring": False
85
- },
86
- "security": {
87
- "enable_authentication": False,
88
- "max_request_size": "10MB",
89
- "rate_limiting": {
90
- "enabled": False,
91
- "requests_per_minute": 100
92
- }
93
- },
94
- "monitoring": {
95
- "enable_metrics": True,
96
- "metrics_interval": 60,
97
- "health_check_interval": 30
98
- },
99
- "custom_commands": {
100
- "auto_echo": {
101
- "enabled": True,
102
- "max_length": 1000
103
- },
104
- "data_transform": {
105
- "enabled": True,
106
- "transform_types": ["uppercase", "lowercase", "reverse"]
107
- },
108
- "intercept": {
109
- "enabled": True,
110
- "bypass_conditions": ["input_value == 0"]
111
- }
112
- }
113
- }
114
-
115
- def get_application_name(self) -> str:
116
- """Get application name."""
117
- return get_custom_setting_value("application.name", "Extended MCP Proxy Server")
118
-
119
- def get_application_version(self) -> str:
120
- """Get application version."""
121
- return get_custom_setting_value("application.version", "2.0.0")
122
-
123
- def get_environment(self) -> str:
124
- """Get application environment."""
125
- return get_custom_setting_value("application.environment", "development")
126
-
127
- def is_feature_enabled(self, feature_name: str) -> bool:
128
- """Check if a feature is enabled."""
129
- return get_custom_setting_value(f"features.{feature_name}", False)
130
-
131
- def get_security_setting(self, setting_name: str, default: Any = None) -> Any:
132
- """Get security setting."""
133
- return get_custom_setting_value(f"security.{setting_name}", default)
134
-
135
- def get_monitoring_setting(self, setting_name: str, default: Any = None) -> Any:
136
- """Get monitoring setting."""
137
- return get_custom_setting_value(f"monitoring.{setting_name}", default)
138
-
139
- def get_custom_command_setting(self, command_name: str, setting_name: str, default: Any = None) -> Any:
140
- """Get custom command setting."""
141
- return get_custom_setting_value(f"custom_commands.{command_name}.{setting_name}", default)
142
-
143
- def set_custom_setting(self, key: str, value: Any) -> None:
144
- """Set a custom setting."""
145
- set_custom_setting_value(key, value)
146
- self.logger.info(f"🔧 Set custom setting: {key} = {value}")
147
-
148
- def get_all_custom_settings(self) -> Dict[str, Any]:
149
- """Get all custom settings."""
150
- return get_custom_settings()
151
-
152
- def reload_settings(self) -> None:
153
- """Reload custom settings from file."""
154
- self.logger.info("🔄 Reloading custom settings...")
155
- self._load_custom_settings()
156
- self.logger.info("✅ Custom settings reloaded")
157
-
158
- def validate_settings(self) -> Dict[str, Any]:
159
- """
160
- Validate current settings and return validation results.
161
-
162
- Returns:
163
- Dictionary with validation results
164
- """
165
- validation_results = {
166
- "valid": True,
167
- "errors": [],
168
- "warnings": []
169
- }
170
-
171
- # Validate required settings
172
- required_settings = [
173
- "application.name",
174
- "application.version",
175
- "features.advanced_hooks"
176
- ]
177
-
178
- for setting in required_settings:
179
- if get_custom_setting_value(setting) is None:
180
- validation_results["valid"] = False
181
- validation_results["errors"].append(f"Missing required setting: {setting}")
182
-
183
- # Validate feature dependencies
184
- if self.is_feature_enabled("data_transformation"):
185
- if not self.is_feature_enabled("custom_commands"):
186
- validation_results["warnings"].append(
187
- "data_transformation requires custom_commands to be enabled"
188
- )
189
-
190
- # Validate security settings
191
- if self.get_security_setting("enable_authentication"):
192
- if not self.get_security_setting("rate_limiting.enabled"):
193
- validation_results["warnings"].append(
194
- "Authentication enabled but rate limiting is disabled"
195
- )
196
-
197
- return validation_results
198
-
199
- def print_settings_summary(self) -> None:
200
- """Print a summary of current settings."""
201
- self.logger.info("📊 Custom Settings Summary:")
202
- self.logger.info(f" Application: {self.get_application_name()} v{self.get_application_version()}")
203
- self.logger.info(f" Environment: {self.get_environment()}")
204
-
205
- # Features
206
- features = []
207
- for feature in ["advanced_hooks", "custom_commands", "data_transformation", "command_interception"]:
208
- if self.is_feature_enabled(feature):
209
- features.append(feature)
210
-
211
- self.logger.info(f" Enabled Features: {', '.join(features) if features else 'None'}")
212
-
213
- # Security
214
- auth_enabled = self.get_security_setting("enable_authentication", False)
215
- rate_limiting = self.get_security_setting("rate_limiting.enabled", False)
216
- self.logger.info(f" Security: Auth={auth_enabled}, Rate Limiting={rate_limiting}")
217
-
218
- # Monitoring
219
- metrics_enabled = self.get_monitoring_setting("enable_metrics", False)
220
- self.logger.info(f" Monitoring: Metrics={metrics_enabled}")
221
-
222
-
223
- # Convenience functions for easy access
224
- def get_app_name() -> str:
225
- """Get application name."""
226
- return get_custom_setting_value("application.name", "Extended MCP Proxy Server")
227
-
228
-
229
- def is_feature_enabled(feature_name: str) -> bool:
230
- """Check if a feature is enabled."""
231
- return get_custom_setting_value(f"features.{feature_name}", False)
232
-
233
-
234
- def get_security_setting(setting_name: str, default: Any = None) -> Any:
235
- """Get security setting."""
236
- return get_custom_setting_value(f"security.{setting_name}", default)
237
-
238
-
239
- def get_monitoring_setting(setting_name: str, default: Any = None) -> Any:
240
- """Get monitoring setting."""
241
- return get_custom_setting_value(f"monitoring.{setting_name}", default)
@@ -1,135 +0,0 @@
1
- """
2
- Data Transform Command Example
3
-
4
- A command that demonstrates advanced hooks with data transformation.
5
- """
6
-
7
- from typing import Dict, Any, Optional
8
- from mcp_proxy_adapter.commands.base import Command
9
- from mcp_proxy_adapter.commands.result import CommandResult
10
-
11
-
12
- class DataTransformResult(CommandResult):
13
- """
14
- Result of the data transform command execution.
15
- """
16
-
17
- def __init__(self, original_data: Dict[str, Any], transformed_data: Dict[str, Any],
18
- processing_info: Dict[str, Any]):
19
- """
20
- Initialize data transform command result.
21
-
22
- Args:
23
- original_data: Original input data
24
- transformed_data: Transformed output data
25
- processing_info: Information about processing steps
26
- """
27
- self.original_data = original_data
28
- self.transformed_data = transformed_data
29
- self.processing_info = processing_info
30
-
31
- def to_dict(self) -> Dict[str, Any]:
32
- """
33
- Convert result to dictionary.
34
-
35
- Returns:
36
- Dict[str, Any]: Result as dictionary
37
- """
38
- return {
39
- "original_data": self.original_data,
40
- "transformed_data": self.transformed_data,
41
- "processing_info": self.processing_info,
42
- "command_type": "data_transform"
43
- }
44
-
45
- @classmethod
46
- def get_schema(cls) -> Dict[str, Any]:
47
- """
48
- Get JSON schema for the result.
49
-
50
- Returns:
51
- Dict[str, Any]: JSON schema
52
- """
53
- return {
54
- "type": "object",
55
- "properties": {
56
- "original_data": {"type": "object"},
57
- "transformed_data": {"type": "object"},
58
- "processing_info": {"type": "object"},
59
- "command_type": {"type": "string"}
60
- }
61
- }
62
-
63
-
64
- class DataTransformCommand(Command):
65
- """
66
- Data transform command for demonstrating advanced hooks.
67
- """
68
-
69
- name = "data_transform"
70
- result_class = DataTransformResult
71
-
72
- async def execute(self, data: Optional[Dict[str, Any]] = None,
73
- transform_type: Optional[str] = None, **kwargs) -> DataTransformResult:
74
- """
75
- Execute data transform command.
76
-
77
- Args:
78
- data: Input data to transform
79
- transform_type: Type of transformation to apply
80
- **kwargs: Additional parameters
81
-
82
- Returns:
83
- DataTransformResult: Data transform command result
84
- """
85
- # Get original data (may be modified by hooks)
86
- original_data = data or {}
87
- transform_type = transform_type or "default"
88
-
89
- # Apply transformation based on type
90
- if transform_type == "uppercase":
91
- transformed_data = {k: str(v).upper() for k, v in original_data.items()}
92
- elif transform_type == "lowercase":
93
- transformed_data = {k: str(v).lower() for k, v in original_data.items()}
94
- elif transform_type == "reverse":
95
- transformed_data = {k: str(v)[::-1] for k, v in original_data.items()}
96
- else:
97
- transformed_data = original_data.copy()
98
-
99
- # Add processing info
100
- processing_info = {
101
- "transform_type": transform_type,
102
- "input_keys": list(original_data.keys()),
103
- "output_keys": list(transformed_data.keys()),
104
- "hook_enhanced": kwargs.get("hook_enhanced", False),
105
- "data_modified": kwargs.get("data_modified", False)
106
- }
107
-
108
- return DataTransformResult(
109
- original_data=original_data,
110
- transformed_data=transformed_data,
111
- processing_info=processing_info
112
- )
113
-
114
- @classmethod
115
- def get_schema(cls) -> Dict[str, Any]:
116
- """
117
- Get JSON schema for command parameters.
118
-
119
- Returns:
120
- Dict[str, Any]: JSON schema
121
- """
122
- return {
123
- "type": "object",
124
- "properties": {
125
- "data": {
126
- "type": "object",
127
- "description": "Input data to transform"
128
- },
129
- "transform_type": {
130
- "type": "string",
131
- "enum": ["uppercase", "lowercase", "reverse", "default"],
132
- "description": "Type of transformation to apply"
133
- }
134
- }
135
- }
@@ -1,122 +0,0 @@
1
- """
2
- Echo Command Example
3
-
4
- A simple echo command that returns the input message.
5
- """
6
-
7
- from typing import Dict, Any, Optional
8
- from datetime import datetime
9
- from mcp_proxy_adapter.commands.base import Command
10
- from mcp_proxy_adapter.commands.result import SuccessResult
11
-
12
-
13
- class EchoResult(SuccessResult):
14
- """
15
- Result of the echo command execution.
16
- """
17
-
18
- def __init__(self, message: str, timestamp: str):
19
- """
20
- Initialize echo command result.
21
-
22
- Args:
23
- message: The echoed message
24
- timestamp: Timestamp of execution
25
- """
26
- super().__init__(
27
- data={
28
- "message": message,
29
- "timestamp": timestamp,
30
- "echoed": True
31
- }
32
- )
33
-
34
- @classmethod
35
- def get_schema(cls) -> Dict[str, Any]:
36
- """
37
- Get JSON schema for result validation.
38
-
39
- Returns:
40
- Dict[str, Any]: JSON schema
41
- """
42
- return {
43
- "type": "object",
44
- "properties": {
45
- "data": {
46
- "type": "object",
47
- "properties": {
48
- "message": {"type": "string"},
49
- "timestamp": {"type": "string"},
50
- "echoed": {"type": "boolean"}
51
- },
52
- "required": ["message", "timestamp", "echoed"]
53
- }
54
- },
55
- "required": ["data"]
56
- }
57
-
58
-
59
- class EchoCommand(Command):
60
- """
61
- Echo command that returns the input message.
62
- """
63
-
64
- name = "echo"
65
- result_class = EchoResult
66
-
67
- async def execute(self, message: Optional[str] = None, **kwargs) -> EchoResult:
68
- """
69
- Execute echo command.
70
-
71
- Args:
72
- message: Message to echo (optional)
73
- **kwargs: Additional parameters
74
-
75
- Returns:
76
- EchoResult: Echo command result
77
- """
78
- # Use provided message or default
79
- if message is None:
80
- message = kwargs.get("text", "Hello, World!")
81
-
82
- # Check if hook added timestamp
83
- hook_timestamp = kwargs.get("hook_timestamp")
84
- if hook_timestamp:
85
- # Use hook timestamp if available
86
- timestamp = hook_timestamp
87
- else:
88
- # Get current timestamp
89
- timestamp = datetime.now().isoformat()
90
-
91
- # Add hook metadata to result
92
- result = EchoResult(message=message, timestamp=timestamp)
93
-
94
- # Add hook information if available
95
- if kwargs.get("hook_processed"):
96
- result.data["hook_processed"] = True
97
- result.data["hook_timestamp"] = hook_timestamp
98
-
99
- return result
100
-
101
- @classmethod
102
- def get_schema(cls) -> Dict[str, Any]:
103
- """
104
- Get JSON schema for command parameters.
105
-
106
- Returns:
107
- Dict[str, Any]: JSON schema
108
- """
109
- return {
110
- "type": "object",
111
- "properties": {
112
- "message": {
113
- "type": "string",
114
- "description": "Message to echo",
115
- "default": "Hello, World!"
116
- },
117
- "text": {
118
- "type": "string",
119
- "description": "Alternative parameter name for message"
120
- }
121
- }
122
- }
@@ -1 +0,0 @@
1
- {"jsonrpc":"2.0","result":{"commands":{"echo":{"name":"echo","metadata":{"name":"echo","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Echo command that returns the input message.","description":"Echo command that returns the input message.","params":{"message":{"name":"message","required":false,"type":"typing.Optional[str]","default":null},"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"echo","params":{"kwargs":"..."},"description":"Call echo command with required parameters"},{"command":"echo","params":{"message":null,"kwargs":"..."},"description":"Call echo command with all parameters"}],"schema":{"type":"object","properties":{"message":{"type":"string","description":"Message to echo","default":"Hello, World!"},"text":{"type":"string","description":"Alternative parameter name for message"}}},"result_schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"},"timestamp":{"type":"string"},"echoed":{"type":"boolean"}},"required":["message","timestamp","echoed"]}},"required":["data"]},"result_class":"EchoResult"},"schema":{"type":"object","properties":{"message":{"type":"string","description":"Message to echo","default":"Hello, World!"},"text":{"type":"string","description":"Alternative parameter name for message"}}},"type":"custom"},"help":{"name":"help","metadata":{"name":"help","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Custom help command with enhanced functionality.","description":"Custom help command with enhanced functionality.","params":{"cmdname":{"name":"cmdname","required":false,"type":"typing.Optional[str]","default":null},"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"help","params":{"kwargs":"..."},"description":"Call help command with required parameters"},{"command":"help","params":{"cmdname":null,"kwargs":"..."},"description":"Call help command with all parameters"}],"schema":{"type":"object","properties":{"cmdname":{"type":"string","description":"Name of specific command to get help for"}}},"result_schema":{"type":"object","properties":{"cmdname":{"type":"string","description":"Name of the command"},"info":{"type":"object","properties":{"description":{"type":"string"},"summary":{"type":"string"},"params":{"type":"object"},"examples":{"type":"array"},"custom_help":{"type":"boolean"}}},"tool_info":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"custom_help":{"type":"boolean"}}},"help_usage":{"type":"object","properties":{"description":{"type":"string"},"examples":{"type":"array"}}},"commands":{"type":"object"},"total":{"type":"integer"},"custom_features":{"type":"object"}}},"result_class":"CustomHelpResult"},"schema":{"type":"object","properties":{"cmdname":{"type":"string","description":"Name of specific command to get help for"}}},"type":"custom"},"health":{"name":"health","metadata":{"name":"health","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Custom health command with enhanced system information.","description":"Custom health command with enhanced system information.","params":{"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"health","params":{"kwargs":"..."},"description":"Call health command with required parameters"}],"schema":{"type":"object","properties":{},"description":"Get enhanced system health information"},"result_schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string"},"version":{"type":"string"},"uptime":{"type":"number"},"components":{"type":"object"},"custom_metrics":{"type":"object"},"custom_health":{"type":"boolean"}},"required":["status","version","uptime","components","custom_metrics","custom_health"]}},"required":["data"]},"result_class":"CustomHealthResult"},"schema":{"type":"object","properties":{},"description":"Get enhanced system health information"},"type":"custom"},"data_transform":{"name":"data_transform","metadata":{"name":"data_transform","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Data transform command for demonstrating advanced hooks.","description":"Data transform command for demonstrating advanced hooks.","params":{"data":{"name":"data","required":false,"type":"typing.Optional[typing.Dict[str, typing.Any]]","default":null},"transform_type":{"name":"transform_type","required":false,"type":"typing.Optional[str]","default":null},"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"data_transform","params":{"kwargs":"..."},"description":"Call data_transform command with required parameters"},{"command":"data_transform","params":{"data":null,"transform_type":null,"kwargs":"..."},"description":"Call data_transform command with all parameters"}],"schema":{"type":"object","properties":{"data":{"type":"object","description":"Input data to transform"},"transform_type":{"type":"string","enum":["uppercase","lowercase","reverse","default"],"description":"Type of transformation to apply"}}},"result_schema":{"type":"object","properties":{"original_data":{"type":"object"},"transformed_data":{"type":"object"},"processing_info":{"type":"object"},"command_type":{"type":"string"}}},"result_class":"DataTransformResult"},"schema":{"type":"object","properties":{"data":{"type":"object","description":"Input data to transform"},"transform_type":{"type":"string","enum":["uppercase","lowercase","reverse","default"],"description":"Type of transformation to apply"}}},"type":"custom"},"intercept":{"name":"intercept","metadata":{"name":"intercept","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Intercept command for demonstrating hook interception.","description":"Intercept command for demonstrating hook interception.","params":{"action":{"name":"action","required":false,"type":"typing.Optional[str]","default":null},"bypass_flag":{"name":"bypass_flag","required":false,"type":"typing.Optional[int]","default":null},"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"intercept","params":{"kwargs":"..."},"description":"Call intercept command with required parameters"},{"command":"intercept","params":{"action":null,"bypass_flag":null,"kwargs":"..."},"description":"Call intercept command with all parameters"}],"schema":{"type":"object","properties":{"action":{"type":"string","description":"Action to perform"},"bypass_flag":{"type":"integer","enum":[0,1],"description":"Flag to determine execution (0 = bypass, 1 = execute)"}}},"result_schema":{"type":"object","properties":{"message":{"type":"string"},"executed":{"type":"boolean"},"intercept_reason":{"type":"string"},"hook_data":{"type":"object"},"command_type":{"type":"string"}}},"result_class":"InterceptResult"},"schema":{"type":"object","properties":{"action":{"type":"string","description":"Action to perform"},"bypass_flag":{"type":"integer","enum":[0,1],"description":"Flag to determine execution (0 = bypass, 1 = execute)"}}},"type":"custom"},"manual_echo":{"name":"manual_echo","metadata":{"name":"manual_echo","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Manually registered echo command.","description":"Manually registered echo command.","params":{"message":{"name":"message","required":false,"type":"typing.Optional[str]","default":null},"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"manual_echo","params":{"kwargs":"..."},"description":"Call manual_echo command with required parameters"},{"command":"manual_echo","params":{"message":null,"kwargs":"..."},"description":"Call manual_echo command with all parameters"}],"schema":{"type":"object","properties":{"message":{"type":"string","description":"Message to echo","default":"Hello from manually registered command!"}}},"result_schema":{"type":"object","properties":{"message":{"type":"string"},"manually_registered":{"type":"boolean"},"command_type":{"type":"string"}}},"result_class":"ManualEchoResult"},"schema":{"type":"object","properties":{"message":{"type":"string","description":"Message to echo","default":"Hello from manually registered command!"}}},"type":"custom"},"config":{"name":"config","metadata":{"name":"config","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Command for managing service configuration.","description":"Command for managing service configuration.","params":{"operation":{"name":"operation","required":false,"type":"<class 'str'>","default":"get"},"path":{"name":"path","required":false,"type":"<class 'str'>","default":null},"value":{"name":"value","required":false,"type":"typing.Any","default":null}},"examples":[{"command":"config","description":"Call config command without parameters"},{"command":"config","params":{"operation":"get","path":null,"value":null},"description":"Call config command with all parameters"}],"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["get","set"],"default":"get","description":"Operation to perform (get or set)"},"path":{"type":"string","description":"Configuration path in dot notation (e.g. 'server.host')"},"value":{"description":"Value to set (required for 'set' operation)"}},"required":["operation"],"additionalProperties":false},"result_schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"message":{"type":"string"}},"required":["success"]},"result_class":"ConfigResult"},"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["get","set"],"default":"get","description":"Operation to perform (get or set)"},"path":{"type":"string","description":"Configuration path in dot notation (e.g. 'server.host')"},"value":{"description":"Value to set (required for 'set' operation)"}},"required":["operation"],"additionalProperties":false},"type":"built-in"},"reload":{"name":"reload","metadata":{"name":"reload","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Command for reloading configuration and rediscovering commands.","description":"Command for reloading configuration and rediscovering commands.\nUses the unified initialization logic.","params":{"params":{"name":"params","required":true}},"examples":[{"command":"reload","params":{"params":"..."},"description":"Call reload command with required parameters"}],"schema":{"type":"object","properties":{"config_path":{"type":"string","description":"Path to configuration file to reload","default":null}},"additionalProperties":false},"result_schema":{},"result_class":null},"schema":{"type":"object","properties":{"config_path":{"type":"string","description":"Path to configuration file to reload","default":null}},"additionalProperties":false},"type":"built-in"},"settings":{"name":"settings","metadata":{"name":"settings","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Command for managing framework settings.","description":"Command for managing framework settings.","params":{"params":{"name":"params","required":true}},"examples":[{"command":"settings","params":{"params":"..."},"description":"Call settings command with required parameters"}],"schema":{"type":"object","properties":{"operation":{"type":"string","description":"Operation to perform","enum":["get","set","get_all","reload"],"default":"get_all"},"key":{"type":"string","description":"Configuration key in dot notation (e.g., 'server.host', 'custom.feature_enabled')"},"value":{"description":"Configuration value to set (for 'set' operation)"}},"required":["operation"],"additionalProperties":false},"result_schema":{},"result_class":null},"schema":{"type":"object","properties":{"operation":{"type":"string","description":"Operation to perform","enum":["get","set","get_all","reload"],"default":"get_all"},"key":{"type":"string","description":"Configuration key in dot notation (e.g., 'server.host', 'custom.feature_enabled')"},"value":{"description":"Configuration value to set (for 'set' operation)"}},"required":["operation"],"additionalProperties":false},"type":"built-in"},"load":{"name":"load","metadata":{"name":"load","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Command that loads commands from local path or URL.","description":"Command that loads commands from local path or URL.\n\nThis command allows dynamic loading of command modules from either local file system\nor remote HTTP/HTTPS URLs. The command automatically detects whether the source\nis a local path or URL and handles the loading accordingly.\n\nFor local paths, the command loads Python modules ending with '_command.py'.\nFor URLs, the command downloads the Python code and loads it as a temporary module.\n\nThe loaded commands are registered in the command registry and become immediately\navailable for execution. Only commands that inherit from the base Command class\nand are properly structured will be loaded and registered.\n\nSecurity considerations:\n- Local paths are validated for existence and proper naming\n- URLs are downloaded with timeout protection\n- Temporary files are automatically cleaned up after loading\n- Only files ending with '_command.py' are accepted\n\nExamples:\n- Load from local file: \"./my_command.py\"\n- Load from URL: \"https://example.com/remote_command.py\"","params":{"source":{"name":"source","required":true,"type":"<class 'str'>"},"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"load","params":{"source":"./custom_command.py"},"description":"Load a command from local file system"},{"command":"load","params":{"source":"https://raw.githubusercontent.com/user/repo/main/remote_command.py"},"description":"Load a command from GitHub raw content"},{"command":"load","params":{"source":"https://example.com/api/commands/test_command.py"},"description":"Load a command from remote API endpoint"}],"schema":{"type":"object","properties":{"source":{"type":"string","description":"Source path or URL to load command from (must end with '_command.py')","examples":["./my_command.py","https://example.com/remote_command.py"]}},"required":["source"]},"result_schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"},"commands_loaded":{"type":"integer"},"loaded_commands":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"error":{"type":"string"}},"required":["success","commands_loaded","loaded_commands","source"]}},"required":["data"]},"result_class":"LoadResult"},"schema":{"type":"object","properties":{"source":{"type":"string","description":"Source path or URL to load command from (must end with '_command.py')","examples":["./my_command.py","https://example.com/remote_command.py"]}},"required":["source"]},"type":"built-in"},"unload":{"name":"unload","metadata":{"name":"unload","version":"0.1","plugin":"","descr":"","category":"","author":"","email":"","source_url":"","summary":"Command that unloads loaded commands from registry.","description":"Command that unloads loaded commands from registry.\n\nThis command allows removal of dynamically loaded commands from the command registry.\nOnly commands that were loaded via the 'load' command or from the commands directory\ncan be unloaded. Built-in commands and custom commands registered with higher priority\ncannot be unloaded using this command.\n\nWhen a command is unloaded:\n- The command class is removed from the loaded commands registry\n- Any command instances are also removed\n- The command becomes unavailable for execution\n- Built-in and custom commands with the same name remain unaffected\n\nThis is useful for:\n- Removing outdated or problematic commands\n- Managing memory usage by unloading unused commands\n- Testing different versions of commands\n- Cleaning up temporary commands loaded for testing\n\nNote: Unloading a command does not affect other commands and does not require\na system restart. The command can be reloaded later if needed.","params":{"command_name":{"name":"command_name","required":true,"type":"<class 'str'>"},"kwargs":{"name":"kwargs","required":true}},"examples":[{"command":"unload","params":{"command_name":"test_command"},"description":"Unload a previously loaded test command"},{"command":"unload","params":{"command_name":"remote_command"},"description":"Unload a command that was loaded from URL"},{"command":"unload","params":{"command_name":"custom_command"},"description":"Unload a custom command loaded from local file"}],"schema":{"type":"object","properties":{"command_name":{"type":"string","description":"Name of the command to unload (must be a loaded command)"}},"required":["command_name"]},"result_schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"},"command_name":{"type":"string"},"error":{"type":"string"}},"required":["success","command_name"]}},"required":["data"]},"result_class":"UnloadResult"},"schema":{"type":"object","properties":{"command_name":{"type":"string","description":"Name of the command to unload (must be a loaded command)"}},"required":["command_name"]},"type":"built-in"},"plugins":{"name":"plugins","metadata":{"name":"plugins","summary":"Command that reads and displays available plugins from a plugins server","description":"\n Command that reads and displays available plugins from a plugins server.\n \n This command fetches a JSON file from a configured plugins server URL that contains\n a list of available plugins. Each plugin in the list typically contains metadata\n such as name, description, URL, version, and author information.\n \n The plugins server URL is configured in the system configuration under\n 'commands.plugins_server'. The JSON file should contain an array of plugin objects\n with the following structure:\n \n {\n \"plugins\": [\n {\n \"name\": \"plugin_name\",\n \"description\": \"Plugin description\",\n \"url\": \"https://server.com/plugin.py\",\n \"version\": \"1.0.0\",\n \"author\": \"Author Name\"\n }\n ]\n }\n \n This command is useful for:\n - Discovering available plugins without manually browsing the server\n - Getting metadata about plugins before loading them\n - Building plugin management interfaces\n - Checking plugin availability and versions\n \n The command will return the list of all available plugins along with their\n metadata, making it easy to choose which plugins to load.\n ","parameters":{},"examples":[{"command":"plugins","description":"Get list of available plugins from configured server"},{"command":"plugins","description":"Discover plugins without parameters"},{"command":"plugins","description":"Check plugin availability and metadata"}],"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"},"plugins_server":{"type":"string"},"plugins":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"version":{"type":"string"},"author":{"type":"string"}}}},"total_plugins":{"type":"integer"},"error":{"type":"string"}},"required":["success","plugins_server","plugins","total_plugins"]}},"required":["data"]}},"schema":{"type":"object","properties":{},"additionalProperties":false},"type":"built-in"},"transport_management":{"name":"transport_management","metadata":{"name":"transport_management","version":"0.1","plugin":"","descr":"Manage and query transport configurations (HTTP, HTTPS, MTLS)","category":"","author":"","email":"","source_url":"","summary":"Transport management command.","description":"Transport management command.\n\nThis command provides functionality to manage and query transport configurations.","params":{"params":{"name":"params","required":true}},"examples":[{"command":"transport_management","params":{"params":"..."},"description":"Call transport_management command with required parameters"}],"schema":{"type":"object","properties":{"action":{"type":"string","enum":["get_info","validate","reload"],"description":"Action to perform"}},"required":["action"]},"result_schema":{},"result_class":null},"schema":{"type":"object","properties":{"action":{"type":"string","enum":["get_info","validate","reload"],"description":"Action to perform"}},"required":["action"]},"type":"built-in"},"proxy_registration":{"name":"proxy_registration","error":"ProxyRegistrationCommand.get_schema() missing 1 required positional argument: 'self'","type":"built-in"}},"total":14,"custom_help":true,"custom_features":{"enhanced":true,"total_commands":14,"custom_commands":["echo","help","health"],"request_id":null,"hook_processed":false}},"id":15}