Kaballas commited on
Commit
702f422
·
1 Parent(s): 377ab59
src/mcp_server_mariadb_vector/server.py CHANGED
@@ -1,5 +1,6 @@
1
  import argparse
2
  import json
 
3
  from typing import Annotated, List, Literal
4
 
5
  import mariadb
@@ -264,11 +265,29 @@ if hasattr(mcp, "_tools"):
264
  else:
265
  print("[DEBUG] No _tools attribute found on mcp.")
266
 
267
- # Debug: Print all routes in the MCP app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  print("[DEBUG] Registered routes in MCP app:")
269
  try:
270
  for route in app.routes:
271
- print(f" - {getattr(route, 'path', str(route))} {getattr(route, 'methods', '')}")
272
  except Exception as e:
273
  print(f"[DEBUG] Could not inspect MCP app routes: {e}")
274
 
 
1
  import argparse
2
  import json
3
+ import os
4
  from typing import Annotated, List, Literal
5
 
6
  import mariadb
 
265
  else:
266
  print("[DEBUG] No _tools attribute found on mcp.")
267
 
268
+ # Debug: Print all environment variables
269
+ print("[DEBUG] Environment variables:")
270
+ for k, v in os.environ.items():
271
+ print(f" {k}={v}")
272
+
273
+ # Debug: Print MCP tool manager contents if available
274
+ if hasattr(mcp, '_tool_manager'):
275
+ print("[DEBUG] MCP _tool_manager contents:")
276
+ print(getattr(mcp, '_tool_manager', None))
277
+ if hasattr(mcp._tool_manager, '__dict__'):
278
+ for k, v in mcp._tool_manager.__dict__.items():
279
+ print(f" {k}: {v}")
280
+ else:
281
+ print("[DEBUG] No _tool_manager attribute found on mcp.")
282
+
283
+ # Debug: Print MCP app type
284
+ print(f"[DEBUG] MCP app type: {type(app)}")
285
+
286
+ # Debug: Print all routes in the MCP app (with more details)
287
  print("[DEBUG] Registered routes in MCP app:")
288
  try:
289
  for route in app.routes:
290
+ print(f" - path: {getattr(route, 'path', str(route))}, methods: {getattr(route, 'methods', '')}, name: {getattr(route, 'name', '')}, endpoint: {getattr(route, 'endpoint', '')}")
291
  except Exception as e:
292
  print(f"[DEBUG] Could not inspect MCP app routes: {e}")
293