Skip to main content
Glama

MCP Learning Project

by BerdTan
start_server.pyโ€ข1.29 kB
#!/usr/bin/env python3 """ Simple script to start the MCP Testing Harness server """ import asyncio import logging import sys from pathlib import Path # Add src to path sys.path.insert(0, str(Path(__file__).parent / "src")) from core.server import MCPServer # Set up logging logging.basicConfig( level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' ) logger = logging.getLogger(__name__) async def main(): """Start the MCP server.""" print("๐Ÿš€ Starting MCP Testing Harness Server") print("=" * 45) try: # Create server server = MCPServer(host="localhost", port=8000, debug=True) print(f"๐Ÿ“ก Server will start on localhost:8000") print("๐Ÿ”„ Starting server...") # Start the server await server.start() except KeyboardInterrupt: print("\n๐Ÿ›‘ Server stopped by user") except Exception as e: print(f"โŒ Error starting server: {e}") sys.exit(1) if __name__ == "__main__": try: asyncio.run(main()) except KeyboardInterrupt: print("\n๐Ÿ›‘ Server stopped") except Exception as e: print(f"โŒ Fatal error: {e}") sys.exit(1)

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/BerdTan/mcpharness'

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