Skip to main content
Glama

MCP Video Parser

debug_server.py2.31 kB
#!/usr/bin/env python3 """Debug script to test server startup.""" import asyncio import sys from pathlib import Path # Add src to path sys.path.insert(0, str(Path(__file__).parent)) from mcp.server.fastmcp import FastMCP from src.storage.manager import StorageManager from src.processors.video import VideoProcessor from src.llm.ollama_client import OllamaClient from src.tools.mcp_tools import VideoTools from src.utils.config import get_config async def debug_server(): """Debug server startup.""" print("🔍 Debug: Starting server components...") try: # Load config config = get_config() print("✅ Config loaded") # Initialize components storage = StorageManager() print("✅ Storage manager initialized") llm_client = OllamaClient() print("✅ LLM client initialized") processor = VideoProcessor(storage, llm_client) print("✅ Video processor initialized") # Create MCP server mcp = FastMCP("debug-test") print("✅ MCP server created") # Register tools tools = VideoTools(processor, storage) tools.register(mcp) print("✅ Tools registered") # Test streamable HTTP app app = mcp.streamable_http_app() print(f"✅ HTTP app created: {type(app)}") print(f" App routes: {len(getattr(app, 'routes', []))}") # Try to add health route from starlette.responses import JSONResponse from starlette.routing import Route async def health_check(request): return JSONResponse({"status": "healthy"}) app.routes.append(Route("/health", health_check)) print("✅ Health route added") # Test uvicorn config import uvicorn config = uvicorn.Config(app, host="localhost", port=8001, log_level="debug") print("✅ Uvicorn config created") # Test if server would start (don't actually start) print("🎯 All components ready! Server should work.") except Exception as e: print(f"❌ Error: {e}") import traceback traceback.print_exc() if __name__ == "__main__": asyncio.run(debug_server())

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/michaelbaker-dev/mcpVideoParser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server