Server API

The main MCP server implementation and configuration.

Server Configuration

The server can be configured using environment variables or command-line arguments.

Environment Variables

Server Configuration Environment Variables

Variable

Default

Description

ZSCALER_MCP_SERVICES

All services

Comma-separated list of services to enable

ZSCALER_MCP_TRANSPORT

stdio

Transport method (stdio, sse, streamable-http)

ZSCALER_MCP_DEBUG

false

Enable debug logging

ZSCALER_MCP_HOST

127.0.0.1

Host for HTTP transports

ZSCALER_MCP_PORT

8000

Port for HTTP transports

Command Line Arguments

Server Command Line Arguments

Argument

Default

Description

--services

All services

Comma-separated list of services to enable

--transport

stdio

Transport method (stdio, sse, streamable-http)

--debug

false

Enable debug logging

--host

127.0.0.1

Host for HTTP transports

--port

8000

Port for HTTP transports

Transport Methods

The server supports three transport methods:

Stdio Transport

Default transport method using standard input/output for communication.

from zscaler_mcp.server import main
main()

SSE Transport

Server-Sent Events transport for web-based clients.

from zscaler_mcp.server import main
main(transport="sse", host="0.0.0.0", port=8000)

Streamable HTTP Transport

HTTP-based transport with streaming support.

from zscaler_mcp.server import main
main(transport="streamable-http", host="0.0.0.0", port=8000)