Skip to main content
Glama
ashrobertsdragon

cPanel MCP Server

test_server.py745 B
from unittest import mock import pytest import sys from cpanel_mcp.server import main from cpanel_mcp.connector import Connector def test_main_no_args(): with mock.patch.object(sys, "argv", ["server.py"]): with pytest.raises(ValueError, match="No connector specified"): main() def test_main_invalid_connector(): with mock.patch.object(sys, "argv", ["server.py", "INVALID"]): with pytest.raises((ValueError, KeyError)): main() def test_main_valid_connector(): with mock.patch.object(sys, "argv", ["server.py", "API"]): with mock.patch("cpanel_mcp.server.run_mcp") as mock_run: main() mock_run.assert_called_once_with(Connector.API)

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/ashrobertsdragon/cpanel-mcp'

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