We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ashrobertsdragon/cpanel-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
server.py•852 B
import sys
from mcp.server.fastmcp import FastMCP
from cpanel_mcp.connector import Connector
from cpanel_mcp.cpanel_email import CpanelEmail
"""MCP server entry point."""
def run_mcp(connector: Connector):
"""Run the MCP server with the specified connector.
Args:
connector (Connector): The connector to use.
"""
mcp = FastMCP("cPanel Email Management")
api = CpanelEmail(connector)
for tool in api.tools:
mcp.add_tool(tool)
mcp.run()
def main() -> None:
"""Main entry point for the MCP server."""
if len(sys.argv) < 2:
raise ValueError("No connector specified")
connector = sys.argv[1]
if connector.upper() not in Connector.__members__:
raise ValueError("Invalid connector specified")
run_mcp(Connector[connector.upper()])
if __name__ == "__main__":
main()