mcp-proxy-adapter 6.4.45__py3-none-any.whl → 6.4.47__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.

Potentially problematic release.


This version of mcp-proxy-adapter might be problematic. Click here for more details.

@@ -164,7 +164,7 @@ class ReloadCommand(Command):
164
164
  logger.warning("No config_path provided, using default configuration")
165
165
 
166
166
  # Perform reload using unified initialization
167
- reload_info = registry.reload_system(config_path=config_path)
167
+ reload_info = await registry.reload_system(config_path=config_path)
168
168
 
169
169
  # Create result
170
170
  result = ReloadResult(
@@ -247,6 +247,13 @@ class ProxyRegistrationManager:
247
247
  SSL context or None if SSL not needed
248
248
  """
249
249
  logger.debug("_create_ssl_context called")
250
+
251
+ # Check if we're in HTTP mode - if so, don't create SSL context
252
+ server_config = self.config.get("server", {})
253
+ if server_config.get("protocol", "http").lower() == "http":
254
+ logger.debug("HTTP mode detected, skipping SSL context creation")
255
+ return None
256
+
250
257
  if not self.client_security:
251
258
  logger.debug("SSL context creation failed: client_security is None")
252
259
  # Try best-effort default CA if available
@@ -366,7 +373,8 @@ class ProxyRegistrationManager:
366
373
 
367
374
  return None
368
375
  except Exception as e:
369
- logger.error(f"Failed to create SSL context: {e}")
376
+ logger.warning(f"Failed to create SSL context: {e}")
377
+ # Don't fail the entire operation, just return None
370
378
  return None
371
379
 
372
380
  async def register_server(self) -> bool:
@@ -45,8 +45,300 @@ class CustomOpenAPIGenerator:
45
45
  Returns:
46
46
  Dict containing the base OpenAPI schema.
47
47
  """
48
- with open(self.base_schema_path, "r", encoding="utf-8") as f:
49
- return json.load(f)
48
+ try:
49
+ with open(self.base_schema_path, "r", encoding="utf-8") as f:
50
+ return json.load(f)
51
+ except FileNotFoundError:
52
+ logger.warning(f"Base schema file not found at {self.base_schema_path}, using fallback schema")
53
+ return self._get_fallback_schema()
54
+
55
+ def _get_fallback_schema(self) -> Dict[str, Any]:
56
+ """
57
+ Get a fallback OpenAPI schema when the base schema file is not available.
58
+
59
+ Returns:
60
+ Dict containing a basic OpenAPI schema.
61
+ """
62
+ return {
63
+ "openapi": "3.0.2",
64
+ "info": {
65
+ "title": "MCP Microservice API",
66
+ "description": "API для выполнения команд микросервиса",
67
+ "version": "1.0.0"
68
+ },
69
+ "paths": {
70
+ "/cmd": {
71
+ "post": {
72
+ "summary": "Execute Command",
73
+ "description": "Executes a command via JSON-RPC protocol.",
74
+ "operationId": "execute_command",
75
+ "requestBody": {
76
+ "content": {
77
+ "application/json": {
78
+ "schema": {
79
+ "oneOf": [
80
+ { "$ref": "#/components/schemas/CommandRequest" },
81
+ { "$ref": "#/components/schemas/JsonRpcRequest" }
82
+ ]
83
+ }
84
+ }
85
+ },
86
+ "required": True
87
+ },
88
+ "responses": {
89
+ "200": {
90
+ "description": "Successful Response",
91
+ "content": {
92
+ "application/json": {
93
+ "schema": {
94
+ "oneOf": [
95
+ { "$ref": "#/components/schemas/CommandResponse" },
96
+ { "$ref": "#/components/schemas/JsonRpcResponse" }
97
+ ]
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "422": {
103
+ "description": "Validation Error",
104
+ "content": {
105
+ "application/json": {
106
+ "schema": {
107
+ "$ref": "#/components/schemas/HTTPValidationError"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "/health": {
116
+ "get": {
117
+ "summary": "Проверить работоспособность сервиса",
118
+ "description": "Возвращает информацию о состоянии сервиса",
119
+ "operationId": "health_check",
120
+ "responses": {
121
+ "200": {
122
+ "description": "Информация о состоянии сервиса",
123
+ "content": {
124
+ "application/json": {
125
+ "schema": {
126
+ "$ref": "#/components/schemas/HealthResponse"
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "/openapi.json": {
135
+ "get": {
136
+ "summary": "Get Openapi Schema",
137
+ "description": "Returns OpenAPI schema.",
138
+ "operationId": "get_openapi_schema_openapi_json_get",
139
+ "responses": {
140
+ "200": {
141
+ "description": "Successful Response",
142
+ "content": {
143
+ "application/json": {
144
+ "schema": {}
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "/api/commands": {
152
+ "get": {
153
+ "summary": "Get Commands",
154
+ "description": "Returns list of available commands with their descriptions.",
155
+ "operationId": "get_commands_api_commands_get",
156
+ "responses": {
157
+ "200": {
158
+ "description": "Successful Response",
159
+ "content": {
160
+ "application/json": {
161
+ "schema": {}
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+ },
169
+ "components": {
170
+ "schemas": {
171
+ "CommandRequest": {
172
+ "title": "CommandRequest",
173
+ "description": "Запрос на выполнение команды",
174
+ "type": "object",
175
+ "required": ["command"],
176
+ "properties": {
177
+ "command": {
178
+ "title": "Command",
179
+ "description": "Команда для выполнения",
180
+ "type": "string"
181
+ },
182
+ "params": {
183
+ "title": "Parameters",
184
+ "description": "Параметры команды, зависят от типа команды",
185
+ "type": "object",
186
+ "additionalProperties": True
187
+ }
188
+ }
189
+ },
190
+ "CommandResponse": {
191
+ "title": "CommandResponse",
192
+ "description": "Ответ на выполнение команды",
193
+ "type": "object",
194
+ "required": ["result"],
195
+ "properties": {
196
+ "result": {
197
+ "title": "Result",
198
+ "description": "Результат выполнения команды"
199
+ }
200
+ }
201
+ },
202
+ "JsonRpcRequest": {
203
+ "properties": {
204
+ "jsonrpc": {
205
+ "type": "string",
206
+ "title": "Jsonrpc",
207
+ "description": "JSON-RPC version",
208
+ "default": "2.0"
209
+ },
210
+ "method": {
211
+ "type": "string",
212
+ "title": "Method",
213
+ "description": "Method name to call"
214
+ },
215
+ "params": {
216
+ "additionalProperties": True,
217
+ "type": "object",
218
+ "title": "Params",
219
+ "description": "Method parameters",
220
+ "default": {}
221
+ },
222
+ "id": {
223
+ "anyOf": [
224
+ {"type": "string"},
225
+ {"type": "integer"},
226
+ {"type": "null"}
227
+ ],
228
+ "title": "Id",
229
+ "description": "Request identifier"
230
+ }
231
+ },
232
+ "type": "object",
233
+ "required": ["method"],
234
+ "title": "JsonRpcRequest",
235
+ "description": "Base model for JSON-RPC requests."
236
+ },
237
+ "JsonRpcResponse": {
238
+ "properties": {
239
+ "jsonrpc": {
240
+ "type": "string",
241
+ "title": "Jsonrpc",
242
+ "description": "JSON-RPC version",
243
+ "default": "2.0"
244
+ },
245
+ "result": {
246
+ "anyOf": [
247
+ {},
248
+ {"type": "null"}
249
+ ],
250
+ "title": "Result",
251
+ "description": "Method execution result"
252
+ },
253
+ "error": {
254
+ "anyOf": [
255
+ {
256
+ "additionalProperties": True,
257
+ "type": "object"
258
+ },
259
+ {"type": "null"}
260
+ ],
261
+ "title": "Error",
262
+ "description": "Error information"
263
+ },
264
+ "id": {
265
+ "anyOf": [
266
+ {"type": "string"},
267
+ {"type": "integer"},
268
+ {"type": "null"}
269
+ ],
270
+ "title": "Id",
271
+ "description": "Request identifier"
272
+ }
273
+ },
274
+ "type": "object",
275
+ "title": "JsonRpcResponse",
276
+ "description": "Base model for JSON-RPC responses."
277
+ },
278
+ "HealthResponse": {
279
+ "title": "HealthResponse",
280
+ "description": "Информация о состоянии сервиса",
281
+ "type": "object",
282
+ "required": ["status", "model", "version"],
283
+ "properties": {
284
+ "status": {
285
+ "title": "Status",
286
+ "description": "Статус сервиса (ok/error)",
287
+ "type": "string"
288
+ },
289
+ "model": {
290
+ "title": "Model",
291
+ "description": "Текущая активная модель",
292
+ "type": "string"
293
+ },
294
+ "version": {
295
+ "title": "Version",
296
+ "description": "Версия сервиса",
297
+ "type": "string"
298
+ }
299
+ }
300
+ },
301
+ "HTTPValidationError": {
302
+ "properties": {
303
+ "detail": {
304
+ "items": {
305
+ "$ref": "#/components/schemas/ValidationError"
306
+ },
307
+ "type": "array",
308
+ "title": "Detail"
309
+ }
310
+ },
311
+ "type": "object",
312
+ "title": "HTTPValidationError"
313
+ },
314
+ "ValidationError": {
315
+ "properties": {
316
+ "loc": {
317
+ "items": {
318
+ "anyOf": [
319
+ {"type": "string"},
320
+ {"type": "integer"}
321
+ ]
322
+ },
323
+ "type": "array",
324
+ "title": "Location"
325
+ },
326
+ "msg": {
327
+ "type": "string",
328
+ "title": "Message"
329
+ },
330
+ "type": {
331
+ "type": "string",
332
+ "title": "Error Type"
333
+ }
334
+ },
335
+ "type": "object",
336
+ "required": ["loc", "msg", "type"],
337
+ "title": "ValidationError"
338
+ }
339
+ }
340
+ }
341
+ }
50
342
 
51
343
  def _add_commands_to_schema(self, schema: Dict[str, Any]) -> None:
52
344
  """
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Base Schema",
4
+ "description": "Basic schema for validating commands and results",
5
+ "definitions": {
6
+ "command": {
7
+ "type": "object",
8
+ "properties": {
9
+ "jsonrpc": {
10
+ "type": "string",
11
+ "enum": ["2.0"],
12
+ "description": "JSON-RPC version"
13
+ },
14
+ "method": {
15
+ "type": "string",
16
+ "description": "Command name"
17
+ },
18
+ "params": {
19
+ "type": "object",
20
+ "description": "Command parameters"
21
+ },
22
+ "id": {
23
+ "oneOf": [
24
+ {"type": "string"},
25
+ {"type": "integer"},
26
+ {"type": "null"}
27
+ ],
28
+ "description": "Request ID"
29
+ }
30
+ },
31
+ "required": ["jsonrpc", "method"]
32
+ },
33
+ "success_response": {
34
+ "type": "object",
35
+ "properties": {
36
+ "jsonrpc": {
37
+ "type": "string",
38
+ "enum": ["2.0"],
39
+ "description": "JSON-RPC version"
40
+ },
41
+ "result": {
42
+ "type": "object",
43
+ "properties": {
44
+ "success": {
45
+ "type": "boolean",
46
+ "enum": [true],
47
+ "description": "Success flag"
48
+ },
49
+ "data": {
50
+ "type": "object",
51
+ "description": "Response data"
52
+ },
53
+ "message": {
54
+ "type": "string",
55
+ "description": "Response message"
56
+ }
57
+ },
58
+ "required": ["success"]
59
+ },
60
+ "id": {
61
+ "oneOf": [
62
+ {"type": "string"},
63
+ {"type": "integer"},
64
+ {"type": "null"}
65
+ ],
66
+ "description": "Request ID"
67
+ }
68
+ },
69
+ "required": ["jsonrpc", "result"]
70
+ },
71
+ "error_response": {
72
+ "type": "object",
73
+ "properties": {
74
+ "jsonrpc": {
75
+ "type": "string",
76
+ "enum": ["2.0"],
77
+ "description": "JSON-RPC version"
78
+ },
79
+ "error": {
80
+ "type": "object",
81
+ "properties": {
82
+ "code": {
83
+ "type": "integer",
84
+ "description": "Error code"
85
+ },
86
+ "message": {
87
+ "type": "string",
88
+ "description": "Error message"
89
+ },
90
+ "details": {
91
+ "type": "object",
92
+ "description": "Detailed error information"
93
+ }
94
+ },
95
+ "required": ["code", "message"]
96
+ },
97
+ "id": {
98
+ "oneOf": [
99
+ {"type": "string"},
100
+ {"type": "integer"},
101
+ {"type": "null"}
102
+ ],
103
+ "description": "Request ID"
104
+ }
105
+ },
106
+ "required": ["jsonrpc", "error"]
107
+ }
108
+ },
109
+ "oneOf": [
110
+ {"$ref": "#/definitions/command"},
111
+ {"$ref": "#/definitions/success_response"},
112
+ {"$ref": "#/definitions/error_response"}
113
+ ]
114
+ }
@@ -0,0 +1,314 @@
1
+ {
2
+ "openapi": "3.0.2",
3
+ "info": {
4
+ "title": "MCP Microservice API",
5
+ "description": "API для выполнения команд микросервиса",
6
+ "version": "1.0.0"
7
+ },
8
+ "paths": {
9
+ "/cmd": {
10
+ "post": {
11
+ "summary": "Execute Command",
12
+ "description": "Executes a command via JSON-RPC protocol.",
13
+ "operationId": "execute_command",
14
+ "requestBody": {
15
+ "content": {
16
+ "application/json": {
17
+ "schema": {
18
+ "oneOf": [
19
+ { "$ref": "#/components/schemas/CommandRequest" },
20
+ { "$ref": "#/components/schemas/JsonRpcRequest" }
21
+ ]
22
+ }
23
+ }
24
+ },
25
+ "required": true
26
+ },
27
+ "responses": {
28
+ "200": {
29
+ "description": "Successful Response",
30
+ "content": {
31
+ "application/json": {
32
+ "schema": {
33
+ "oneOf": [
34
+ { "$ref": "#/components/schemas/CommandResponse" },
35
+ { "$ref": "#/components/schemas/JsonRpcResponse" }
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ },
41
+ "422": {
42
+ "description": "Validation Error",
43
+ "content": {
44
+ "application/json": {
45
+ "schema": {
46
+ "$ref": "#/components/schemas/HTTPValidationError"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "/health": {
55
+ "get": {
56
+ "summary": "Проверить работоспособность сервиса",
57
+ "description": "Возвращает информацию о состоянии сервиса",
58
+ "operationId": "health_check",
59
+ "responses": {
60
+ "200": {
61
+ "description": "Информация о состоянии сервиса",
62
+ "content": {
63
+ "application/json": {
64
+ "schema": {
65
+ "$ref": "#/components/schemas/HealthResponse"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "/openapi.json": {
74
+ "get": {
75
+ "summary": "Get Openapi Schema",
76
+ "description": "Returns OpenAPI schema.",
77
+ "operationId": "get_openapi_schema_openapi_json_get",
78
+ "responses": {
79
+ "200": {
80
+ "description": "Successful Response",
81
+ "content": {
82
+ "application/json": {
83
+ "schema": {}
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "/api/commands": {
91
+ "get": {
92
+ "summary": "Get Commands",
93
+ "description": "Returns list of available commands with their descriptions.",
94
+ "operationId": "get_commands_api_commands_get",
95
+ "responses": {
96
+ "200": {
97
+ "description": "Successful Response",
98
+ "content": {
99
+ "application/json": {
100
+ "schema": {}
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ },
108
+ "components": {
109
+ "schemas": {
110
+ "CommandRequest": {
111
+ "title": "CommandRequest",
112
+ "description": "Запрос на выполнение команды",
113
+ "type": "object",
114
+ "required": [
115
+ "command"
116
+ ],
117
+ "properties": {
118
+ "command": {
119
+ "title": "Command",
120
+ "description": "Команда для выполнения",
121
+ "type": "string"
122
+ },
123
+ "params": {
124
+ "title": "Parameters",
125
+ "description": "Параметры команды, зависят от типа команды",
126
+ "type": "object",
127
+ "additionalProperties": true
128
+ }
129
+ }
130
+ },
131
+ "CommandResponse": {
132
+ "title": "CommandResponse",
133
+ "description": "Ответ на выполнение команды",
134
+ "type": "object",
135
+ "required": [
136
+ "result"
137
+ ],
138
+ "properties": {
139
+ "result": {
140
+ "title": "Result",
141
+ "description": "Результат выполнения команды"
142
+ }
143
+ }
144
+ },
145
+ "JsonRpcRequest": {
146
+ "properties": {
147
+ "jsonrpc": {
148
+ "type": "string",
149
+ "title": "Jsonrpc",
150
+ "description": "JSON-RPC version",
151
+ "default": "2.0"
152
+ },
153
+ "method": {
154
+ "type": "string",
155
+ "title": "Method",
156
+ "description": "Method name to call"
157
+ },
158
+ "params": {
159
+ "additionalProperties": true,
160
+ "type": "object",
161
+ "title": "Params",
162
+ "description": "Method parameters",
163
+ "default": {}
164
+ },
165
+ "id": {
166
+ "anyOf": [
167
+ {
168
+ "type": "string"
169
+ },
170
+ {
171
+ "type": "integer"
172
+ },
173
+ {
174
+ "type": "null"
175
+ }
176
+ ],
177
+ "title": "Id",
178
+ "description": "Request identifier"
179
+ }
180
+ },
181
+ "type": "object",
182
+ "required": [
183
+ "method"
184
+ ],
185
+ "title": "JsonRpcRequest",
186
+ "description": "Base model for JSON-RPC requests."
187
+ },
188
+ "JsonRpcResponse": {
189
+ "properties": {
190
+ "jsonrpc": {
191
+ "type": "string",
192
+ "title": "Jsonrpc",
193
+ "description": "JSON-RPC version",
194
+ "default": "2.0"
195
+ },
196
+ "result": {
197
+ "anyOf": [
198
+ {},
199
+ {
200
+ "type": "null"
201
+ }
202
+ ],
203
+ "title": "Result",
204
+ "description": "Method execution result"
205
+ },
206
+ "error": {
207
+ "anyOf": [
208
+ {
209
+ "additionalProperties": true,
210
+ "type": "object"
211
+ },
212
+ {
213
+ "type": "null"
214
+ }
215
+ ],
216
+ "title": "Error",
217
+ "description": "Error information"
218
+ },
219
+ "id": {
220
+ "anyOf": [
221
+ {
222
+ "type": "string"
223
+ },
224
+ {
225
+ "type": "integer"
226
+ },
227
+ {
228
+ "type": "null"
229
+ }
230
+ ],
231
+ "title": "Id",
232
+ "description": "Request identifier"
233
+ }
234
+ },
235
+ "type": "object",
236
+ "title": "JsonRpcResponse",
237
+ "description": "Base model for JSON-RPC responses."
238
+ },
239
+ "HealthResponse": {
240
+ "title": "HealthResponse",
241
+ "description": "Информация о состоянии сервиса",
242
+ "type": "object",
243
+ "required": [
244
+ "status",
245
+ "model",
246
+ "version"
247
+ ],
248
+ "properties": {
249
+ "status": {
250
+ "title": "Status",
251
+ "description": "Статус сервиса (ok/error)",
252
+ "type": "string"
253
+ },
254
+ "model": {
255
+ "title": "Model",
256
+ "description": "Текущая активная модель",
257
+ "type": "string"
258
+ },
259
+ "version": {
260
+ "title": "Version",
261
+ "description": "Версия сервиса",
262
+ "type": "string"
263
+ }
264
+ }
265
+ },
266
+ "HTTPValidationError": {
267
+ "properties": {
268
+ "detail": {
269
+ "items": {
270
+ "$ref": "#/components/schemas/ValidationError"
271
+ },
272
+ "type": "array",
273
+ "title": "Detail"
274
+ }
275
+ },
276
+ "type": "object",
277
+ "title": "HTTPValidationError"
278
+ },
279
+ "ValidationError": {
280
+ "properties": {
281
+ "loc": {
282
+ "items": {
283
+ "anyOf": [
284
+ {
285
+ "type": "string"
286
+ },
287
+ {
288
+ "type": "integer"
289
+ }
290
+ ]
291
+ },
292
+ "type": "array",
293
+ "title": "Location"
294
+ },
295
+ "msg": {
296
+ "type": "string",
297
+ "title": "Message"
298
+ },
299
+ "type": {
300
+ "type": "string",
301
+ "title": "Error Type"
302
+ }
303
+ },
304
+ "type": "object",
305
+ "required": [
306
+ "loc",
307
+ "msg",
308
+ "type"
309
+ ],
310
+ "title": "ValidationError"
311
+ }
312
+ }
313
+ }
314
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "roles": {
3
+ "admin": {
4
+ "description": "Administrator role with full access",
5
+ "permissions": ["*"]
6
+ },
7
+ "user": {
8
+ "description": "Regular user role",
9
+ "permissions": [
10
+ "commands:read",
11
+ "commands:execute",
12
+ "health:read"
13
+ ]
14
+ },
15
+ "readonly": {
16
+ "description": "Read-only user role",
17
+ "permissions": [
18
+ "commands:read",
19
+ "health:read"
20
+ ]
21
+ }
22
+ },
23
+ "api_keys": {
24
+ "admin_secret_key_123": {
25
+ "role": "admin",
26
+ "description": "Admin API key"
27
+ },
28
+ "user_secret_key_456": {
29
+ "role": "user",
30
+ "description": "User API key"
31
+ },
32
+ "readonly_secret_key_789": {
33
+ "role": "readonly",
34
+ "description": "Read-only API key"
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "roles": {
3
+ "admin": {
4
+ "description": "Administrator with full access",
5
+ "allowed_servers": ["*"],
6
+ "allowed_clients": ["*"],
7
+ "permissions": ["read", "write", "delete", "admin"],
8
+ "priority": 100
9
+ },
10
+ "super-admin": {
11
+ "description": "Super administrator with system-level access",
12
+ "allowed_servers": ["*"],
13
+ "allowed_clients": ["*"],
14
+ "permissions": ["read", "write", "delete", "admin", "system"],
15
+ "priority": 200
16
+ },
17
+ "kubernetes_service": {
18
+ "description": "Kubernetes service with cluster management access",
19
+ "allowed_servers": ["kubernetes_manager", "kubernetes_api", "cluster_monitor", "k8s_operator"],
20
+ "allowed_clients": ["admin", "super-admin", "kubernetes_service", "ca_root", "ca_intermediate"],
21
+ "permissions": ["read", "write", "system"],
22
+ "priority": 120
23
+ },
24
+ "ca_root": {
25
+ "description": "Root Certificate Authority with full certificate management",
26
+ "allowed_servers": ["*"],
27
+ "allowed_clients": ["admin", "super-admin", "ca_root", "ca_intermediate"],
28
+ "permissions": ["read", "write", "delete", "admin", "system"],
29
+ "priority": 180
30
+ },
31
+ "ca_intermediate": {
32
+ "description": "Intermediate Certificate Authority with delegated certificate management",
33
+ "allowed_servers": ["certificate_manager", "ssl_manager", "tls_manager"],
34
+ "allowed_clients": ["admin", "super-admin", "ca_root", "ca_intermediate", "kubernetes_service"],
35
+ "permissions": ["read", "write", "admin"],
36
+ "priority": 140
37
+ },
38
+ "operator": {
39
+ "description": "Operator with limited access",
40
+ "allowed_servers": ["kubernetes_manager", "docker_manager", "monitor", "aiadm"],
41
+ "allowed_clients": ["admin", "super-admin", "operator"],
42
+ "permissions": ["read", "write"],
43
+ "priority": 50
44
+ },
45
+ "user": {
46
+ "description": "Regular user with basic access",
47
+ "allowed_servers": ["basic_commands", "info_commands"],
48
+ "allowed_clients": ["admin", "super-admin", "operator", "user"],
49
+ "permissions": ["read"],
50
+ "priority": 10
51
+ },
52
+ "guest": {
53
+ "description": "Guest user with minimal access",
54
+ "allowed_servers": ["help", "info"],
55
+ "allowed_clients": ["admin", "super-admin", "operator", "user", "guest"],
56
+ "permissions": ["read"],
57
+ "priority": 1
58
+ },
59
+ "system": {
60
+ "description": "System service with internal access",
61
+ "allowed_servers": ["*"],
62
+ "allowed_clients": ["admin", "super-admin", "system"],
63
+ "permissions": ["read", "write", "system"],
64
+ "priority": 150
65
+ }
66
+ },
67
+ "default_policy": {
68
+ "deny_by_default": true,
69
+ "require_role_match": true,
70
+ "case_sensitive": false,
71
+ "allow_wildcard": true
72
+ },
73
+ "role_hierarchy": {
74
+ "super-admin": ["admin", "user"],
75
+ "admin": ["operator", "user"],
76
+ "kubernetes_service": ["operator", "user"],
77
+ "ca_root": ["admin", "ca_intermediate", "kubernetes_service"],
78
+ "ca_intermediate": ["operator", "user"],
79
+ "operator": ["user"],
80
+ "user": ["guest"],
81
+ "system": ["admin", "user"]
82
+ },
83
+ "permissions": {
84
+ "read": {
85
+ "description": "Read access to data and commands",
86
+ "level": 1
87
+ },
88
+ "write": {
89
+ "description": "Write access to data and commands",
90
+ "level": 2
91
+ },
92
+ "delete": {
93
+ "description": "Delete access to data and commands",
94
+ "level": 3
95
+ },
96
+ "admin": {
97
+ "description": "Administrative access",
98
+ "level": 4
99
+ },
100
+ "system": {
101
+ "description": "System-level access",
102
+ "level": 5
103
+ }
104
+ },
105
+ "server_roles": {
106
+ "kubernetes_manager": {
107
+ "description": "Kubernetes management server",
108
+ "required_roles": ["admin", "operator", "kubernetes_service"],
109
+ "allowed_commands": ["k8s_*", "system_monitor"]
110
+ },
111
+ "kubernetes_api": {
112
+ "description": "Kubernetes API server",
113
+ "required_roles": ["kubernetes_service", "admin"],
114
+ "allowed_commands": ["k8s_api_*", "cluster_*"]
115
+ },
116
+ "cluster_monitor": {
117
+ "description": "Kubernetes cluster monitoring server",
118
+ "required_roles": ["kubernetes_service", "admin"],
119
+ "allowed_commands": ["monitor_*", "metrics_*"]
120
+ },
121
+ "k8s_operator": {
122
+ "description": "Kubernetes operator server",
123
+ "required_roles": ["kubernetes_service", "admin"],
124
+ "allowed_commands": ["operator_*", "crd_*"]
125
+ },
126
+ "certificate_manager": {
127
+ "description": "Certificate management server",
128
+ "required_roles": ["ca_root", "ca_intermediate", "admin"],
129
+ "allowed_commands": ["cert_*", "ca_*", "ssl_*"]
130
+ },
131
+ "ssl_manager": {
132
+ "description": "SSL/TLS management server",
133
+ "required_roles": ["ca_intermediate", "admin"],
134
+ "allowed_commands": ["ssl_*", "tls_*", "cert_*"]
135
+ },
136
+ "tls_manager": {
137
+ "description": "TLS management server",
138
+ "required_roles": ["ca_intermediate", "admin"],
139
+ "allowed_commands": ["tls_*", "mtls_*", "cert_*"]
140
+ },
141
+ "docker_manager": {
142
+ "description": "Docker management server",
143
+ "required_roles": ["admin", "operator"],
144
+ "allowed_commands": ["docker_*", "system_monitor"]
145
+ },
146
+ "aiadm": {
147
+ "description": "AI Admin server",
148
+ "required_roles": ["admin", "operator"],
149
+ "allowed_commands": ["*"]
150
+ },
151
+ "basic_commands": {
152
+ "description": "Basic command server",
153
+ "required_roles": ["user", "admin", "operator"],
154
+ "allowed_commands": ["help", "config", "health", "info"]
155
+ },
156
+ "help": {
157
+ "description": "Help server",
158
+ "required_roles": ["guest", "user", "admin", "operator"],
159
+ "allowed_commands": ["help"]
160
+ }
161
+ }
162
+ }
@@ -2,4 +2,4 @@
2
2
  Version information for MCP Proxy Adapter.
3
3
  """
4
4
 
5
- __version__ = "6.4.45"
5
+ __version__ = "6.4.47"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-proxy-adapter
3
- Version: 6.4.45
3
+ Version: 6.4.47
4
4
  Summary: Powerful JSON-RPC microservices framework with built-in security, authentication, and proxy registration
5
5
  Home-page: https://github.com/maverikod/mcp-proxy-adapter
6
6
  Author: Vasiliy Zdanovskiy
@@ -1,10 +1,10 @@
1
1
  mcp_proxy_adapter/__init__.py,sha256=iH0EBBsRj_cfZJpAIsgN_8tTdfefhnl6uUKHjLHhWDQ,1037
2
2
  mcp_proxy_adapter/__main__.py,sha256=sq3tANRuTd18euamt0Bmn1sJeAyzXENZ5VvsMwbrDFA,579
3
3
  mcp_proxy_adapter/config.py,sha256=-7iVS0mUWWKNeao7nqTAFlUD6FcMwRlDkchN7OwYsr0,21662
4
- mcp_proxy_adapter/custom_openapi.py,sha256=yLle4CntYK9wpivgn9NflZyJhy-YNrmWjJzt0ai5nP0,14672
4
+ mcp_proxy_adapter/custom_openapi.py,sha256=XRviX-C-ZkSKdBhORhDTdeN_1FWyEfXZADiASft3t9I,28149
5
5
  mcp_proxy_adapter/main.py,sha256=idp3KUR7CT7kTXLVPvvclJlNnt8d_HYl8_jY98uknmo,4677
6
6
  mcp_proxy_adapter/openapi.py,sha256=2UZOI09ZDRJuBYBjKbMyb2U4uASszoCMD5o_4ktRpvg,13480
7
- mcp_proxy_adapter/version.py,sha256=40KDgWkQT1uMrNsnjdOGruVeV96PpkQnbtYpnt2iCzc,75
7
+ mcp_proxy_adapter/version.py,sha256=k32wsC7RY9Zrjtw0IkpujnG2YSeS3O8mXDMuYNpI8NI,75
8
8
  mcp_proxy_adapter/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  mcp_proxy_adapter/api/app.py,sha256=cxjavhNTtaYg2ea-UeHSDnKh8edKVNQ2NbXUDYbufFU,34183
10
10
  mcp_proxy_adapter/api/handlers.py,sha256=iyFGoEuUS1wxbV1ELA0zmaxIyQR7j4zw-4MrD-uIO6E,8294
@@ -42,7 +42,7 @@ mcp_proxy_adapter/commands/load_command.py,sha256=euv9KSeO2zjtQiYfnl4xhZYXARt4x1
42
42
  mcp_proxy_adapter/commands/plugins_command.py,sha256=0FazJGI9_wK_Ac_eFfmzhJGRLxMzKdpLqNMu-mwsqMI,8763
43
43
  mcp_proxy_adapter/commands/protocol_management_command.py,sha256=8Uv6WXrj_W1Sl9JCIT6hl8wo_qYuHWZYq-nBMYOQ4qw,8429
44
44
  mcp_proxy_adapter/commands/proxy_registration_command.py,sha256=owKWQRN96vpEBj-yGF-q1T_FiS9wF525bNw08NfVixs,14774
45
- mcp_proxy_adapter/commands/reload_command.py,sha256=464AdH_RBx5XF3uCbil4G21BWprGlOs7MqVS7RyEEoA,7502
45
+ mcp_proxy_adapter/commands/reload_command.py,sha256=GrdmSRBrN77TaeXJak6csmSi_Wa8wwGSPzFD1NQjTKE,7508
46
46
  mcp_proxy_adapter/commands/result.py,sha256=uWHdLCwwn2_ylXLtIn-yXGiXxWRcbzMSlkgGtpkXQCg,5470
47
47
  mcp_proxy_adapter/commands/role_test_command.py,sha256=3y1pOKwrBFGpfqhQEWEBKxGkuMHa9MqHFlzaqPxM3ik,4181
48
48
  mcp_proxy_adapter/commands/roles_management_command.py,sha256=O6OAHuyJlJGLd654hx377sfv23BBuyRW8sGuR4t76fY,21797
@@ -70,7 +70,7 @@ mcp_proxy_adapter/core/mtls_asgi_app.py,sha256=DT_fTUH1RkvBa3ThbyCyNb-XUHyCb4Dqa
70
70
  mcp_proxy_adapter/core/mtls_server.py,sha256=_hj6QWuExKX2LRohYvjPGFC2qTutS7ObegpEc09QijM,10117
71
71
  mcp_proxy_adapter/core/protocol_manager.py,sha256=3sWOAiMniQY5nu9CHkitIOGN4CXH28hOTwY92D0yasM,15268
72
72
  mcp_proxy_adapter/core/proxy_client.py,sha256=CB6KBhV3vH2GU5nZ27VZ_xlNbYTAU_tnYFrkuK5He58,6094
73
- mcp_proxy_adapter/core/proxy_registration.py,sha256=rBu3udgVfgluId1hMY-fB9lN0rMCVtR9GZnVWwKR0LY,34816
73
+ mcp_proxy_adapter/core/proxy_registration.py,sha256=m58w9iQd5zwXFIpuaDRXKPQ3fhQDBJPkD4w7m742ciY,35200
74
74
  mcp_proxy_adapter/core/role_utils.py,sha256=YwRenGoXI5YrHVbFjKFAH2DJs2miyqhcr9LWF7mxieg,12284
75
75
  mcp_proxy_adapter/core/security_adapter.py,sha256=MAtNthsp7Qj4-oLFzSi7Pr3vWQbWS_uelqa5LGgrXIE,12957
76
76
  mcp_proxy_adapter/core/security_factory.py,sha256=M-1McwUOmuV7Eo-m_P2undtJVNK_KIjDx8o_uRY8rLo,8005
@@ -126,8 +126,12 @@ mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.
126
126
  mcp_proxy_adapter/examples/full_application/hooks/__init__.py,sha256=ORG4cL8cSXEMmZ0CEPz75OVuwg54pdDm2GIBpP4dtcs,200
127
127
  mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py,sha256=vcMHakKOt9pvJDZ6XfgvcYJfrrxg-RnIC8wX6LPqKvA,3500
128
128
  mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py,sha256=P5KjODcVPier-nxjWWpG7yO7ppSjSx-6BJ9FxArD-ps,2988
129
- mcp_proxy_adapter-6.4.45.dist-info/METADATA,sha256=B9glIAXiWWEDgkylpNt9DXSkwlauWxax6r-wO2JX6Co,8511
130
- mcp_proxy_adapter-6.4.45.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
131
- mcp_proxy_adapter-6.4.45.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
132
- mcp_proxy_adapter-6.4.45.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
133
- mcp_proxy_adapter-6.4.45.dist-info/RECORD,,
129
+ mcp_proxy_adapter/schemas/base_schema.json,sha256=v9G9cGMd4dRhCZsOQ_FMqOi5VFyVbI6Cf3fyIvOT9dc,2881
130
+ mcp_proxy_adapter/schemas/openapi_schema.json,sha256=C3yLkwmDsvnLW9B5gnKKdBGl4zxkeU-rEmjTrNVsQU0,8405
131
+ mcp_proxy_adapter/schemas/roles.json,sha256=pgf_ZyqKyXbfGUxvobpiLiSJz9zzxrMuoVWEkEpz3N8,764
132
+ mcp_proxy_adapter/schemas/roles_schema.json,sha256=deHgI7L6GwfBXacOlNtDgDJelDThppClC3Ti4Eh8rJY,5659
133
+ mcp_proxy_adapter-6.4.47.dist-info/METADATA,sha256=KeccpHX7-_B_XgrcwPoO9BSrpgotF4LHJROqP3-mUq8,8511
134
+ mcp_proxy_adapter-6.4.47.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
135
+ mcp_proxy_adapter-6.4.47.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
136
+ mcp_proxy_adapter-6.4.47.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
137
+ mcp_proxy_adapter-6.4.47.dist-info/RECORD,,