Netskope MCP server

Integrates with Netskope API to manage private access infrastructure, enabling automated publisher lifecycle, app configuration, policy creation, and traffic diagnostics.
Back to servers
Provider
John Neerdael
Release date
Jan 25, 2025
Language
TypeScript
Package
Stats
2.1K downloads
2 stars

The Netskope NPA MCP Server enables management of Netskope Network Private Access infrastructure through Large Language Models. It provides a structured way to configure and control private applications, publishers, policies, and other ZTNA components via a Model Context Protocol interface.

Installation

Installing the Package

You can install the Netskope MCP server using npm:

npm install @johnneerdael/netskope-mcp

Configuring MCP

To connect the MCP server with your Netskope environment, you'll need to set up your MCP configuration with the appropriate environment variables.

Configuration for Windows with WSL

Add this to your MCP settings file:

{
  "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"
      ]
    }
  }
}

Configuration for Linux and macOS

Add this to your MCP settings file:

{
  "mcpServers": {
    "netskope-mcp": {
      "command": "npx",
      "args": ["-y", "@johnneerdael/netskope-mcp"],
      "env": {
        "NETSKOPE_BASE_URL": "https://your-tenant.goskope.com",
        "NETSKOPE_API_KEY": "your-token"
      }
    }
  }
}

Environment Variables

The server requires these environment variables:

Required Variables

  • NETSKOPE_BASE_URL: Your Netskope tenant URL (e.g., https://your-tenant.goskope.com)
  • NETSKOPE_API_KEY: API token from your Netskope admin console

Example configuration:

export NETSKOPE_BASE_URL="https://your-tenant.goskope.com"
export NETSKOPE_API_KEY="your-api-token"

Managing Private Applications

Listing Applications

To get an inventory of all private applications:

listPrivateApps

This returns details about all configured private applications including their protocols, publishers, and security settings.

Creating a New Private Application

To create a private application:

createPrivateApp({
  "app_name": "Internal Website",
  "host": "internalapp.company.local",
  "clientless_access": true,
  "is_user_portal_app": true,
  "protocols": [
    {
      "port": "443",
      "type": "tcp"
    }
  ],
  "publishers": [
    {
      "publisher_id": "123",
      "publisher_name": "DC-Publisher-1"
    }
  ],
  "trust_self_signed_certs": false,
  "use_publisher_dns": true
})

Retrieving Application Details

To retrieve details for a specific application:

getPrivateApp({ id: 123 })

Updating Applications

To modify an existing application:

updatePrivateApp({
  "id": 123,
  "app_name": "Updated Internal Website",
  "host": "internalapp.company.local",
  "clientless_access": true,
  "is_user_portal_app": true,
  "protocols": [
    {
      "port": "443",
      "type": "tcp"
    },
    {
      "port": "8080",
      "type": "tcp"
    }
  ],
  "publishers": [
    {
      "publisher_id": "123",
      "publisher_name": "DC-Publisher-1"
    }
  ],
  "trust_self_signed_certs": false,
  "use_publisher_dns": true
})

Managing Publishers

Publishers are components that handle traffic to private applications.

Listing Publishers

To view all configured publishers:

listPublishers

Creating a New Publisher

To create a new publisher:

createPublisher({
  "name": "East-DC-Publisher",
  "lbrokerconnect": false
})

Generating Registration Tokens

To generate a token for registering a publisher:

generatePublisherRegistrationToken({ publisherId: 123 })

Upgrading Publishers

To initiate upgrades for multiple publishers:

bulkUpgradePublishers({
  "publishers": {
    "apply": {
      "upgrade_request": true
    },
    "id": ["123", "456"]
  }
})

Managing Access Policies

Listing Policy Rules

To view all configured access rules:

listRules

Creating a New Policy Rule

To create an access policy rule:

createRule({
  "name": "Finance Team Access",
  "description": "Allow Finance team access to financial applications",
  "enabled": true,
  "action": "allow",
  "policy_group_id": 1,
  "priority": 10,
  "conditions": [
    {
      "type": "group",
      "operator": "in",
      "value": ["Finance"]
    },
    {
      "type": "private_app",
      "operator": "in",
      "value": [123, 456]
    }
  ]
})

Updating Policy Rules

To modify an existing rule:

updateRule({
  "id": 10,
  "name": "Finance Team Access",
  "description": "Allow Finance team access to financial applications - Updated",
  "enabled": true,
  "action": "allow",
  "policy_group_id": 1,
  "priority": 5,
  "conditions": [
    {
      "type": "group",
      "operator": "in",
      "value": ["Finance"]
    },
    {
      "type": "private_app",
      "operator": "in",
      "value": [123, 456, 789]
    }
  ]
})

Managing Local Brokers

Local brokers enable on-premises ZTNA deployments.

Listing Local Brokers

To view all configured local brokers:

listLocalBrokers

Creating a Local Broker

To create a new local broker:

createLocalBroker({
  "name": "HQ-Local-Broker"
})

Generating Registration Tokens

To generate a token for broker registration:

generateLocalBrokerRegistrationToken({ id: 123 })

Managing Alerts

Viewing Alert Configuration

To check the current alert settings:

getAlertConfig

Updating Alert Configuration

To modify alert notification settings:

updateAlertConfig({
  "adminUsers": ["[email protected]", "[email protected]"],
  "eventTypes": [
    "UPGRADE_WILL_START",
    "UPGRADE_STARTED",
    "UPGRADE_SUCCEEDED",
    "UPGRADE_FAILED",
    "CONNECTION_FAILED"
  ],
  "selectedUsers": "[email protected]"
})

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later