mcp-proxy-adapter 6.4.11__py3-none-any.whl → 6.4.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. mcp_proxy_adapter/core/app_factory.py +105 -32
  2. mcp_proxy_adapter/core/mtls_server.py +314 -0
  3. mcp_proxy_adapter/core/server_engine.py +1 -0
  4. mcp_proxy_adapter/examples/basic_framework/main.py +3 -2
  5. mcp_proxy_adapter/examples/create_test_configs.py +301 -0
  6. mcp_proxy_adapter/examples/run_full_test_suite.py +59 -21
  7. mcp_proxy_adapter/examples/setup_test_environment.py +11 -12
  8. mcp_proxy_adapter/version.py +1 -1
  9. {mcp_proxy_adapter-6.4.11.dist-info → mcp_proxy_adapter-6.4.14.dist-info}/METADATA +1 -1
  10. {mcp_proxy_adapter-6.4.11.dist-info → mcp_proxy_adapter-6.4.14.dist-info}/RECORD +13 -24
  11. mcp_proxy_adapter/examples/examples/basic_framework/__init__.py +0 -9
  12. mcp_proxy_adapter/examples/examples/basic_framework/commands/__init__.py +0 -4
  13. mcp_proxy_adapter/examples/examples/basic_framework/hooks/__init__.py +0 -4
  14. mcp_proxy_adapter/examples/examples/basic_framework/main.py +0 -52
  15. mcp_proxy_adapter/examples/examples/full_application/__init__.py +0 -13
  16. mcp_proxy_adapter/examples/examples/full_application/commands/__init__.py +0 -7
  17. mcp_proxy_adapter/examples/examples/full_application/commands/custom_echo_command.py +0 -92
  18. mcp_proxy_adapter/examples/examples/full_application/commands/dynamic_calculator_command.py +0 -97
  19. mcp_proxy_adapter/examples/examples/full_application/hooks/__init__.py +0 -7
  20. mcp_proxy_adapter/examples/examples/full_application/hooks/application_hooks.py +0 -88
  21. mcp_proxy_adapter/examples/examples/full_application/hooks/builtin_command_hooks.py +0 -81
  22. mcp_proxy_adapter/examples/examples/full_application/main.py +0 -61
  23. mcp_proxy_adapter/examples/examples/full_application/proxy_endpoints.py +0 -188
  24. {mcp_proxy_adapter-6.4.11.dist-info → mcp_proxy_adapter-6.4.14.dist-info}/WHEEL +0 -0
  25. {mcp_proxy_adapter-6.4.11.dist-info → mcp_proxy_adapter-6.4.14.dist-info}/entry_points.txt +0 -0
  26. {mcp_proxy_adapter-6.4.11.dist-info → mcp_proxy_adapter-6.4.14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,301 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Test Configuration Generator
4
+ Creates test configurations by copying the comprehensive config and enabling/disabling specific options.
5
+ Author: Vasiliy Zdanovskiy
6
+ email: vasilyvz@gmail.com
7
+ """
8
+ import json
9
+ import shutil
10
+ from pathlib import Path
11
+ from typing import Dict, Any, Optional
12
+
13
+
14
+ class TestConfigGenerator:
15
+ """Generator for test configurations based on comprehensive config."""
16
+
17
+ def __init__(self, comprehensive_config_path: str, output_dir: str = "configs"):
18
+ """
19
+ Initialize the generator.
20
+
21
+ Args:
22
+ comprehensive_config_path: Path to the comprehensive configuration file
23
+ output_dir: Directory to output test configurations
24
+ """
25
+ self.comprehensive_config_path = Path(comprehensive_config_path)
26
+ self.output_dir = Path(output_dir)
27
+ self.output_dir.mkdir(exist_ok=True)
28
+
29
+ # Load the comprehensive config
30
+ with open(self.comprehensive_config_path, 'r', encoding='utf-8') as f:
31
+ self.base_config = json.load(f)
32
+
33
+ def create_config(self, name: str, modifications: Dict[str, Any]) -> Path:
34
+ """
35
+ Create a test configuration with specific modifications.
36
+
37
+ Args:
38
+ name: Name of the configuration (without .json extension)
39
+ modifications: Dictionary of modifications to apply
40
+
41
+ Returns:
42
+ Path to the created configuration file
43
+ """
44
+ # Deep copy the base config
45
+ config = json.loads(json.dumps(self.base_config))
46
+
47
+ # Apply modifications
48
+ for key, value in modifications.items():
49
+ self._set_nested_value(config, key, value)
50
+
51
+ # Save the configuration
52
+ output_path = self.output_dir / f"{name}.json"
53
+ with open(output_path, 'w', encoding='utf-8') as f:
54
+ json.dump(config, f, indent=2, ensure_ascii=False)
55
+
56
+ print(f"✅ Created test config: {output_path}")
57
+ return output_path
58
+
59
+ def _set_nested_value(self, config: Dict, key: str, value: Any):
60
+ """Set a nested value in the configuration using dot notation."""
61
+ keys = key.split('.')
62
+ current = config
63
+
64
+ for k in keys[:-1]:
65
+ if k not in current:
66
+ current[k] = {}
67
+ current = current[k]
68
+
69
+ current[keys[-1]] = value
70
+
71
+ def create_all_test_configs(self):
72
+ """Create all standard test configurations."""
73
+ print("🔧 Creating test configurations from comprehensive config...")
74
+
75
+ # 1. HTTP Simple
76
+ self.create_config("http_simple", {
77
+ "server.port": 8001,
78
+ "ssl.enabled": False,
79
+ "security.enabled": False,
80
+ "proxy_registration.enabled": False,
81
+ "protocols.allowed_protocols": ["http"]
82
+ })
83
+
84
+ # 2. HTTP with Auth
85
+ self.create_config("http_auth", {
86
+ "server.port": 8002,
87
+ "ssl.enabled": False,
88
+ "security.enabled": True,
89
+ "security.auth.enabled": True,
90
+ "security.auth.methods": ["api_key"],
91
+ "security.auth.api_keys": {
92
+ "admin": "admin-secret-key",
93
+ "user": "user-secret-key"
94
+ },
95
+ "proxy_registration.enabled": False,
96
+ "protocols.allowed_protocols": ["http"]
97
+ })
98
+
99
+ # 3. HTTPS Simple
100
+ self.create_config("https_simple", {
101
+ "server.port": 8003,
102
+ "ssl.enabled": True,
103
+ "ssl.cert_file": "certs/localhost_server.crt",
104
+ "ssl.key_file": "keys/localhost_server.key",
105
+ "security.enabled": False,
106
+ "proxy_registration.enabled": False,
107
+ "protocols.allowed_protocols": ["https"]
108
+ })
109
+
110
+ # 4. HTTPS with Auth
111
+ self.create_config("https_auth", {
112
+ "server.port": 8004,
113
+ "ssl.enabled": True,
114
+ "ssl.cert_file": "certs/localhost_server.crt",
115
+ "ssl.key_file": "keys/localhost_server.key",
116
+ "security.enabled": True,
117
+ "security.auth.enabled": True,
118
+ "security.auth.methods": ["api_key"],
119
+ "security.auth.api_keys": {
120
+ "admin": "admin-secret-key",
121
+ "user": "user-secret-key"
122
+ },
123
+ "proxy_registration.enabled": False,
124
+ "protocols.allowed_protocols": ["https"]
125
+ })
126
+
127
+ # 5. mTLS Simple
128
+ self.create_config("mtls_simple", {
129
+ "server.port": 8005,
130
+ "ssl.enabled": True,
131
+ "ssl.cert_file": "certs/localhost_server.crt",
132
+ "ssl.key_file": "keys/localhost_server.key",
133
+ "ssl.ca_cert": "certs/mcp_proxy_adapter_ca_ca.crt",
134
+ "ssl.verify_client": True,
135
+ "security.enabled": True,
136
+ "security.auth.enabled": True,
137
+ "security.auth.methods": ["certificate"],
138
+ "proxy_registration.enabled": False,
139
+ "protocols.allowed_protocols": ["https", "mtls"]
140
+ })
141
+
142
+ # 6. mTLS with Roles
143
+ self.create_config("mtls_with_roles", {
144
+ "server.port": 8006,
145
+ "ssl.enabled": True,
146
+ "ssl.cert_file": "certs/localhost_server.crt",
147
+ "ssl.key_file": "keys/localhost_server.key",
148
+ "ssl.ca_cert": "certs/mcp_proxy_adapter_ca_ca.crt",
149
+ "ssl.verify_client": True,
150
+ "security.enabled": True,
151
+ "security.auth.enabled": True,
152
+ "security.auth.methods": ["certificate"],
153
+ "security.permissions.enabled": True,
154
+ "security.permissions.roles_file": "configs/roles.json",
155
+ "proxy_registration.enabled": False,
156
+ "protocols.allowed_protocols": ["https", "mtls"]
157
+ })
158
+
159
+ # 6a. mTLS without Roles (for security tests)
160
+ self.create_config("mtls_no_roles", {
161
+ "server.port": 8009,
162
+ "ssl.enabled": True,
163
+ "ssl.cert_file": "certs/localhost_server.crt",
164
+ "ssl.key_file": "keys/localhost_server.key",
165
+ "ssl.ca_cert": "certs/mcp_proxy_adapter_ca_ca.crt",
166
+ "ssl.verify_client": True,
167
+ "security.enabled": True,
168
+ "security.auth.enabled": True,
169
+ "security.auth.methods": ["certificate"],
170
+ "security.permissions.enabled": False,
171
+ "proxy_registration.enabled": False,
172
+ "protocols.allowed_protocols": ["https", "mtls"]
173
+ })
174
+
175
+ # 7. mTLS with Proxy Registration
176
+ self.create_config("mtls_with_proxy", {
177
+ "server.port": 8007,
178
+ "ssl.enabled": True,
179
+ "ssl.cert_file": "certs/localhost_server.crt",
180
+ "ssl.key_file": "keys/localhost_server.key",
181
+ "ssl.ca_cert": "certs/mcp_proxy_adapter_ca_ca.crt",
182
+ "ssl.verify_client": True,
183
+ "security.enabled": True,
184
+ "security.auth.enabled": True,
185
+ "security.auth.methods": ["certificate"],
186
+ "proxy_registration.enabled": True,
187
+ "proxy_registration.proxy_url": "http://127.0.0.1:3006",
188
+ "proxy_registration.server_id": "mcp_test_server",
189
+ "proxy_registration.server_name": "MCP Test Server",
190
+ "protocols.allowed_protocols": ["https", "mtls"]
191
+ })
192
+
193
+ # 8. HTTP with Token Auth (for security tests)
194
+ self.create_config("http_token", {
195
+ "server.port": 8010,
196
+ "ssl.enabled": False,
197
+ "security.enabled": True,
198
+ "security.auth.enabled": True,
199
+ "security.auth.methods": ["api_key"],
200
+ "security.auth.api_keys": {
201
+ "admin": "admin-secret-key",
202
+ "user": "user-secret-key"
203
+ },
204
+ "proxy_registration.enabled": False,
205
+ "protocols.allowed_protocols": ["http"]
206
+ })
207
+
208
+ # 9. HTTPS with Token Auth (for security tests)
209
+ self.create_config("https_token", {
210
+ "server.port": 8011,
211
+ "ssl.enabled": True,
212
+ "ssl.cert_file": "certs/localhost_server.crt",
213
+ "ssl.key_file": "keys/localhost_server.key",
214
+ "security.enabled": True,
215
+ "security.auth.enabled": True,
216
+ "security.auth.methods": ["api_key"],
217
+ "security.auth.api_keys": {
218
+ "admin": "admin-secret-key",
219
+ "user": "user-secret-key"
220
+ },
221
+ "proxy_registration.enabled": False,
222
+ "protocols.allowed_protocols": ["https"]
223
+ })
224
+
225
+ # 10. Full Featured (everything enabled)
226
+ self.create_config("full_featured", {
227
+ "server.port": 8008,
228
+ "ssl.enabled": True,
229
+ "ssl.cert_file": "certs/localhost_server.crt",
230
+ "ssl.key_file": "keys/localhost_server.key",
231
+ "ssl.ca_cert": "certs/mcp_proxy_adapter_ca_ca.crt",
232
+ "ssl.verify_client": True,
233
+ "security.enabled": True,
234
+ "security.auth.enabled": True,
235
+ "security.auth.methods": ["certificate", "api_key"],
236
+ "security.auth.api_keys": {
237
+ "admin": "admin-secret-key",
238
+ "user": "user-secret-key"
239
+ },
240
+ "security.permissions.enabled": True,
241
+ "security.permissions.roles_file": "configs/roles.json",
242
+ "security.rate_limit.enabled": True,
243
+ "proxy_registration.enabled": True,
244
+ "proxy_registration.proxy_url": "http://127.0.0.1:3006",
245
+ "proxy_registration.server_id": "mcp_full_server",
246
+ "proxy_registration.server_name": "MCP Full Featured Server",
247
+ "protocols.allowed_protocols": ["http", "https", "mtls", "jsonrpc"]
248
+ })
249
+
250
+ print(f"✅ Created {10} test configurations in {self.output_dir}")
251
+
252
+
253
+ def main():
254
+ """Main entry point."""
255
+ import argparse
256
+
257
+ parser = argparse.ArgumentParser(description="Generate test configurations")
258
+ parser.add_argument(
259
+ "--comprehensive-config",
260
+ default="comprehensive_config.json",
261
+ help="Path to comprehensive configuration file"
262
+ )
263
+ parser.add_argument(
264
+ "--output-dir",
265
+ default="configs",
266
+ help="Output directory for test configurations"
267
+ )
268
+ parser.add_argument(
269
+ "--config-name",
270
+ help="Create a specific configuration (http_simple, https_auth, mtls_with_roles, etc.)"
271
+ )
272
+ parser.add_argument(
273
+ "--modifications",
274
+ help="JSON string of modifications to apply (for custom configs)"
275
+ )
276
+
277
+ args = parser.parse_args()
278
+
279
+ generator = TestConfigGenerator(args.comprehensive_config, args.output_dir)
280
+
281
+ if args.config_name:
282
+ # Create a specific configuration
283
+ if args.modifications:
284
+ modifications = json.loads(args.modifications)
285
+ else:
286
+ # Use predefined modifications
287
+ predefined = {
288
+ "http_simple": {"server.port": 8001, "ssl.enabled": False, "security.enabled": False},
289
+ "https_simple": {"server.port": 8003, "ssl.enabled": True},
290
+ "mtls_simple": {"server.port": 8005, "ssl.enabled": True, "ssl.verify_client": True},
291
+ }
292
+ modifications = predefined.get(args.config_name, {})
293
+
294
+ generator.create_config(args.config_name, modifications)
295
+ else:
296
+ # Create all test configurations
297
+ generator.create_all_test_configs()
298
+
299
+
300
+ if __name__ == "__main__":
301
+ main()
@@ -115,11 +115,7 @@ class FullTestSuiteRunner:
115
115
 
116
116
  try:
117
117
  # Run certificate generation script
118
- cmd = [
119
- sys.executable,
120
- "-m",
121
- "mcp_proxy_adapter.examples.create_certificates_simple",
122
- ]
118
+ cmd = [sys.executable, "create_certificates_simple.py"]
123
119
  self.print_info("Running certificate generation script...")
124
120
 
125
121
  result = subprocess.run(
@@ -143,29 +139,76 @@ class FullTestSuiteRunner:
143
139
  return False
144
140
 
145
141
  def generate_configurations(self) -> bool:
146
- """Generate test configurations."""
142
+ """Generate test configurations from comprehensive config."""
147
143
  self.print_step("4", "Configuration Generation")
148
144
 
149
145
  try:
150
- # Run configuration generation script
151
- cmd = [
152
- sys.executable,
153
- "-m",
154
- "mcp_proxy_adapter.examples.generate_test_configs",
155
- ]
156
- self.print_info("Running configuration generation script...")
146
+ # Check if create_test_configs.py exists
147
+ config_script = self.working_dir / "create_test_configs.py"
148
+ if not config_script.exists():
149
+ self.print_error(f"Configuration generator not found: {config_script}")
150
+ return False
151
+
152
+ # Check if comprehensive_config.json exists
153
+ comprehensive_config = self.working_dir / "comprehensive_config.json"
154
+ if not comprehensive_config.exists():
155
+ self.print_error(f"Comprehensive config not found: {comprehensive_config}")
156
+ return False
157
+
158
+ self.print_info("Generating test configurations from comprehensive config...")
159
+ self.print_info("This will create:")
160
+ self.print_info(" - HTTP configurations (simple and with auth)")
161
+ self.print_info(" - HTTPS configurations (simple and with auth)")
162
+ self.print_info(" - mTLS configurations (simple, with roles, with proxy registration)")
163
+ self.print_info(" - Full featured configuration (everything enabled)")
157
164
 
165
+ # Run the configuration generator
166
+ cmd = [sys.executable, "create_test_configs.py", "--comprehensive-config", "comprehensive_config.json"]
158
167
  result = subprocess.run(
159
168
  cmd, capture_output=True, text=True, cwd=self.working_dir
160
169
  )
161
170
 
162
171
  if result.returncode == 0:
163
- self.print_success("Configurations generated successfully")
172
+ self.print_success("Configuration generation completed successfully!")
164
173
  if result.stdout:
174
+ print("Generator output:")
165
175
  print(result.stdout)
176
+
177
+ # Create roles.json file
178
+ self.print_info("Creating roles.json file...")
179
+ roles_content = {
180
+ "roles": {
181
+ "admin": {
182
+ "permissions": ["*"],
183
+ "description": "Full administrative access"
184
+ },
185
+ "user": {
186
+ "permissions": ["read", "write"],
187
+ "description": "Standard user access"
188
+ },
189
+ "readonly": {
190
+ "permissions": ["read"],
191
+ "description": "Read-only access"
192
+ },
193
+ "guest": {
194
+ "permissions": ["read"],
195
+ "description": "Limited guest access"
196
+ }
197
+ }
198
+ }
199
+
200
+ roles_file = self.configs_dir / "roles.json"
201
+ import json
202
+ with open(roles_file, 'w', encoding='utf-8') as f:
203
+ json.dump(roles_content, f, indent=2, ensure_ascii=False)
204
+ self.print_success(f"Created roles.json: {roles_file}")
205
+
166
206
  return True
167
207
  else:
168
208
  self.print_error("Configuration generation failed!")
209
+ if result.stdout:
210
+ print("Generator output:")
211
+ print(result.stdout)
169
212
  if result.stderr:
170
213
  print("Error output:")
171
214
  print(result.stderr)
@@ -181,12 +224,7 @@ class FullTestSuiteRunner:
181
224
 
182
225
  try:
183
226
  # Run security tests
184
- cmd = [
185
- sys.executable,
186
- "-m",
187
- "mcp_proxy_adapter.examples.run_security_tests",
188
- "--verbose",
189
- ]
227
+ cmd = [sys.executable, "run_security_tests.py", "--verbose"]
190
228
  self.print_info("Running security tests...")
191
229
 
192
230
  # Debug: show current working directory and check files
@@ -260,7 +298,7 @@ class FullTestSuiteRunner:
260
298
  "enabled": True,
261
299
  "cert_file": "certs/localhost_server.crt",
262
300
  "key_file": "keys/localhost_server.key",
263
- "ca_cert": "certs/mcp_proxy_adapter_ca_ca.crt",
301
+ "ca_cert": "certs/test_ca_ca.crt",
264
302
  "client_cert_file": "certs/admin_cert.pem",
265
303
  "client_key_file": "certs/admin_key.pem",
266
304
  "verify_client": True
@@ -420,8 +420,7 @@ import asyncio
420
420
  import ssl
421
421
  from fastapi import FastAPI, Request
422
422
  from fastapi.responses import JSONResponse
423
- from hypercorn.asyncio import serve
424
- from hypercorn.config import Config
423
+ import uvicorn
425
424
 
426
425
 
427
426
  app = FastAPI(title="Test mTLS Proxy Server", version="1.0.0")
@@ -473,7 +472,7 @@ async def health_check():
473
472
  )
474
473
 
475
474
 
476
- async def main():
475
+ def main():
477
476
  """Run the mTLS proxy server."""
478
477
  print("🚀 Starting Test mTLS Proxy Server...")
479
478
  print("📡 Server URL: https://127.0.0.1:3004")
@@ -483,19 +482,19 @@ async def main():
483
482
  print(" GET /health - Health check")
484
483
  print("⚡ Press Ctrl+C to stop\\n")
485
484
 
486
- # Configure hypercorn
487
- config = Config()
488
- config.bind = ["127.0.0.1:3004"]
489
- config.keyfile = "mtls_certificates/server/mcp-proxy.key"
490
- config.certfile = "mtls_certificates/server/mcp-proxy.pem"
491
- config.loglevel = "info"
492
-
493
485
  # Run server with mTLS
494
- await serve(app, config)
486
+ uvicorn.run(
487
+ app,
488
+ host="127.0.0.1",
489
+ port=3004,
490
+ ssl_keyfile="mtls_certificates/server/mcp-proxy.key",
491
+ ssl_certfile="mtls_certificates/server/mcp-proxy.pem",
492
+ log_level="info"
493
+ )
495
494
 
496
495
 
497
496
  if __name__ == "__main__":
498
- asyncio.run(main())
497
+ main()
499
498
  '''
500
499
  )
501
500
 
@@ -2,4 +2,4 @@
2
2
  Version information for MCP Proxy Adapter.
3
3
  """
4
4
 
5
- __version__ = "6.4.11"
5
+ __version__ = "6.4.14"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-proxy-adapter
3
- Version: 6.4.11
3
+ Version: 6.4.14
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
@@ -4,7 +4,7 @@ mcp_proxy_adapter/config.py,sha256=-7iVS0mUWWKNeao7nqTAFlUD6FcMwRlDkchN7OwYsr0,2
4
4
  mcp_proxy_adapter/custom_openapi.py,sha256=yLle4CntYK9wpivgn9NflZyJhy-YNrmWjJzt0ai5nP0,14672
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=QSqFIalgBU1t8DL-yxneIQ7zVK8-re5PzA9QaBZSRjw,75
7
+ mcp_proxy_adapter/version.py,sha256=H2e7NMkKo93HZNRJKiAyNvfQ_4LVFzPu6Git9F7B7ZM,75
8
8
  mcp_proxy_adapter/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  mcp_proxy_adapter/api/app.py,sha256=UQ7_m-LbUzKuuPJPxS_69ahANUQ5rnPwoddQ2MMXNkg,33941
10
10
  mcp_proxy_adapter/api/handlers.py,sha256=iyFGoEuUS1wxbV1ELA0zmaxIyQR7j4zw-4MrD-uIO6E,8294
@@ -53,7 +53,7 @@ mcp_proxy_adapter/commands/token_management_command.py,sha256=tCVjhWqAQ3KhcwSsZU
53
53
  mcp_proxy_adapter/commands/transport_management_command.py,sha256=HEnUyL4S014jheyBwO90u9gnzk0qxBlOJdC_0Sxhq9E,4585
54
54
  mcp_proxy_adapter/commands/unload_command.py,sha256=6CUM9B9c-mNxw7uvt2vcvZSnxMySfoMT5UmDhzNXq38,4984
55
55
  mcp_proxy_adapter/core/__init__.py,sha256=3yt0CFZdsIG8Ln4bg-r4ISYzipm3ZUAxTn0twYTs9FI,867
56
- mcp_proxy_adapter/core/app_factory.py,sha256=oMVEmQIrk6GYyi78rpAzQSH6K0Fq9auv_ByjaQWDUww,19539
56
+ mcp_proxy_adapter/core/app_factory.py,sha256=T-GS0aCINLTKVGumLGJdWWweik0sTW7hFFGxqcDXwD0,21438
57
57
  mcp_proxy_adapter/core/app_runner.py,sha256=1t9p_UkWb1IvZDTD7FOCRMNSpOSgtNeHM3i7PP7x6xc,10605
58
58
  mcp_proxy_adapter/core/auth_validator.py,sha256=q8TNkdolvP-gM6Bvecc6nrVG9al5J31pocdwhguhTBk,19742
59
59
  mcp_proxy_adapter/core/certificate_utils.py,sha256=yeDwi-j42CxK_g-r5_ragGFY_HdSgDfTWHVUjDHF6nI,38480
@@ -67,6 +67,7 @@ mcp_proxy_adapter/core/errors.py,sha256=UNEfdmK0zPGJrWH1zUMRjHIJMcoVDcBO4w8xxKHB
67
67
  mcp_proxy_adapter/core/logging.py,sha256=gNI6vfPQC7jrUtVu6NeDsmU72JPlrRRBhtJipL1eVrI,9560
68
68
  mcp_proxy_adapter/core/mtls_asgi.py,sha256=tvk0P9024s18dcCHY9AaQIecT4ojOTv21EuQWXwooU0,5200
69
69
  mcp_proxy_adapter/core/mtls_asgi_app.py,sha256=DT_fTUH1RkvBa3ThbyCyNb-XUHyCb4DqaKA1gcZC6z4,6538
70
+ mcp_proxy_adapter/core/mtls_server.py,sha256=_hj6QWuExKX2LRohYvjPGFC2qTutS7ObegpEc09QijM,10117
70
71
  mcp_proxy_adapter/core/protocol_manager.py,sha256=3sWOAiMniQY5nu9CHkitIOGN4CXH28hOTwY92D0yasM,15268
71
72
  mcp_proxy_adapter/core/proxy_client.py,sha256=CB6KBhV3vH2GU5nZ27VZ_xlNbYTAU_tnYFrkuK5He58,6094
72
73
  mcp_proxy_adapter/core/proxy_registration.py,sha256=qgNtdYPXZ6F1oXRXIXCICCL9NYkOteGrTVPQAI8P5mg,31483
@@ -75,7 +76,7 @@ mcp_proxy_adapter/core/security_adapter.py,sha256=MAtNthsp7Qj4-oLFzSi7Pr3vWQbWS_
75
76
  mcp_proxy_adapter/core/security_factory.py,sha256=M-1McwUOmuV7Eo-m_P2undtJVNK_KIjDx8o_uRY8rLo,8005
76
77
  mcp_proxy_adapter/core/security_integration.py,sha256=oGYoJKrPoOqw262j3daeG8B6ro4pOGYMWmZR_hsTQOc,16881
77
78
  mcp_proxy_adapter/core/server_adapter.py,sha256=qKTHdVAwoCUHEF4G3EEUG7JTfLS49ucYMQSkQAz_F4E,9601
78
- mcp_proxy_adapter/core/server_engine.py,sha256=S91QvY4PPLfllz4Bfv4gDXb4ErIQhHp1FP9Uez_d-mU,9456
79
+ mcp_proxy_adapter/core/server_engine.py,sha256=qmxdkBv-YsQsvxVVQ-_xiAyDshxtnrKBquPJoUjo2fw,9471
79
80
  mcp_proxy_adapter/core/settings.py,sha256=D6cF4R_5gJ0XFGxzXUIzeqe-_muu6HL561TAei9wwZ0,10521
80
81
  mcp_proxy_adapter/core/ssl_utils.py,sha256=Rjl79d5LdhDzxiMtaIRd9OFh0hTeRANItYFXk-7c5pA,9498
81
82
  mcp_proxy_adapter/core/transport_manager.py,sha256=eJbGa3gDVFUBFUzMK5KEmpbUDXOOShtzszUIEf7Jk0A,9292
@@ -83,6 +84,7 @@ mcp_proxy_adapter/core/unified_config_adapter.py,sha256=zBGYdLDZ3G8f3Y9tmtm0Ne0U
83
84
  mcp_proxy_adapter/core/utils.py,sha256=wBdDYBDWQ6zbwrnl9tykHjo0FjJVsLT_x8Bjk1lZX60,3270
84
85
  mcp_proxy_adapter/examples/__init__.py,sha256=k1F-EotAFbJ3JvK_rNgiH4bUztmxIWtYn0AfbAZ1ZGs,450
85
86
  mcp_proxy_adapter/examples/create_certificates_simple.py,sha256=xoa4VtKzb9y7Mn8VqcK-uH2q7Bf89vrWG6G3LQmhJng,27086
87
+ mcp_proxy_adapter/examples/create_test_configs.py,sha256=lFO27tn0V7fUM7i3xa7liV3a-0nXvm12RXe9AiOLs5g,11545
86
88
  mcp_proxy_adapter/examples/debug_request_state.py,sha256=Z3Gy2-fWtu7KIV9OkzGDLVz7TpL_h9V_99ica40uQBU,4489
87
89
  mcp_proxy_adapter/examples/debug_role_chain.py,sha256=GLVXC2fJUwP8UJnXHchd1t-H53cjWLJI3RqTPrKmaak,8750
88
90
  mcp_proxy_adapter/examples/demo_client.py,sha256=en2Rtb70B1sQmhL-vdQ4PDpKNNl_mfll2YCFT_jFCAg,10191
@@ -92,34 +94,21 @@ mcp_proxy_adapter/examples/generate_certificates_and_tokens.py,sha256=hUCoJH3fy5
92
94
  mcp_proxy_adapter/examples/generate_test_configs.py,sha256=FWg_QFJAWinI1lw05RccX4_VbhsCBEKPpZA6I9v6KAs,14379
93
95
  mcp_proxy_adapter/examples/proxy_registration_example.py,sha256=vemRhftnjbiOBCJkmtDGqlWQ8syTG0a8755GCOnaQsg,12503
94
96
  mcp_proxy_adapter/examples/run_example.py,sha256=yp-a6HIrSk3ddQmbn0KkuKwErId0aNfj028TE6U-zmY,2626
95
- mcp_proxy_adapter/examples/run_full_test_suite.py,sha256=5tdmTKcgfUMfl_ZTaY0xBly3sTXXTjJJcpja_LN7V-0,17685
97
+ mcp_proxy_adapter/examples/run_full_test_suite.py,sha256=G8G9AgVKadA5-J4khahybS9i_xCbhp0Xl8kAaSCoA7U,19935
96
98
  mcp_proxy_adapter/examples/run_proxy_server.py,sha256=SBLSSY2F_VEBQD3MsCE_Pa9xFE6Sszr3vHdE9QOEN4Y,5242
97
99
  mcp_proxy_adapter/examples/run_security_tests.py,sha256=0vjaUdWC-rLyviQuNxM3PtfiU9TzSRuxGxWMehrFA_w,23311
98
100
  mcp_proxy_adapter/examples/run_security_tests_fixed.py,sha256=2BKMT0_-FhmcZA73hdQOt2XR7Cgb9Sq8qBI88BkwAAA,10934
99
101
  mcp_proxy_adapter/examples/security_test_client.py,sha256=K5gEVat1SJS2pBVxqLl5c9-uiiG12k8UT3ULQDXZ2Uc,35713
100
- mcp_proxy_adapter/examples/setup_test_environment.py,sha256=4aYYwtEsUhjLWXTY5l_xklspJYdL3LYA3tD98SxTAdg,34658
102
+ mcp_proxy_adapter/examples/setup_test_environment.py,sha256=LR4kGneHELgk4lHMfA9k1yFZ1o3KEQelqOXua5oT88Q,34540
101
103
  mcp_proxy_adapter/examples/test_config.py,sha256=ekEoUZe9q484vU_0IxOVhQdNMVJXG3IpmQpP--VmuDI,6491
102
104
  mcp_proxy_adapter/examples/test_config_generator.py,sha256=PBXk1V_awJ-iBlbE66Pme5sQwu6CJDxkmqgm8uPtM58,4091
103
105
  mcp_proxy_adapter/examples/test_examples.py,sha256=CYlVatdHUVC_rwv4NsvxFG3GXiKIyxPDUH43BOJHjrU,12330
104
106
  mcp_proxy_adapter/examples/universal_client.py,sha256=n1-cBPOiCipA86Zcc_mI_jMywDMZS1p3u5JT3AqTsrQ,27577
105
107
  mcp_proxy_adapter/examples/basic_framework/__init__.py,sha256=4aYD--R6hy9n9CUxj7Osb9HcdVUMJ6_cfpu4ujkbCwI,345
106
- mcp_proxy_adapter/examples/basic_framework/main.py,sha256=AkGUXW05_AK8SEKwlS_0isJKKqjulKBDPp7t36t9QJk,1787
108
+ mcp_proxy_adapter/examples/basic_framework/main.py,sha256=XdGrD_52hhCVHwqx4XmfVmd7tlfp6WE-qZ0gw05SyB0,1792
107
109
  mcp_proxy_adapter/examples/basic_framework/commands/__init__.py,sha256=_VQNLUEdsxUG-4yt9BZI_vtOxHAdGG0OUSsP6Wj-Vz4,76
108
110
  mcp_proxy_adapter/examples/basic_framework/hooks/__init__.py,sha256=IE_EIXMnkdXuakZn7wLD9kBFyfDF5lYi56ejgiBeb-A,70
109
111
  mcp_proxy_adapter/examples/commands/__init__.py,sha256=zvY_OpH_B1bVc_khrNIl6O8vqCw1FH6gGMAsJAkGWGY,170
110
- mcp_proxy_adapter/examples/examples/basic_framework/__init__.py,sha256=4aYD--R6hy9n9CUxj7Osb9HcdVUMJ6_cfpu4ujkbCwI,345
111
- mcp_proxy_adapter/examples/examples/basic_framework/main.py,sha256=Vg8LMaXPsHUccfZlNWA2XVaJ1t7FDCK8nPshAVJAhxU,1776
112
- mcp_proxy_adapter/examples/examples/basic_framework/commands/__init__.py,sha256=_VQNLUEdsxUG-4yt9BZI_vtOxHAdGG0OUSsP6Wj-Vz4,76
113
- mcp_proxy_adapter/examples/examples/basic_framework/hooks/__init__.py,sha256=IE_EIXMnkdXuakZn7wLD9kBFyfDF5lYi56ejgiBeb-A,70
114
- mcp_proxy_adapter/examples/examples/full_application/__init__.py,sha256=xGiPYhRAzs1Fh9wA8HoowV-Gg9QMLaMZn-OamExq1TI,320
115
- mcp_proxy_adapter/examples/examples/full_application/main.py,sha256=i5o9prWKQv6EXUyNZQERlfah9q-GoloKMQHOVqnQIgo,1991
116
- mcp_proxy_adapter/examples/examples/full_application/proxy_endpoints.py,sha256=Kt_WAsG61HLTMkKQ1mQqjvlX9I4TcfwYq0NaRR9HKvM,6179
117
- mcp_proxy_adapter/examples/examples/full_application/commands/__init__.py,sha256=yQHxVSFkAyFLUOdk42QOebUODPlQV9IbydPgF3UKsGM,217
118
- mcp_proxy_adapter/examples/examples/full_application/commands/custom_echo_command.py,sha256=H7FPJmVJNWT61rPWxep06-7hsYRt8XYBUSBiwqpBurU,3096
119
- mcp_proxy_adapter/examples/examples/full_application/commands/dynamic_calculator_command.py,sha256=DFTqVnIDt6nBdZ27-vD_f1X2cFcDInVQiCEq9ltw4lA,3428
120
- mcp_proxy_adapter/examples/examples/full_application/hooks/__init__.py,sha256=ORG4cL8cSXEMmZ0CEPz75OVuwg54pdDm2GIBpP4dtcs,200
121
- mcp_proxy_adapter/examples/examples/full_application/hooks/application_hooks.py,sha256=vcMHakKOt9pvJDZ6XfgvcYJfrrxg-RnIC8wX6LPqKvA,3500
122
- mcp_proxy_adapter/examples/examples/full_application/hooks/builtin_command_hooks.py,sha256=P5KjODcVPier-nxjWWpG7yO7ppSjSx-6BJ9FxArD-ps,2988
123
112
  mcp_proxy_adapter/examples/full_application/__init__.py,sha256=xGiPYhRAzs1Fh9wA8HoowV-Gg9QMLaMZn-OamExq1TI,320
124
113
  mcp_proxy_adapter/examples/full_application/main.py,sha256=ogL3Bil_5puGnwvMh3YNOjrW76FIzzoggKEp-04HSfo,7855
125
114
  mcp_proxy_adapter/examples/full_application/proxy_endpoints.py,sha256=Kt_WAsG61HLTMkKQ1mQqjvlX9I4TcfwYq0NaRR9HKvM,6179
@@ -132,8 +121,8 @@ mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py,sha25
132
121
  mcp_proxy_adapter/examples/scripts/config_generator.py,sha256=SKFlRRCE_pEHGbfjDuzfKpvV2DMwG6lRfK90uJwRlJM,33410
133
122
  mcp_proxy_adapter/examples/scripts/create_certificates_simple.py,sha256=yCWdUIhMSDPwoPhuLR9rhPdf7jLN5hCjzNfYYgVyHnw,27769
134
123
  mcp_proxy_adapter/examples/scripts/generate_certificates_and_tokens.py,sha256=hUCoJH3fy5WeR_YMHj-_W0mR0ZKUWqewH4FVN3yWyrM,17972
135
- mcp_proxy_adapter-6.4.11.dist-info/METADATA,sha256=wMmu8wxnHQ5yesrOKSu-Aapi8J4xmOnvC5AfTvGQYV8,6087
136
- mcp_proxy_adapter-6.4.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
137
- mcp_proxy_adapter-6.4.11.dist-info/entry_points.txt,sha256=J3eV6ID0lt_VSp4lIdIgBFTqLCThgObNNxRCbyfiMHw,70
138
- mcp_proxy_adapter-6.4.11.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
139
- mcp_proxy_adapter-6.4.11.dist-info/RECORD,,
124
+ mcp_proxy_adapter-6.4.14.dist-info/METADATA,sha256=hpdPu6cT_Znpcu4hbYyi1pFD05pUVnGT4x3TAzgKzvY,6087
125
+ mcp_proxy_adapter-6.4.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
126
+ mcp_proxy_adapter-6.4.14.dist-info/entry_points.txt,sha256=J3eV6ID0lt_VSp4lIdIgBFTqLCThgObNNxRCbyfiMHw,70
127
+ mcp_proxy_adapter-6.4.14.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
128
+ mcp_proxy_adapter-6.4.14.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- """Basic Framework Example.
2
-
3
- This example demonstrates the fundamental usage of MCP Proxy Adapter
4
- with minimal configuration and basic command registration.
5
-
6
- Note: This package provides a basic example of MCP Proxy Adapter usage.
7
- The main application is created dynamically in main.py and not exported
8
- as a global variable for this example.
9
- """
@@ -1,4 +0,0 @@
1
- """Basic Framework Commands.
2
-
3
- Commands for the basic framework example.
4
- """
@@ -1,4 +0,0 @@
1
- """Basic Framework Hooks.
2
-
3
- Hooks for the basic framework example.
4
- """
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Basic Framework Example
4
- This example demonstrates the basic usage of the MCP Proxy Adapter framework
5
- with minimal configuration and built-in commands.
6
- Author: Vasiliy Zdanovskiy
7
- email: vasilyvz@gmail.com
8
- """
9
- import sys
10
- import argparse
11
- import asyncio
12
- from pathlib import Path
13
-
14
- # Add the framework to the path
15
- sys.path.insert(0, str(Path(__file__).parent.parent.parent))
16
- from mcp_proxy_adapter.core.app_factory import create_and_run_server
17
-
18
-
19
- def main():
20
- """Main entry point for the basic framework example."""
21
- parser = argparse.ArgumentParser(description="Basic Framework Example")
22
- parser.add_argument(
23
- "--config", "-c", required=True, help="Path to configuration file"
24
- )
25
- parser.add_argument("--host", help="Server host")
26
- parser.add_argument("--port", type=int, help="Server port")
27
- parser.add_argument("--debug", action="store_true", help="Enable debug mode")
28
- args = parser.parse_args()
29
- # Override configuration if specified
30
- config_overrides = {}
31
- if args.host:
32
- config_overrides["host"] = args.host
33
- if args.port:
34
- config_overrides["port"] = args.port
35
- if args.debug:
36
- config_overrides["debug"] = True
37
- print(f"🚀 Starting Basic Framework Example")
38
- print(f"📋 Configuration: {args.config}")
39
- print("=" * 50)
40
- # Use the factory method to create and run the server
41
- asyncio.run(create_and_run_server(
42
- config_path=args.config,
43
- title="Basic Framework Example",
44
- description="Basic MCP Proxy Adapter with minimal configuration",
45
- version="1.0.0",
46
- host=config_overrides.get("host", "0.0.0.0"),
47
- log_level="debug" if config_overrides.get("debug", False) else "info",
48
- ))
49
-
50
-
51
- if __name__ == "__main__":
52
- main()