Netskope NPA MCP Server
A Model Context Protocol (MCP) server for managing Netskope Network Private Access (NPA) infrastructure through Large Language Models (LLMs).
Warning
Still lots of work needs to be done for all 50 tools to be operational, i strongly advise against using this with any production environment
Demonstration
https://github.com/johnneerdael/netskope-mcp/raw/refs/heads/main/demo.mov
Installation
Option 1: NPM Package
Install the package using npm:
npm install @johnneerdael/netskope-mcp
Option 2: Local Development
Clone the repository and install dependencies:
git clone https://github.com/johnneerdael/netskope-mcp.git
cd netskope-mcp
npm install
npm run build
MCP Configuration
Add the following configuration to your MCP settings file:
Windows with WSL
For NPM installation:
{
"mcpServers": {
"netskope-mcp": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"source ~/.nvm/nvm.sh && NETSKOPE_BASE_URL=https://your-tenant.goskope.com NETSKOPE_API_KEY=your-token npx -y @johnneerdael/netskope-mcp"
]
}
}
}
For local development:
{
"mcpServers": {
"netskope-mcp": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"cd /path/to/netskope-mcp && NETSKOPE_BASE_URL=https://your-tenant.goskope.com NETSKOPE_API_KEY=your-token node dist/cli.js"
]
}
}
}
Linux and macOS
For NPM installation:
{
"mcpServers": {
"netskope-mcp": {
"command": "npx",
"args": ["-y", "@johnneerdael/netskope-mcp"],
"env": {
"NETSKOPE_BASE_URL": "https://your-tenant.goskope.com",
"NETSKOPE_API_KEY": "your-token"
}
}
}
}
For local development:
{
"mcpServers": {
"netskope-mcp": {
"command": "node",
"args": ["dist/cli.js"],
"cwd": "/path/to/netskope-mcp",
"env": {
"NETSKOPE_BASE_URL": "https://your-tenant.goskope.com",
"NETSKOPE_API_KEY": "your-token"
}
}
}
}
Environment Variables
The Netskope NPA MCP Server requires the following environment variables to be configured for proper operation:
Required Variables
NETSKOPE_BASE_URL
- Description : The base URL of your Netskope tenant
- Format : Full URL including protocol
- Example :
https://your-tenant.goskope.com
- Usage : Used for all API communications with your Netskope tenant
- Note : Must be the complete tenant URL without any path components
NETSKOPE_API_KEY
- Description : API token for authentication with Netskope services
- Format : String token from Netskope admin console
- Example :
030f31f7d57fd94834af57a3edc4bbda
- Usage : Required for authenticating all API requests
- Security Note : Keep this token secure and never commit it to version control
Configuration Examples
Development Environment
export NETSKOPE_BASE_URL="https://dev-tenant.goskope.com"
export NETSKOPE_API_KEY="your-development-token"
Production Environment
export NETSKOPE_BASE_URL="https://prod-tenant.goskope.com"
export NETSKOPE_API_KEY="your-production-token"
AlertsTools
getAlertConfig
Description : Retrieves the current alert configuration settings for publishers, including notification preferences for various events such as upgrades and connection status changes.
Required Parameters : None
Response Schema :
{
adminUsers: string[], // Array of admin user emails to notify
eventTypes: string[], // Array of event types to monitor
selectedUsers: string // Additional users to notify
}
Event Types :
UPGRADE_WILL_START
: Notification before a publisher upgrade begins
UPGRADE_STARTED
: Notification when upgrade process initiates
UPGRADE_SUCCEEDED
: Notification upon successful upgrade completion
UPGRADE_FAILED
: Notification if upgrade process fails
CONNECTION_FAILED
: Notification when publisher connection issues occur
Usage Examples :
- "Check which administrators are configured to receive upgrade notifications: Use
getAlertConfig
to return the current list of admin users and their notification preferences."
- "Verify the alert configuration before a planned maintenance window: Use
getAlertConfig
to ensure the right team members will be notified of upgrade events."
- "Audit the publisher monitoring setup: Use
getAlertConfig
to show which critical events are being tracked and who receives notifications."
updateAlertConfig
Description : Updates the alert configuration settings for publishers, allowing customization of notification preferences for various system events including upgrades and connection status changes.
Required Parameters :
{
adminUsers: string[], // Array of admin user emails to receive notifications
eventTypes: string[], // Array of event types to monitor
selectedUsers: string // Additional users to receive notifications
}
Response Schema : Same as getAlertConfig
Usage Examples :
- "Configure notifications: Update alert settings to ensure critical events are properly monitored."
- "Modify recipients: Adjust the list of administrators who receive specific types of alerts."
- "Event selection: Customize which event types trigger notifications for different user groups."
LocalBrokerTools
PolicyTools
listRules
Description : Lists all policy rules configured in your Netskope Private Access environment. These rules define access controls for private applications using Zero Trust Network Access (ZTNA) principles.
Required Parameters : None
Optional Parameters :
fields
: Array of specific fields to return
filter
: Filter criteria for the rules
limit
: Maximum number of rules to return
offset
: Number of rules to skip
sortby
: Field to sort by
sortorder
: Sort direction ('asc' or 'desc')
Response Schema :
{
data: {
rules: Array<{
id: number,
name: string,
description?: string,
enabled: boolean,
action: 'allow' | 'block',
policy_group_id: number,
priority: number,
conditions: Array<{
type: 'private_app' | 'user' | 'group' | 'organization_unit' | 'location' | 'device',
operator: 'in' | 'not_in' | 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with',
value: string | string[] | number | number[]
}>,
created_at: string,
updated_at: string
}>
},
status: 'success' | 'error',
total: number
}
Usage Examples :
- "Audit access policies to review all configured rules and their conditions to ensure proper access controls."
- "Prioritize rules: List rules sorted by priority to understand the order of policy evaluation and identify potential conflicts."
- "Filter specific policies: Retrieve rules related to specific applications or user groups using the filter parameter."
getRule
Description : Retrieves detailed information about a specific policy rule by its ID. Use this to examine individual rule configurations and conditions.
Required Parameters :
id
: Numeric identifier of the policy rule
Optional Parameters :
fields
: Array of specific fields to return
Response Schema :
{
data: {
id: number,
name: string,
description?: string,
enabled: boolean,
action: 'allow' | 'block',
policy_group_id: number,
priority: number,
conditions: Array<{
type: 'private_app' | 'user' | 'group' | 'organization_unit' | 'location' | 'device',
operator: 'in' | 'not_in' | 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with',
value: string | string[] | number | number[]
}>,
created_at: string,
updated_at: string
},
status: 'success' | 'error'
}
Usage Examples :
- "Troubleshoot access issues: Examine specific rule details to understand why access might be blocked or allowed."
- "Verify rule conditions: Check the exact conditions configured for a critical access policy."
- "Review rule history: Check creation and update timestamps to track policy changes."
createRule
Description : Creates a new policy rule to control access to private applications. Rules can be based on various conditions including user identity, device status, and location.
Required Parameters :
{
name: string, // Rule name
description?: string, // Optional rule description
enabled: boolean, // Rule status
action: 'allow' | 'block', // Access action
policy_group_id: number, // Associated policy group
priority: number, // Rule priority
conditions: Array<{
type: 'private_app' | 'user' | 'group' | 'organization_unit' | 'location' | 'device',
operator: 'in' | 'not_in' | 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with',
value: string | string[] | number | number[]
}>
}
Usage Examples :
- "Implement least privilege access: Create rules that grant access only to specific applications based on user roles and device status."
- "Set up location-based policies: Define rules that restrict access based on user location for compliance requirements."
- "Configure group-based access: Create rules that allow specific user groups to access designated private applications."
updateRule
Description : Updates an existing policy rule's configuration. Use this to modify access controls, conditions, or rule properties.
Required Parameters :
id
: Numeric identifier of the rule to update
data
: Updated rule configuration following the same schema as create_rule
Response Schema :
{
data: {
// Updated rule details (same as get_rule response)
},
status: 'success' | 'error'
}
Usage Examples :
- "Adjust access conditions: Modify rule conditions to accommodate new security requirements or organizational changes."
- "Update rule priority: Change a rule's priority to ensure proper policy evaluation order."
- "Enable/disable rules: Toggle rule status during maintenance or when implementing policy changes."
deleteRule
PrivateAppsTools
PublishersTools
UpgradeProfileTools
listUpgradeProfiles
Description : Lists all upgrade profiles configured in your Netskope environment. Upgrade profiles define when and how publisher upgrades are performed.
Required Parameters : None
Response Schema :
{
data: {
upgrade_profiles: Array<{
id: number,
external_id: number,
name: string,
docker_tag: string,
enabled: boolean,
frequency: string, // Cron format: minute hour day * DAY_OF_WEEK
timezone: string, // Standard timezone identifier
release_type: 'Beta' | 'Latest' | 'Latest-1' | 'Latest-2',
created_at: string,
updated_at: string,
next_update_time?: number,
num_associated_publisher: number,
upgrading_stage?: number,
will_start?: boolean
}>
},
status: 'success' | 'not found',
total: number
}
Usage Examples :
- "Review upgrade schedules: List all profiles to understand when different publishers are scheduled for upgrades."
- "Audit configurations: Check all upgrade profiles for consistency in settings and schedules."
- "Monitor upgrade status: View which profiles are actively upgrading or scheduled for updates."
getUpgradeProfile
- Description : Retrieves detailed information about a specific upgrade profile, including its schedule and configuration.
- Required Parameters :
id
: Numeric identifier of the upgrade profile
- Response Schema : Same as individual profile in list_upgrade_profiles
- Usage Examples :
- "Verify settings: Check specific profile configuration before an upgrade window."
- "Troubleshoot upgrades: Examine profile details when investigating upgrade issues."
- "Monitor progress: Track the status of an ongoing upgrade process."
createUpgradeProfile
Description : Creates a new upgrade profile to manage automated publisher upgrades. Profiles control when and how updates are applied to publishers.
Required Parameters :
{
name: string, // Profile name
enabled: boolean, // Profile status
docker_tag: string, // Docker image tag for upgrade
frequency: string, // Cron schedule format
timezone: string, // Timezone for schedule
release_type: 'Beta' | 'Latest' | 'Latest-1' | 'Latest-2'
}
Usage Examples :
- "Schedule maintenance: Create a profile for regular off-hours upgrades."
- "Beta testing: Set up a profile for testing new releases on selected publishers."
- "Regional updates: Create profiles aligned with different timezone maintenance windows."
updateUpgradeProfile
Description : Updates an existing upgrade profile's configuration, allowing modification of schedule, release type, and other settings.
Required Parameters :
id
: Profile identifier
data
: Updated profile configuration (same schema as create_upgrade_profile)
Response Schema :
{
data: {
// Updated profile details (same as get_upgrade_profile response)
},
status: 'success' | 'not found'
}
Usage Examples :
- "Adjust schedule: Modify upgrade timing to better align with maintenance windows."
- "Change release track: Update profile to use a different release type."
- "Enable/disable upgrades: Toggle profile status during change freeze periods."
deleteUpgradeProfile
SteeringTools
ValidationTools
validateName
Description : Validates names for various resources (publishers, private apps, policies, etc.) to ensure they meet naming requirements.
Required Parameters :
{
resourceType: 'publisher' | 'private_app' | 'policy' | 'policy_group' | 'upgrade_profile',
name: string,
tagType?: 'publisher' | 'private_app'
}
Response Schema :
{
status: 'success' | 'error',
data: {
valid: boolean,
message?: string
}
}
Usage Examples :
- "Name validation: Check if a proposed resource name meets requirements."
- "Tag verification: Validate tag names before creation."
- "Policy naming: Ensure policy names follow conventions."
validateResource
Description : Validates complete resource configurations before creation or update operations.
Required Parameters :
{
resourceType: 'publisher' | 'private_app' | 'policy' | 'policy_group' | 'upgrade_profile',
data: {
name: string,
// Additional resource-specific fields
}
}
Response Schema :
{
status: 'success' | 'error',
data: {
valid: boolean,
errors?: string[]
}
}
Usage Examples :
- "Configuration validation: Verify resource settings before creation."
- "Update verification: Validate changes before applying updates."
- "Compliance check: Ensure resources meet required standards."
searchResources
Description : Searches for publishers or private applications based on specified criteria.
Required Parameters :
{
resourceType: 'publishers' | 'private_apps',
query: string
}
Response Schema : Resource-specific response format
Usage Examples :
- "Resource search: Find resources matching specific criteria."
- "Publisher lookup: Search for publishers by name or attributes."
- "Application discovery: Find private apps matching search terms."