Skip to main content
Glama

MCP Server Template

by rwxproject
main.pyโ€ข1.26 kB
#!/usr/bin/env python3 """ Main entry point for the MCP Server - maintains backward compatibility This file serves as a simple wrapper that imports and runs the new modular server, ensuring existing deployment methods continue to work while providing access to the new, well-structured codebase. """ import sys import asyncio import logging logger = logging.getLogger(__name__) def main(): """Main entry point that imports and runs the modular server""" try: # Import the server from the new modular structure from src.mcp_server.server import main as server_main logger.info("๐Ÿš€ Starting MCP Server via main.py (backward compatibility mode)") # Run the server asyncio.run(server_main()) except ImportError as e: logger.error(f"โŒ Error importing server module: {e}") logger.error("Make sure the src/mcp_server package is properly installed") sys.exit(1) except Exception as e: logger.error(f"โŒ Error starting server: {e}") sys.exit(1) if __name__ == "__main__": # Setup basic logging for the wrapper logging.basicConfig( format="[%(levelname)s]: %(message)s", level=logging.INFO ) main()

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/rwxproject/mcp-server-template'

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