mcp-proxy-adapter 3.1.6__tar.gz → 4.0.0__tar.gz
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.
- {mcp_proxy_adapter-3.1.6/mcp_proxy_adapter.egg-info → mcp_proxy_adapter-4.0.0}/PKG-INFO +1 -1
- mcp_proxy_adapter-4.0.0/docs/EN/commands/reload_settings_command.md +183 -0
- mcp_proxy_adapter-4.0.0/docs/EN/commands/settings_command.md +298 -0
- mcp_proxy_adapter-4.0.0/docs/EN/development/HOOK_SYSTEM.md +346 -0
- mcp_proxy_adapter-4.0.0/docs/EN/development/settings_management.md +345 -0
- mcp_proxy_adapter-4.0.0/docs/RU/commands/reload_settings_command.md +183 -0
- mcp_proxy_adapter-4.0.0/docs/RU/commands/settings_command.md +298 -0
- mcp_proxy_adapter-4.0.0/docs/RU/development/HOOK_SYSTEM.md +346 -0
- mcp_proxy_adapter-4.0.0/docs/RU/development/settings_management.md +345 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/app.py +65 -27
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/handlers.py +1 -1
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/middleware/error_handling.py +11 -10
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/tool_integration.py +5 -2
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/tools.py +3 -3
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/base.py +19 -1
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/command_registry.py +243 -6
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/commands/hooks.py +260 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/commands/reload_command.py +211 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/commands/reload_settings_command.py +125 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/commands/settings_command.py +189 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/config.py +16 -1
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/core/__init__.py +44 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/core/logging.py +87 -34
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/core/settings.py +376 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/core/utils.py +2 -2
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/custom_openapi.py +81 -2
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/README.md +124 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/__init__.py +7 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/basic_server/README.md +60 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/basic_server/__init__.py +7 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/basic_server/basic_custom_settings.json +39 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/basic_server/config.json +35 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/basic_server/custom_settings_example.py +238 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/basic_server/server.py +98 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/README.md +127 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/__init__.py +27 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/advanced_hooks.py +250 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/auto_commands/__init__.py +6 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_echo_command.py +103 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_info_command.py +111 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/config.json +62 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/custom_health_command.py +169 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/custom_help_command.py +215 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/custom_openapi_generator.py +76 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/custom_settings.json +96 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/custom_settings_manager.py +241 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/data_transform_command.py +135 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/echo_command.py +122 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/hooks.py +230 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/intercept_command.py +123 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/manual_echo_command.py +103 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/server.py +223 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/custom_commands/test_hooks.py +176 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/README.md +49 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/__init__.py +7 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/config.development.json +8 -0
- {mcp_proxy_adapter-3.1.6/examples/basic_example → mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment}/config.json +11 -7
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/config.production.json +12 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/config.staging.json +11 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/docker-compose.yml +31 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/run.sh +43 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/examples/deployment/run_docker.sh +84 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/openapi.py +3 -2
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/tests/api/test_custom_openapi.py +617 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/tests/api/test_handlers.py +522 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/tests/api/test_schemas.py +546 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/tests/api/test_tool_integration.py +531 -0
- mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/tests/unit/test_base_command.py +436 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/version.py +1 -1
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0/mcp_proxy_adapter.egg-info}/PKG-INFO +1 -1
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter.egg-info/SOURCES.txt +98 -53
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter.egg-info/top_level.txt +0 -1
- mcp_proxy_adapter-4.0.0/pyproject.toml +153 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/requirements.txt +1 -4
- mcp_proxy_adapter-4.0.0/tests/api/test_app.py +355 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_app_extended.py +390 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_auth.py +471 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_error_handling.py +327 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_handlers_extended.py +330 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_middleware_base.py +246 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_middleware_logging.py +338 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_middleware_performance.py +267 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_openapi.py +356 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_rate_limit.py +106 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_schemas_extended.py +347 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_schemas_final.py +193 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_tool_integration.py +368 -0
- mcp_proxy_adapter-4.0.0/tests/api/test_tools.py +309 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_base_command_extended.py +490 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_base_command_final.py +806 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/commands/test_command_di.py +6 -8
- mcp_proxy_adapter-4.0.0/tests/commands/test_command_registry_extended.py +527 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_config_command_extended.py +252 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/commands/test_echo_command_di.py +15 -6
- mcp_proxy_adapter-4.0.0/tests/commands/test_health_command_extended.py +377 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_help_command.py +315 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_hooks.py +325 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_priority_commands.py +219 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_reload_commands_extended.py +453 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_result.py +404 -0
- mcp_proxy_adapter-4.0.0/tests/commands/test_settings_command_extended.py +300 -0
- mcp_proxy_adapter-4.0.0/tests/core/test_config.py +366 -0
- mcp_proxy_adapter-4.0.0/tests/core/test_errors.py +439 -0
- mcp_proxy_adapter-4.0.0/tests/core/test_logging.py +389 -0
- mcp_proxy_adapter-4.0.0/tests/core/test_settings_extended.py +557 -0
- mcp_proxy_adapter-4.0.0/tests/core/test_utils.py +326 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_advanced_hooks.py +297 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_auto_echo_command.py +198 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_auto_info_command.py +233 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_basic_server.py +279 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_custom_commands.py +212 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_custom_commands_hooks.py +449 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_custom_commands_server.py +262 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_custom_health_command.py +458 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_custom_help_command.py +359 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_custom_openapi_generator.py +320 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_custom_settings_manager.py +364 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_data_transform_command.py +267 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_echo_command.py +290 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_intercept_command.py +297 -0
- mcp_proxy_adapter-4.0.0/tests/examples/test_manual_echo_command.py +213 -0
- mcp_proxy_adapter-4.0.0/tests/test_custom_openapi_extended.py +297 -0
- mcp_proxy_adapter-3.1.6/examples/__init__.py +0 -19
- mcp_proxy_adapter-3.1.6/examples/anti_patterns/README.md +0 -51
- mcp_proxy_adapter-3.1.6/examples/anti_patterns/__init__.py +0 -9
- mcp_proxy_adapter-3.1.6/examples/anti_patterns/bad_design/README.md +0 -72
- mcp_proxy_adapter-3.1.6/examples/anti_patterns/bad_design/global_state.py +0 -170
- mcp_proxy_adapter-3.1.6/examples/anti_patterns/bad_design/monolithic_command.py +0 -272
- mcp_proxy_adapter-3.1.6/examples/basic_example/README.md +0 -245
- mcp_proxy_adapter-3.1.6/examples/basic_example/__init__.py +0 -8
- mcp_proxy_adapter-3.1.6/examples/basic_example/commands/__init__.py +0 -5
- mcp_proxy_adapter-3.1.6/examples/basic_example/commands/echo_command.py +0 -95
- mcp_proxy_adapter-3.1.6/examples/basic_example/commands/math_command.py +0 -151
- mcp_proxy_adapter-3.1.6/examples/basic_example/commands/time_command.py +0 -152
- mcp_proxy_adapter-3.1.6/examples/basic_example/docs/EN/README.md +0 -177
- mcp_proxy_adapter-3.1.6/examples/basic_example/docs/RU/README.md +0 -177
- mcp_proxy_adapter-3.1.6/examples/basic_example/server.py +0 -151
- mcp_proxy_adapter-3.1.6/examples/basic_example/tests/conftest.py +0 -243
- mcp_proxy_adapter-3.1.6/examples/check_vstl_schema.py +0 -106
- mcp_proxy_adapter-3.1.6/examples/commands/echo_command.py +0 -52
- mcp_proxy_adapter-3.1.6/examples/commands/echo_command_di.py +0 -152
- mcp_proxy_adapter-3.1.6/examples/commands/echo_result.py +0 -65
- mcp_proxy_adapter-3.1.6/examples/commands/get_date_command.py +0 -98
- mcp_proxy_adapter-3.1.6/examples/commands/new_uuid4_command.py +0 -91
- mcp_proxy_adapter-3.1.6/examples/complete_example/Dockerfile +0 -24
- mcp_proxy_adapter-3.1.6/examples/complete_example/README.md +0 -92
- mcp_proxy_adapter-3.1.6/examples/complete_example/__init__.py +0 -8
- mcp_proxy_adapter-3.1.6/examples/complete_example/commands/__init__.py +0 -5
- mcp_proxy_adapter-3.1.6/examples/complete_example/commands/system_command.py +0 -328
- mcp_proxy_adapter-3.1.6/examples/complete_example/config.json +0 -41
- mcp_proxy_adapter-3.1.6/examples/complete_example/configs/config.dev.yaml +0 -40
- mcp_proxy_adapter-3.1.6/examples/complete_example/configs/config.docker.yaml +0 -40
- mcp_proxy_adapter-3.1.6/examples/complete_example/docker-compose.yml +0 -35
- mcp_proxy_adapter-3.1.6/examples/complete_example/requirements.txt +0 -20
- mcp_proxy_adapter-3.1.6/examples/complete_example/server.py +0 -113
- mcp_proxy_adapter-3.1.6/examples/di_example/.pytest_cache/README.md +0 -8
- mcp_proxy_adapter-3.1.6/examples/di_example/server.py +0 -249
- mcp_proxy_adapter-3.1.6/examples/fix_vstl_help.py +0 -123
- mcp_proxy_adapter-3.1.6/examples/minimal_example/README.md +0 -65
- mcp_proxy_adapter-3.1.6/examples/minimal_example/__init__.py +0 -8
- mcp_proxy_adapter-3.1.6/examples/minimal_example/config.json +0 -14
- mcp_proxy_adapter-3.1.6/examples/minimal_example/main.py +0 -136
- mcp_proxy_adapter-3.1.6/examples/minimal_example/simple_server.py +0 -163
- mcp_proxy_adapter-3.1.6/examples/minimal_example/tests/conftest.py +0 -171
- mcp_proxy_adapter-3.1.6/examples/minimal_example/tests/test_hello_command.py +0 -111
- mcp_proxy_adapter-3.1.6/examples/minimal_example/tests/test_integration.py +0 -181
- mcp_proxy_adapter-3.1.6/examples/patch_vstl_service.py +0 -105
- mcp_proxy_adapter-3.1.6/examples/patch_vstl_service_mcp.py +0 -108
- mcp_proxy_adapter-3.1.6/examples/server.py +0 -69
- mcp_proxy_adapter-3.1.6/examples/simple_server.py +0 -128
- mcp_proxy_adapter-3.1.6/examples/test_package_3.1.4.py +0 -177
- mcp_proxy_adapter-3.1.6/examples/test_server.py +0 -134
- mcp_proxy_adapter-3.1.6/examples/tool_description_example.py +0 -82
- mcp_proxy_adapter-3.1.6/mcp_proxy_adapter/py.typed +0 -0
- mcp_proxy_adapter-3.1.6/mcp_proxy_adapter/tests/__init__.py +0 -0
- mcp_proxy_adapter-3.1.6/mcp_proxy_adapter/tests/unit/test_base_command.py +0 -130
- mcp_proxy_adapter-3.1.6/pyproject.toml +0 -70
- mcp_proxy_adapter-3.1.6/tests/commands/test_help_command.py +0 -202
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/LICENSE +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/MANIFEST.in +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/README.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/API_SCHEMA.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/AUTOMATED_PUBLISHING.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/BASIC_ARCHITECTURE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/COMMAND_CHECKLIST.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/COMMAND_RESULTS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/COMMAND_TEMPLATE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/CONFIGURATION_PRINCIPLES.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/DOCUMENTATION_MAP.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/DOCUMENTATION_STANDARDS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/ERROR_HANDLING.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/EXAMPLES_COMMAND_CLASSES.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/GLOSSARY.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/LOGGING_SYSTEM.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/NAMING_STANDARDS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/OPENAPI_SCHEMA.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/PROJECT_EXTENSION_GUIDE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/PROJECT_IDEOLOGY.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/PROJECT_RULES.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/PROJECT_STRUCTURE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/PUBLISHING_TO_PYPI.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/README.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/api/cmd_endpoint.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/api/errors.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/api/intro.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/api/requests.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/api/responses.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/commands/get_date_command.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/commands/help_command.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/commands/index.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/commands/new_uuid4_command.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/development/COMMAND_METADATA_ENHANCEMENT.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/development/DEPENDENCY_INJECTION.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/development/METADATA_COMMANDS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/development/OPENAPI_CUSTOMIZATION.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/development/REMOVE_COMMAND_GUIDE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/development/TOOL_INTEGRATION.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/development/architecture.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/examples/README.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/examples/anti_patterns.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/examples/basic_example.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/examples/complete_example.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/examples/minimal_example.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/testing/README.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/user/basic_usage.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/user/configuration.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/user/deployment.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/user/examples.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/EN/user/installation.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/API_SCHEMA.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/AUTOMATED_PUBLISHING.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/BASIC_ARCHITECTURE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/COMMAND_CHECKLIST.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/COMMAND_RESULTS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/COMMAND_TEMPLATE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/CONFIGURATION_PRINCIPLES.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/DOCUMENTATION_MAP.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/DOCUMENTATION_STANDARDS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/ERROR_HANDLING.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/EXAMPLES_COMMAND_CLASSES.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/GLOSSARY.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/LOGGING_SYSTEM.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/NAMING_STANDARDS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/OPENAPI_SCHEMA.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/PROJECT_EXTENSION_GUIDE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/PROJECT_IDEOLOGY.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/PROJECT_RULES.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/PROJECT_STRUCTURE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/PUBLISHING_TO_PYPI.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/README.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/api/cmd_endpoint.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/api/errors.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/api/intro.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/api/requests.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/api/responses.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/commands/get_date_command.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/commands/help_command.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/commands/index.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/commands/new_uuid4_command.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/COMMAND_METADATA_ENHANCEMENT.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/DEPENDENCY_INJECTION.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/METADATA_COMMANDS.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/OPENAPI_CUSTOMIZATION.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/PLAN_REALIZACII_METADATA.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/REMOVE_COMMAND_GUIDE.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/TOOL_INTEGRATION.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/development/architecture.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/examples/README.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/examples/anti_patterns.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/examples/basic_example.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/examples/complete_example.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/examples/minimal_example.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/testing/README.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/user/basic_usage.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/user/configuration.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/user/deployment.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/user/examples.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/docs/RU/user/installation.md +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/middleware/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/middleware/auth.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/middleware/base.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/middleware/logging.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/middleware/performance.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/middleware/rate_limit.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/api/schemas.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/config_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/dependency_container.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/health_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/help_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/commands/result.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/core/errors.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/schemas/base_schema.json +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/schemas/openapi_schema.json +0 -0
- {mcp_proxy_adapter-3.1.6/mcp_proxy_adapter/core → mcp_proxy_adapter-4.0.0/mcp_proxy_adapter/tests}/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/api/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/api/test_cmd_endpoint.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/api/test_middleware.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/commands/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/commands/test_config_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/commands/test_echo_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/commands/test_help_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/conftest.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/functional/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/functional/test_api.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/integration/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/integration/test_cmd_integration.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/integration/test_integration.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/performance/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/performance/test_performance.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/stubs/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/stubs/echo_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/test_api_endpoints.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/test_api_handlers.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/test_base_command.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/test_batch_requests.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/test_command_registry.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/test_config.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/test_utils.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/unit/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter/tests/unit/test_config.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter.egg-info/dependency_links.txt +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/mcp_proxy_adapter.egg-info/requires.txt +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/setup.cfg +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/setup.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/api/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/api/test_handler_dependency_injection.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/api/test_tool_description.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/commands/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/commands/test_command_metadata.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/commands/test_dependency_container.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/conftest.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/integration/__init__.py +0 -0
- {mcp_proxy_adapter-3.1.6 → mcp_proxy_adapter-4.0.0}/tests/integration/test_di_integration.py +0 -0
@@ -0,0 +1,183 @@
|
|
1
|
+
# Reload Settings Command
|
2
|
+
|
3
|
+
The `reload_settings` command allows you to reload configuration settings from files and environment variables at runtime.
|
4
|
+
|
5
|
+
## Description
|
6
|
+
|
7
|
+
The reload settings command provides the ability to:
|
8
|
+
- Reload configuration from JSON files
|
9
|
+
- Reload environment variables
|
10
|
+
- Update custom settings
|
11
|
+
- Get current custom settings after reload
|
12
|
+
|
13
|
+
## Command Information
|
14
|
+
|
15
|
+
- **Name**: `reload_settings`
|
16
|
+
- **Description**: Reload configuration settings from files and environment variables
|
17
|
+
- **Category**: Configuration Management
|
18
|
+
|
19
|
+
## Parameters
|
20
|
+
|
21
|
+
This command does not accept any parameters.
|
22
|
+
|
23
|
+
## Response Format
|
24
|
+
|
25
|
+
### Success Response
|
26
|
+
|
27
|
+
```json
|
28
|
+
{
|
29
|
+
"result": {
|
30
|
+
"success": true,
|
31
|
+
"message": "Settings reloaded successfully from configuration files and environment variables",
|
32
|
+
"custom_settings": {
|
33
|
+
"application": {
|
34
|
+
"name": "Extended MCP Proxy Server with Custom Settings",
|
35
|
+
"version": "2.1.0",
|
36
|
+
"environment": "development"
|
37
|
+
},
|
38
|
+
"features": {
|
39
|
+
"advanced_hooks": true,
|
40
|
+
"custom_commands": true,
|
41
|
+
"data_transformation": true
|
42
|
+
},
|
43
|
+
"security": {
|
44
|
+
"enable_authentication": false,
|
45
|
+
"max_request_size": "15MB"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
```
|
51
|
+
|
52
|
+
### Error Response
|
53
|
+
|
54
|
+
```json
|
55
|
+
{
|
56
|
+
"result": {
|
57
|
+
"success": false,
|
58
|
+
"message": "Failed to reload settings",
|
59
|
+
"custom_settings": {},
|
60
|
+
"error_message": "Failed to reload settings: Configuration file not found"
|
61
|
+
}
|
62
|
+
}
|
63
|
+
```
|
64
|
+
|
65
|
+
## Usage Examples
|
66
|
+
|
67
|
+
### Basic Usage
|
68
|
+
|
69
|
+
```bash
|
70
|
+
curl -X POST http://localhost:8000/cmd \
|
71
|
+
-H "Content-Type: application/json" \
|
72
|
+
-d '{
|
73
|
+
"command": "reload_settings",
|
74
|
+
"params": {}
|
75
|
+
}'
|
76
|
+
```
|
77
|
+
|
78
|
+
### Python Example
|
79
|
+
|
80
|
+
```python
|
81
|
+
import requests
|
82
|
+
|
83
|
+
response = requests.post(
|
84
|
+
"http://localhost:8000/cmd",
|
85
|
+
json={
|
86
|
+
"command": "reload_settings",
|
87
|
+
"params": {}
|
88
|
+
}
|
89
|
+
)
|
90
|
+
|
91
|
+
result = response.json()
|
92
|
+
if result["result"]["success"]:
|
93
|
+
print("✅ Settings reloaded successfully")
|
94
|
+
print(f"📋 Custom settings: {result['result']['custom_settings']}")
|
95
|
+
else:
|
96
|
+
print(f"❌ Failed to reload settings: {result['result']['error_message']}")
|
97
|
+
```
|
98
|
+
|
99
|
+
## What Gets Reloaded
|
100
|
+
|
101
|
+
When you execute the `reload_settings` command, the following happens:
|
102
|
+
|
103
|
+
1. **Configuration Files**: Reloads settings from `config.json` and other configuration files
|
104
|
+
2. **Environment Variables**: Reloads settings from environment variables with `SERVICE_` prefix
|
105
|
+
3. **Custom Settings**: Updates custom settings that were added via `add_custom_settings()`
|
106
|
+
4. **Framework Settings**: Updates server, logging, and commands settings
|
107
|
+
|
108
|
+
## Integration with Custom Settings
|
109
|
+
|
110
|
+
The command works seamlessly with the custom settings system:
|
111
|
+
|
112
|
+
```python
|
113
|
+
from mcp_proxy_adapter.core.settings import add_custom_settings, reload_settings
|
114
|
+
|
115
|
+
# Add custom settings
|
116
|
+
add_custom_settings({
|
117
|
+
"application": {
|
118
|
+
"name": "My Custom App",
|
119
|
+
"version": "1.0.0"
|
120
|
+
}
|
121
|
+
})
|
122
|
+
|
123
|
+
# Reload all settings (including custom ones)
|
124
|
+
reload_settings()
|
125
|
+
```
|
126
|
+
|
127
|
+
## Error Handling
|
128
|
+
|
129
|
+
The command provides comprehensive error handling:
|
130
|
+
|
131
|
+
- **File Not Found**: Gracefully handles missing configuration files
|
132
|
+
- **Invalid JSON**: Reports JSON parsing errors
|
133
|
+
- **Permission Errors**: Handles file access permission issues
|
134
|
+
- **Environment Variables**: Safely handles missing or invalid environment variables
|
135
|
+
|
136
|
+
## Best Practices
|
137
|
+
|
138
|
+
1. **Use After Configuration Changes**: Call this command after modifying configuration files
|
139
|
+
2. **Monitor Response**: Always check the `success` field in the response
|
140
|
+
3. **Handle Errors**: Implement proper error handling for failed reloads
|
141
|
+
4. **Validate Settings**: Use the returned custom settings to verify the reload was successful
|
142
|
+
5. **Log Operations**: Log reload operations for debugging and monitoring
|
143
|
+
|
144
|
+
## Related Commands
|
145
|
+
|
146
|
+
- **`settings`**: Get, set, and manage individual settings
|
147
|
+
- **`config`**: Access framework configuration
|
148
|
+
- **`reload`**: Reload commands and configuration (more comprehensive)
|
149
|
+
|
150
|
+
## Use Cases
|
151
|
+
|
152
|
+
### Development Environment
|
153
|
+
|
154
|
+
```bash
|
155
|
+
# After modifying config.json
|
156
|
+
curl -X POST http://localhost:8000/cmd \
|
157
|
+
-H "Content-Type: application/json" \
|
158
|
+
-d '{"command": "reload_settings", "params": {}}'
|
159
|
+
```
|
160
|
+
|
161
|
+
### Production Environment
|
162
|
+
|
163
|
+
```bash
|
164
|
+
# After updating environment variables
|
165
|
+
export SERVICE_SERVER_PORT=8080
|
166
|
+
curl -X POST http://localhost:8000/cmd \
|
167
|
+
-H "Content-Type: application/json" \
|
168
|
+
-d '{"command": "reload_settings", "params": {}}'
|
169
|
+
```
|
170
|
+
|
171
|
+
### Custom Settings Management
|
172
|
+
|
173
|
+
```python
|
174
|
+
# After adding custom settings programmatically
|
175
|
+
from mcp_proxy_adapter.core.settings import add_custom_settings
|
176
|
+
|
177
|
+
add_custom_settings({"feature_enabled": True})
|
178
|
+
|
179
|
+
# Reload to ensure all settings are up to date
|
180
|
+
curl -X POST http://localhost:8000/cmd \
|
181
|
+
-H "Content-Type: application/json" \
|
182
|
+
-d '{"command": "reload_settings", "params": {}}'
|
183
|
+
```
|
@@ -0,0 +1,298 @@
|
|
1
|
+
# Settings Command
|
2
|
+
|
3
|
+
The `settings` command provides comprehensive configuration management capabilities for the MCP Proxy Adapter framework.
|
4
|
+
|
5
|
+
## Description
|
6
|
+
|
7
|
+
The settings command allows you to:
|
8
|
+
- View all configuration settings
|
9
|
+
- Get specific configuration values
|
10
|
+
- Set configuration values dynamically
|
11
|
+
- Reload configuration from files
|
12
|
+
|
13
|
+
## Command Information
|
14
|
+
|
15
|
+
- **Name**: `settings`
|
16
|
+
- **Description**: Manage framework settings and configuration
|
17
|
+
- **Category**: Configuration Management
|
18
|
+
|
19
|
+
## Parameters
|
20
|
+
|
21
|
+
| Parameter | Type | Required | Default | Description |
|
22
|
+
|-----------|------|----------|---------|-------------|
|
23
|
+
| `operation` | string | Yes | `"get_all"` | Operation to perform: `get`, `set`, `get_all`, `reload` |
|
24
|
+
| `key` | string | No | - | Configuration key in dot notation (e.g., `server.host`, `custom.feature_enabled`) |
|
25
|
+
| `value` | any | No | - | Configuration value to set (for `set` operation) |
|
26
|
+
|
27
|
+
### Operations
|
28
|
+
|
29
|
+
#### `get_all`
|
30
|
+
Retrieves all configuration settings.
|
31
|
+
|
32
|
+
**Parameters**: None required
|
33
|
+
|
34
|
+
**Example**:
|
35
|
+
```json
|
36
|
+
{
|
37
|
+
"command": "settings",
|
38
|
+
"params": {
|
39
|
+
"operation": "get_all"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
```
|
43
|
+
|
44
|
+
#### `get`
|
45
|
+
Retrieves a specific configuration value.
|
46
|
+
|
47
|
+
**Parameters**:
|
48
|
+
- `key` (required): Configuration key in dot notation
|
49
|
+
|
50
|
+
**Example**:
|
51
|
+
```json
|
52
|
+
{
|
53
|
+
"command": "settings",
|
54
|
+
"params": {
|
55
|
+
"operation": "get",
|
56
|
+
"key": "server.host"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
```
|
60
|
+
|
61
|
+
#### `set`
|
62
|
+
Sets a configuration value dynamically.
|
63
|
+
|
64
|
+
**Parameters**:
|
65
|
+
- `key` (required): Configuration key in dot notation
|
66
|
+
- `value` (required): Value to set
|
67
|
+
|
68
|
+
**Example**:
|
69
|
+
```json
|
70
|
+
{
|
71
|
+
"command": "settings",
|
72
|
+
"params": {
|
73
|
+
"operation": "set",
|
74
|
+
"key": "custom.feature_enabled",
|
75
|
+
"value": true
|
76
|
+
}
|
77
|
+
}
|
78
|
+
```
|
79
|
+
|
80
|
+
#### `reload`
|
81
|
+
Reloads configuration from files and environment variables.
|
82
|
+
|
83
|
+
**Parameters**: None required
|
84
|
+
|
85
|
+
**Example**:
|
86
|
+
```json
|
87
|
+
{
|
88
|
+
"command": "settings",
|
89
|
+
"params": {
|
90
|
+
"operation": "reload"
|
91
|
+
}
|
92
|
+
}
|
93
|
+
```
|
94
|
+
|
95
|
+
## Response Format
|
96
|
+
|
97
|
+
### Success Response
|
98
|
+
|
99
|
+
```json
|
100
|
+
{
|
101
|
+
"result": {
|
102
|
+
"success": true,
|
103
|
+
"operation": "get_all",
|
104
|
+
"all_settings": {
|
105
|
+
"server": {
|
106
|
+
"host": "127.0.0.1",
|
107
|
+
"port": 8000,
|
108
|
+
"debug": true,
|
109
|
+
"log_level": "DEBUG"
|
110
|
+
},
|
111
|
+
"logging": {
|
112
|
+
"level": "DEBUG",
|
113
|
+
"log_dir": "./logs",
|
114
|
+
"log_file": "app.log"
|
115
|
+
},
|
116
|
+
"commands": {
|
117
|
+
"auto_discovery": true,
|
118
|
+
"discovery_path": "mcp_proxy_adapter.commands"
|
119
|
+
},
|
120
|
+
"custom": {
|
121
|
+
"feature_enabled": true
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
```
|
127
|
+
|
128
|
+
### Get Operation Response
|
129
|
+
|
130
|
+
```json
|
131
|
+
{
|
132
|
+
"result": {
|
133
|
+
"success": true,
|
134
|
+
"operation": "get",
|
135
|
+
"key": "server.host",
|
136
|
+
"value": "127.0.0.1"
|
137
|
+
}
|
138
|
+
}
|
139
|
+
```
|
140
|
+
|
141
|
+
### Set Operation Response
|
142
|
+
|
143
|
+
```json
|
144
|
+
{
|
145
|
+
"result": {
|
146
|
+
"success": true,
|
147
|
+
"operation": "set",
|
148
|
+
"key": "custom.feature_enabled",
|
149
|
+
"value": true
|
150
|
+
}
|
151
|
+
}
|
152
|
+
```
|
153
|
+
|
154
|
+
### Error Response
|
155
|
+
|
156
|
+
```json
|
157
|
+
{
|
158
|
+
"result": {
|
159
|
+
"success": false,
|
160
|
+
"operation": "get",
|
161
|
+
"error_message": "Key is required for 'get' operation"
|
162
|
+
}
|
163
|
+
}
|
164
|
+
```
|
165
|
+
|
166
|
+
## Usage Examples
|
167
|
+
|
168
|
+
### Get All Settings
|
169
|
+
|
170
|
+
```bash
|
171
|
+
curl -X POST http://localhost:8000/cmd \
|
172
|
+
-H "Content-Type: application/json" \
|
173
|
+
-d '{
|
174
|
+
"command": "settings",
|
175
|
+
"params": {
|
176
|
+
"operation": "get_all"
|
177
|
+
}
|
178
|
+
}'
|
179
|
+
```
|
180
|
+
|
181
|
+
### Get Server Host
|
182
|
+
|
183
|
+
```bash
|
184
|
+
curl -X POST http://localhost:8000/cmd \
|
185
|
+
-H "Content-Type: application/json" \
|
186
|
+
-d '{
|
187
|
+
"command": "settings",
|
188
|
+
"params": {
|
189
|
+
"operation": "get",
|
190
|
+
"key": "server.host"
|
191
|
+
}
|
192
|
+
}'
|
193
|
+
```
|
194
|
+
|
195
|
+
### Get Custom Setting
|
196
|
+
|
197
|
+
```bash
|
198
|
+
curl -X POST http://localhost:8000/cmd \
|
199
|
+
-H "Content-Type: application/json" \
|
200
|
+
-d '{
|
201
|
+
"command": "settings",
|
202
|
+
"params": {
|
203
|
+
"operation": "get",
|
204
|
+
"key": "custom.features.hooks_enabled"
|
205
|
+
}
|
206
|
+
}'
|
207
|
+
```
|
208
|
+
|
209
|
+
### Set Custom Setting
|
210
|
+
|
211
|
+
```bash
|
212
|
+
curl -X POST http://localhost:8000/cmd \
|
213
|
+
-H "Content-Type: application/json" \
|
214
|
+
-d '{
|
215
|
+
"command": "settings",
|
216
|
+
"params": {
|
217
|
+
"operation": "set",
|
218
|
+
"key": "custom.debug_mode",
|
219
|
+
"value": true
|
220
|
+
}
|
221
|
+
}'
|
222
|
+
```
|
223
|
+
|
224
|
+
### Reload Configuration
|
225
|
+
|
226
|
+
```bash
|
227
|
+
curl -X POST http://localhost:8000/cmd \
|
228
|
+
-H "Content-Type: application/json" \
|
229
|
+
-d '{
|
230
|
+
"command": "settings",
|
231
|
+
"params": {
|
232
|
+
"operation": "reload"
|
233
|
+
}
|
234
|
+
}'
|
235
|
+
```
|
236
|
+
|
237
|
+
## Configuration Keys
|
238
|
+
|
239
|
+
### Server Settings
|
240
|
+
|
241
|
+
- `server.host` - Server host address
|
242
|
+
- `server.port` - Server port number
|
243
|
+
- `server.debug` - Debug mode flag
|
244
|
+
- `server.log_level` - Server log level
|
245
|
+
|
246
|
+
### Logging Settings
|
247
|
+
|
248
|
+
- `logging.level` - Logging level
|
249
|
+
- `logging.log_dir` - Log directory path
|
250
|
+
- `logging.log_file` - Main log file name
|
251
|
+
- `logging.error_log_file` - Error log file name
|
252
|
+
- `logging.access_log_file` - Access log file name
|
253
|
+
- `logging.max_file_size` - Maximum log file size
|
254
|
+
- `logging.backup_count` - Number of backup files
|
255
|
+
- `logging.format` - Log message format
|
256
|
+
- `logging.date_format` - Date format
|
257
|
+
- `logging.console_output` - Console output flag
|
258
|
+
- `logging.file_output` - File output flag
|
259
|
+
|
260
|
+
### Commands Settings
|
261
|
+
|
262
|
+
- `commands.auto_discovery` - Auto discovery flag
|
263
|
+
- `commands.discovery_path` - Command discovery path
|
264
|
+
- `commands.custom_commands_path` - Custom commands path
|
265
|
+
|
266
|
+
### Custom Settings
|
267
|
+
|
268
|
+
Any settings under the `custom` section can be accessed using dot notation:
|
269
|
+
|
270
|
+
- `custom.feature_enabled`
|
271
|
+
- `custom.api_version`
|
272
|
+
- `custom.features.hooks_enabled`
|
273
|
+
- `custom.nested.setting`
|
274
|
+
|
275
|
+
## Error Handling
|
276
|
+
|
277
|
+
The command provides comprehensive error handling:
|
278
|
+
|
279
|
+
- **Missing Key**: Returns error when key is required but not provided
|
280
|
+
- **Invalid Operation**: Returns error for unsupported operations
|
281
|
+
- **Configuration Errors**: Handles configuration loading errors gracefully
|
282
|
+
|
283
|
+
## Integration
|
284
|
+
|
285
|
+
The settings command integrates with:
|
286
|
+
|
287
|
+
- **Configuration System**: Uses the framework's configuration management
|
288
|
+
- **Logging System**: Respects logging configuration
|
289
|
+
- **Command Registry**: Available through the command registry
|
290
|
+
- **API Endpoints**: Accessible via `/cmd` and `/api/commands` endpoints
|
291
|
+
|
292
|
+
## Best Practices
|
293
|
+
|
294
|
+
1. **Use Dot Notation**: Access nested settings using dot notation (e.g., `custom.features.enabled`)
|
295
|
+
2. **Provide Defaults**: Always handle cases where settings might not exist
|
296
|
+
3. **Validate Values**: Validate configuration values before using them
|
297
|
+
4. **Reload Carefully**: Use reload operation carefully as it overwrites dynamic changes
|
298
|
+
5. **Error Handling**: Always check the `success` field in responses
|