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