Services API¶
Service classes for each Zscaler product (ZCC, ZIA, ZPA, ZDX, ZTW, ZIdentity, EASM, Z-Insights).
Zscaler Integrations MCP Server Services
This module provides the service classes for the Zscaler Integrations MCP Server.
- class BaseService[source]¶
Bases:
ABCBase class for all Zscaler services.
- register_resources(server)[source]¶
Register resources with the MCP server.
- Parameters:
server – The MCP server instance
- abstractmethod register_tools(server, enabled_tools=None, enable_write_tools=False, write_tools=None, disabled_tools=None, selected_toolsets=None)[source]¶
Register tools with the MCP server.
- Parameters:
server – The MCP server instance
enabled_tools – Set of enabled tool names (if None, all tools are enabled)
enable_write_tools – Whether to enable write tools (default: False)
write_tools – Explicit allowlist of write tools (supports wildcards). Requires enable_write_tools=True.
disabled_tools – Set of tool name patterns to exclude (supports wildcards via fnmatch).
selected_toolsets – Set of toolset ids (e.g.
{"zia_url_filtering"}) that this service is allowed to register tools for.Nonedisables toolset filtering. Themetatoolset is always exempt. Seezscaler_mcp.common.toolsets.
- class ZCCService[source]¶
Bases:
BaseServiceZscaler Client Connector (ZCC) service.
- class ZDXService[source]¶
Bases:
BaseServiceZscaler Digital Experience (ZDX) service.
- class ZEASMService[source]¶
Bases:
BaseServiceZscaler External Attack Surface Management (EASM) service.
- class ZIAService[source]¶
Bases:
BaseServiceZscaler Internet Access (ZIA) service.
- class ZIDService[source]¶
Bases:
BaseServiceZscaler ZIdentity service.
- class ZINSService[source]¶
Bases:
BaseServiceZscaler Z-Insights Analytics service.
Provides analytics and reporting capabilities through the Z-Insights GraphQL API. All tools in this service are read-only operations.
Available domains in Z-Insights API: - WEB_TRAFFIC: Web traffic analytics and threat data - CYBER_SECURITY: Cybersecurity incidents and threat analysis - ZERO_TRUST_FIREWALL: Firewall activity and rule analytics - SAAS_SECURITY: Cloud Access Security Broker (CASB) data - SHADOW_IT: Unsanctioned application discovery - IOT: IoT device visibility and statistics
- class ZMSService[source]¶
Bases:
BaseServiceZscaler Microsegmentation (ZMS) service.
Provides read-only tools for managing and inspecting microsegmentation deployments through the ZMS GraphQL API.
Available domains in the ZMS API: - AGENTS: Agent inventory, connection status, and version statistics - AGENT_GROUPS: Agent group management and TOTP secrets - RESOURCES: Workload inventory and protection status - RESOURCE_GROUPS: Resource group membership and protection status - POLICY_RULES: Microsegmentation policy rules and defaults - APP_ZONES: Application zone definitions - APP_CATALOG: Discovered application catalog - NONCES: Provisioning key management - TAGS: Tag namespace, key, and value hierarchy
- class ZPAService[source]¶
Bases:
BaseServiceZscaler Private Access (ZPA) service.
- class ZTWService[source]¶
Bases:
BaseServiceZscaler Cloud & Branch Connector (ZTW) service.
- get_available_services()[source]¶
Get all available services.
- Returns:
Dictionary mapping service names to service classes
- Return type:
Dict[str, Type]
- get_service_names()[source]¶
Get the names of all available services.
- Returns:
List of available service names
- Return type:
List[str]
Service Overview¶
The Zscaler Integrations MCP Server provides service classes for each Zscaler product:
ZCC Service¶
Zscaler Client Connector service for device management.
Method |
Description |
|---|---|
|
List ZCC devices |
|
Export device data to CSV |
|
List trusted networks |
|
List forwarding profiles |
ZIA Service¶
Zscaler Internet Access service for web security and policy management.
Method |
Description |
|---|---|
|
Check or activate configuration changes |
|
Manage malicious URL denylist |
|
Manage authentication exempt URLs |
|
Manage Shadow IT cloud applications |
|
Manage cloud firewall rules |
|
Perform geographical lookups |
|
Discover GRE internal IP ranges |
|
Manage GRE tunnels |
|
Manage IP destination groups |
|
Manage IP source groups |
|
List and retrieve user groups |
|
List and retrieve user departments |
|
List and retrieve users |
|
Manage locations |
|
Manage network application groups |
|
Manage rule labels |
|
Manage SSL inspection rules |
|
Retrieve current sandbox quota usage |
|
Retrieve sandbox behavioral analysis hash list |
|
Retrieve sandbox file hash usage counts |
|
Retrieve sandbox analysis report for a specific hash |
|
Manage static IP addresses |
|
Manage URL categories |
|
Manage VPN credentials |
ZPA Service¶
Zscaler Private Access service for zero trust network access.
Method |
Description |
|---|---|
|
Manage access policy rules |
|
Manage app connector groups |
|
Manage inspection policy rules |
|
List and search app protection profiles |
|
Retrieve application segments by type |
|
Manage application segments |
|
Manage application servers |
|
Manage browser access certificates |
|
Retrieve enrollment certificates |
|
Manage client forwarding policy rules |
|
Manage isolation policy rules |
|
Retrieve cloud browser isolation profiles |
|
Retrieve posture profiles |
|
Manage privileged remote access credentials |
|
Manage privileged remote access portals |
|
Manage provisioning keys |
|
Query SAML attributes |
|
Manage SCIM attributes |
|
Retrieve SCIM groups |
|
Manage segment groups |
|
Manage server groups |
|
Manage service edge groups |
|
Manage timeout policy rules |
|
Retrieve trusted networks |
ZDX Service¶
Zscaler Digital Experience service for application performance monitoring.
Method |
Description |
|---|---|
|
Discover departments or locations |
|
Discover devices using filters |
|
List active applications |
|
Get application scores or trends |
|
Retrieve application metrics |
|
List users/devices for applications |
|
List software inventory |
|
List ongoing alerts |
|
List historical alert rules |
|
Retrieve deep trace information |
ZTW Service¶
Zscaler Cloud & Branch Connector service for branch connectivity.
Method |
Description |
|---|---|
|
Manage IP destination groups |
|
Manage IP groups |
|
Manage IP source groups |
|
Manage network service groups |
|
List admin roles |
|
List admin users |
|
Manage workload discovery service settings |
ZIdentity Service¶
Zscaler Identity service for user and group management.
Method |
Description |
|---|---|
|
Retrieve group information |
|
Retrieve user information |
EASM Service¶
Zscaler External Attack Surface Management service for monitoring external assets.
Method |
Description |
|---|---|
|
List all EASM organizations |
|
List security findings for an organization |
|
Get details for a specific finding |
|
Get evidence for a finding |
|
Get complete scan output for a finding |
|
List lookalike domains for an organization |
|
Get details for a specific lookalike domain |
Z-Insights Service¶
Zscaler Z-Insights Analytics service for traffic and threat analytics.
Z-Insights provides read-only analytics through Zscaler’s GraphQL-based analytics API. All tools in this service query historical data with a 24-48 hour processing delay.
Note
Z-Insights uses OneAPI authentication (OAuth2). Data queries should use time ranges that end at least 2 days ago.
Available Domains:
WEB_TRAFFIC: Web traffic analytics and threat data
CYBER_SECURITY: Cybersecurity incidents and threat analysis
ZERO_TRUST_FIREWALL: Firewall activity and rule analytics
SAAS_SECURITY: Cloud Access Security Broker (CASB) data
SHADOW_IT: Unsanctioned application discovery
IOT: IoT device visibility and statistics
Method |
Description |
|---|---|
|
Get web traffic analytics grouped by location |
|
Get total/overall web traffic volume |
|
Get web protocol distribution (HTTP, HTTPS, etc.) |
|
Get threat category analytics (malware, phishing, spyware) |
|
Get threat class analytics (virus, trojan, ransomware) |
|
Get cybersecurity incidents by category |
|
Get incidents grouped by location, user, app, or department |
|
Get daily cybersecurity incident trends |
|
Get incidents correlated by threat category and application |
|
Get firewall traffic by action (allow/block) |
|
Get firewall traffic grouped by location |
|
Get firewall network service usage |
|
Get CASB SaaS application usage report |
|
Get discovered shadow IT applications |
|
Get shadow IT summary statistics |
|
Get IoT device statistics and classifications |
Key Parameters:
start_days_ago/end_days_ago: Recommended way to specify time range (e.g., 7 to 2 for last week)start_time/end_time: Alternative epoch milliseconds for specific timestampstraffic_unit: TRANSACTIONS (request counts) or BYTES (data volume)include_trend: Include time series trend datatrend_interval: DAY or HOUR for trend granularity
Usage Examples¶
Accessing Services¶
from zscaler_mcp.client import get_zscaler_client
client = get_zscaler_client()
# Access ZIA service
zia_service = client.zia
# Access ZPA service
zpa_service = client.zpa
# Access ZDX service
zdx_service = client.zdx
# Access ZCC service
zcc_service = client.zcc
# Access ZTW service
ztw_service = client.ztw
# Access ZIdentity service
zid_service = client.zid
Service Methods¶
# ZIA example
from zscaler_mcp.client import get_zscaler_client
client = get_zscaler_client()
# List users
users = client.zia.users.list_users()
# List URL categories
categories = client.zia.url_categories.list_categories()
# ZPA example
# List application segments
segments = client.zpa.application_segments.list_segments()
# List segment groups
groups = client.zpa.segment_groups.list_groups()
Z-Insights Analytics¶
# Z-Insights authenticates via OneAPI (OAuth2)
from zscaler_mcp.client import get_zscaler_client
client = get_zscaler_client(service="zins")
# Get web traffic by location for the past week
# Using days_ago approach (recommended)
import time
# Calculate timestamps: 7 days ago to 2 days ago
current_time_ms = int(time.time() * 1000)
end_time = current_time_ms - (2 * 24 * 60 * 60 * 1000) # 2 days ago
start_time = current_time_ms - (7 * 24 * 60 * 60 * 1000) # 7 days ago
# Get traffic by location
entries, response, err = client.zins.web_traffic.get_traffic_by_location(
start_time=start_time,
end_time=end_time,
traffic_unit="TRANSACTIONS",
limit=10
)
# Get threat categories
entries, response, err = client.zins.web_traffic.get_threat_super_categories(
start_time=start_time,
end_time=end_time,
traffic_unit="TRANSACTIONS",
limit=50
)
# Get web protocols distribution
entries, response, err = client.zins.web_traffic.get_protocols(
start_time=start_time,
end_time=end_time,
traffic_unit="BYTES",
limit=20
)