Portnox MCP Server
2.9K
The Portnox MCP Server enables AI assistants and Large Language Models (LLMs) to securely interact with Portnox Cloud through the Model Context Protocol (MCP). It exposes the Portnox Cloud REST API as a collection of MCP tools, allowing AI clients to retrieve information, answer operational questions, and perform administrative tasks using natural language.
Instead of manually navigating the Portnox Cloud interface or writing custom scripts against the REST API, administrators can simply ask an AI assistant to perform common management tasks such as locating devices, reviewing network access infrastructure, updating configuration, or managing endpoints.
The Portnox MCP Server acts as a secure translation layer between AI assistants and the Portnox Cloud REST API.
Rather than allowing an AI model to interact directly with the API, the MCP server exposes well-defined tools that map to supported Portnox operations. When an AI assistant receives a request, it calls the appropriate MCP tool, which authenticates to Portnox Cloud, performs the requested operation, and returns structured results back to the AI.
The server supports both read-only operations (such as searching for devices or retrieving configuration) and administrative operations (such as updating sites, modifying network devices, blocking endpoints, or deleting devices), depending on the permissions granted to the configured Portnox administrator account.
Current functionality includes management of several common Portnox Cloud resources, including:
The server supports two authentication methods:
Note
Federated identity providers such as Microsoft Entra ID, Okta, Google Workspace, or Active Directory are not supported for credential-based authentication.
For production deployments, Portnox recommends using a dedicated administrator account that follows the principle of least privilege.
The Portnox MCP Server is designed for:
It is especially useful for organizations that want to incorporate Portnox Cloud into AI-driven workflows without building custom integrations against the REST API.
Examples of tasks an AI assistant can perform through the MCP server include:
10.10.5.0/24.These natural language interactions eliminate the need for administrators to manually navigate the Portnox Cloud interface or write one-off API scripts for common operational tasks.
Organizations increasingly want AI assistants to help operate their infrastructure, but exposing production APIs directly to AI models introduces complexity and security concerns.
The Portnox MCP Server addresses this by:
By using MCP, organizations can integrate Portnox Cloud into their AI ecosystem using an open standard rather than vendor-specific integrations.
The MCP server communicates only with your Portnox Cloud tenant using the credentials you provide.
Because the server can perform administrative actions, it should always be deployed using a dedicated administrator account with only the permissions required for your intended workflows.
As with any AI-enabled administrative interface, production deployments should include appropriate change management, auditing, and validation processes before allowing AI assistants to make configuration changes.
The Portnox MCP Server is an open source project sponsored by Portnox and licensed under the Apache License 2.0.
Community contributions are welcome through GitHub, including:
Disclaimer
This project is community supported. Official Portnox technical support, SLAs, and maintenance commitments are not provided for the MCP Server itself. Issues, feature requests, and contributions should be submitted through the project's GitHub repository.
| Parameter | Mandatory? | Default | Example Value | Notes |
|---|---|---|---|---|
| PORTNOX_BASE_URL | Optional | https://clear.portnox.com:8081/CloudPortalBackEnd | https://clear.portnox.com:8081/CloudPortalBackEnd | Override only if your tenant/API base differs. |
| PORTNOX_TOKEN_FILE | Conditionally required | empty | /run/secrets/portnox_token | One auth option. Preferred for production. |
| PORTNOX_TOKEN | Conditionally required | empty | abcdef123456 | Used if PORTNOX_TOKEN_FILE is not set/empty. |
| PORTNOX_USERNAME | Conditionally required | empty | [email protected] | Credential auth option; must be paired with PORTNOX_PASSWORD. |
| PORTNOX_PASSWORD | Conditionally required | empty | MyPassword | Credential auth option; must be paired with PORTNOX_USERNAME. |
| PORTNOX_TIMEOUT_SECONDS | Optional | 30 | 30 | HTTP timeout per API request. |
| PORTNOX_VERIFY_TLS | Optional | TRUE | TRUE | Set false only for troubleshooting/non-production. |
| MCP_TRANSPORT | Optional | stdio | streamable-http | "For Docker network usage use streamable-http or sse." |
| MCP_HOST | Optional | 0.0.0.0 | 0.0.0.0 | Bind address for network |
| MCP_PORT | Optional | 8765 | 8765 | Listener port for network transports. |
| MCP_ALLOWED_HOSTS | Optional | * | * | Host header allowlist. |
| MCP_FORCE_HOST_HEADER | Optional | localhost:8765 | localhost:8765 | Rewrites Host header before MCP transport checks. |
| MCP_ENABLE_HTTPS | Optional | FALSE | TRUE | Enables HTTPS/TLS listener. |
| MCP_TLS_CERT_FILE | Conditionally required | empty | /certs/server.crt | Required with MCP_TLS_KEY_FILE when using PEM/CRT pair. |
| MCP_TLS_KEY_FILE | Conditionally required | empty | /certs/server.key | Required with MCP_TLS_CERT_FILE when using PEM/CRT pair. |
| MCP_TLS_PFX_FILE | Conditionally required | empty | /certs/server.p12 | Alternative to cert/key pair. Converts PFX/P12 automatically. |
| MCP_TLS_PFX_PASSWORD | Optional | empty | MyPfxPassword | Used if PFX/P12 is password-protected. |
| MCP_TLS_CERT_DIR | Optional | /tmp/portnox-mcp-tls | /tmp/portnox-mcp-tls | Stores generated/converted cert artifacts. |
| MCP_TLS_SELF_SIGNED_CN | Optional | localhost | localhost | CN for auto-generated self-signed certificate. |
| Argument | Mandatory? | Default | Example Value | Notes |
|---|---|---|---|---|
| --transport | Optional | stdio | streamable-http | "stdio / sse / streamable-http" |
| --host | Optional | 0.0.0.0 | 0.0.0.0 | Network bind address |
| --port | Optional | 8765 | 8765 | Network port |
| --allowed-hosts | Optional | * | * | Host header allowlist |
| --force-host-header | Optional | localhost:8765 | localhost:8765 | Host rewrite |
| --https | Optional | FALSE | --https | Enables HTTPS |
| --tls-cert-file | Conditionally required | empty | /certs/server.crt | Pair with --tls-key-file |
| --tls-key-file | Conditionally required | empty | /certs/server.key | Pair with --tls-cert-file |
| --tls-pfx-file | Conditionally required | empty | /certs/server.p12 | Alternative to cert/key pair |
| --tls-pfx-password | Optional | empty | MyPfxPassword | PFX password if needed |
| --tls-cert-dir | Optional | /tmp/portnox-mcp-tls | /tmp/portnox-mcp-tls | Cert output dir |
| --tls-self-signed-cn | Optional | localhost | localhost | Self-signed CN |
| --daemon | Optional | FALSE | --daemon | Usually not used in containers |
| --pid-file | Optional | /var/run/portnox-mcp-server.pid | /tmp/portnox.pid | Relevant with daemon mode |
| --log-file | Optional | /var/log/portnox-mcp-server.log | /tmp/portnox.log | Relevant with daemon mode |
| --log-level | Optional | INFO | DEBUG | Logging verbosity |
| --token-file | Conditionally required | none | /run/secrets/portnox_token | CLI auth option |
| --token | Conditionally required | none | abcdef123456 | CLI auth option |
| --username | Conditionally required | none | [email protected] | CLI auth option (pair with password) |
| --password | Conditionally required | none | P@$$w0rd1 | CLI auth option (pair with username) |
Example usage
Credential Based Authentication (Portnox Cloud Admin Account)
sudo docker run -p 8765:8765 \
-e MCP_ENABLE_HTTPS='true' \
-e PORTNOX_USERNAME='[email protected]' \
-e PORTNOX_PASSWORD='password' \
portnox/portnox-mcp:latest \
python /app/server.py --transport streamable-http --host 0.0.0.0 --port 8765
Bearer Token Authentication
sudo docker run -p 8765:8765 \
-e MCP_ENABLE_HTTPS='true' \
-e PORTNOX_TOKEN="<your token"
portnox/portnox-mcp:latest \
python /app/server.py --transport streamable-http --host 0.0.0.0 --port 8765
Example TLS Self-Signed claude_desktop_config.json
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://<MCP_SERVER_IP>:<MCP_SERVER_PORT>/mcp"
],
"env": {
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
}
}
},
Example HTTP claude_desktop_config.json
{
"mcpServers": {
"my-mcp-server": {
"command": "/opt/homebrew/bin/npx",
"args": [
"-y",
"mcp-remote",
"<MCP_SERVER_IP>:<MCP_SERVER_PORT>/mcp",
"--allow-http",
"--transport",
"http-first"
]
}
},
Content type
Image
Digest
sha256:bffc4176b…
Size
31.1 MB
Last updated
2 months ago
docker pull portnox/portnox-mcpPulls:
49
Last week