Skip to main content
Glama
launch_mcp.py•3.67 kB
#!/usr/bin/env python3 """ MCP System Launcher - Quick start for your MCP ecosystem """ import asyncio import sys import os import subprocess import webbrowser import time import requests from pathlib import Path def quick_start(): """Quick start the entire MCP system.""" print("šŸš€ MCP SYSTEM QUICK LAUNCHER") print("=" * 50) print("šŸŽÆ Starting your complete MCP ecosystem...") print("") # Start server print("1ļøāƒ£ Starting MCP Server...") server_process = None try: if Path("start_mcp_server.py").exists(): server_process = subprocess.Popen( [sys.executable, "start_mcp_server.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE ) elif Path("enhanced_mcp_server.py").exists(): server_process = subprocess.Popen( [sys.executable, "enhanced_mcp_server.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE ) else: print("āŒ MCP Server not found!") return print(" ā³ Waiting for server to start...") time.sleep(5) # Check if server is running try: response = requests.get("http://localhost:8000/api/health", timeout=5) if response.status_code == 200: print(" āœ… MCP Server running!") else: print(" āš ļø Server started but not fully ready") except: print(" āš ļø Server starting (may take a moment)") # Open web interfaces print("\n2ļøāƒ£ Opening Web Interfaces...") # Main server interface try: webbrowser.open("http://localhost:8000") print(" āœ… Main Interface: http://localhost:8000") except: print(" āš ļø Could not open main interface") # Client interface client_path = Path("mcp_client/web_client.html") if client_path.exists(): try: client_url = f"file:///{client_path.absolute()}" webbrowser.open(client_url) print(" āœ… Client Interface opened") except: print(" āš ļø Could not open client interface") print("\n3ļøāƒ£ System Ready!") print("=" * 50) print("🌐 Web Interfaces:") print(" • Main Server: http://localhost:8000") print(" • API Docs: http://localhost:8000/docs") print(" • Client Interface: mcp_client/web_client.html") print("") print("šŸ’» Command Line:") print(" • CLI Client: python mcp_client/cli_client.py") print(" • Interactive: python start_mcp_client.py") print(" • Test System: python test_mcp_system.py") print("") print("šŸ“ Agents:") print(" • Drop agents in: agents/custom/") print(" • Templates in: agents/templates/") print("") print("šŸ›‘ Press Ctrl+C to stop the server") print("=" * 50) # Keep running try: while True: time.sleep(1) except KeyboardInterrupt: print("\n\nšŸ›‘ Stopping MCP Server...") if server_process: server_process.terminate() server_process.wait() print("āœ… MCP System stopped") except Exception as e: print(f"āŒ Error: {e}") if server_process: server_process.terminate() if __name__ == "__main__": quick_start()

Latest Blog Posts

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/tensorwhiz141/MCP2'

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