Panorama MCP Server
Provides read-only policy review for Palo Alto Networks Panorama, including listing device groups, retrieving security rules, searching policy coverage, and preclearing rule requests by detecting duplicates, broader coverage, conflicts, and partial overlaps.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Panorama MCP Server Preclear my proposed rule for postgres from app zone to data zone"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Panorama MCP Server
A read-only Model Context Protocol server for Palo Alto Panorama policy review.
The server is intentionally narrow:
reads security rules through the PAN-OS XML API;
normalizes rule fields into deterministic sets;
finds exact duplicates, broader coverage, conflicts, and partial overlaps;
returns evidence and a preclear decision;
never commits to Panorama or pushes to managed firewalls.
This is a companion implementation for the blog post Running Palo Alto Panorama MCP Servers. It is not an official Palo Alto Networks product.
Prerequisites
Python 3.11 or newer.
Network access from the server host to Panorama management HTTPS.
A dedicated read-only Panorama API administrator or service account.
An API key injected through a secret manager or a protected environment.
A lab or non-production device group for the first rollout.
Do not use a superuser key. Do not disable TLS verification in production.
Related MCP server: LimaCharlie MCP
Install
Using uv:
cd panorama-mcp-server
uv venv
source .venv/bin/activate
uv pip install -e '.[dev]'
cp .env.example .envUsing pip:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e '.[dev]'
cp .env.example .envSet the required values in .env:
PANORAMA_URL=https://panorama.example.net
PANORAMA_API_KEY=the-read-only-key
PANORAMA_VERIFY_TLS=true
PANORAMA_DEVICE_GROUP=shared
PANORAMA_RULEBASE=pre-rulebaseThe API key is passed only to the outbound Panorama request and is never included in tool results or application logs.
Run the server
For a local MCP client using stdio:
panorama-mcpFor a development Streamable HTTP endpoint:
panorama-mcp --httpThe official MCP Python SDK serves Streamable HTTP at the SDK default endpoint. Confirm the exact endpoint and authentication requirements in the MCP host before exposing it beyond localhost. This project does not add HTTP authentication; put a remote deployment behind an authenticated gateway and network policy.
Example local client configuration:
{
"mcpServers": {
"panorama-readonly": {
"command": "/absolute/path/to/panorama-mcp-server/.venv/bin/panorama-mcp",
"env": {
"PANORAMA_URL": "https://panorama.example.net",
"PANORAMA_API_KEY": "injected-by-the-client-secret-manager"
}
}
}
}Do not put a real API key in a committed client configuration.
Available tools
list_device_groups
Lists the device groups visible to the configured API key.
get_security_rules
Reads and normalizes security rules from one device group and rulebase.
Arguments:
{
"device_group": "shared",
"rulebase": "pre-rulebase"
}search_policy_coverage
Accepts a normalized request and returns exact duplicates, broader coverage, conflicts, and partial overlaps.
Example request:
{
"device_group": "shared",
"rulebase": "pre-rulebase",
"source_zones": ["app"],
"source_addresses": ["reporting-subnet"],
"destination_zones": ["data"],
"destination_addresses": ["postgres-prod"],
"applications": ["postgresql"],
"services": ["service-postgresql"],
"action": "allow"
}preclear_rule_request
Runs the deterministic policy comparison and returns:
blocked when an exact duplicate, broader same-action rule, or conflict is found;
review-required when there is only a partial overlap or no matching rule;
the matching rule, position, classification, and reason;
explicit unknowns for candidate changes, locks, and commit queue state.
The unknown operational checks are deliberate. This first version does not pretend that a read of the rulebase proves that no administrator is changing Panorama. Collect those checks through your approved change-management integration before allowing a write workflow.
Implementation steps
Create a dedicated read-only Panorama account scoped to the device groups the agent needs.
Generate the API key using the organization’s approved secret-management process.
Deploy this server close to Panorama, with egress limited to the Panorama management URL.
Run the tests and verify the server with MCP Inspector or your MCP host.
Test duplicate, broader coverage, conflict, partial overlap, out-of-scope, and API failure cases against a lab.
Add an audit sink that records request IDs, user identity, tool name, scope, result classification, and Panorama task IDs without secrets.
Keep this server read-only while tuning false positives and false negatives.
Add candidate writes only in a separate service, with separate credentials, human approval, change ID, preview, validation, commit, and push gates.
Security model
This project intentionally does not expose arbitrary XML, arbitrary XPath, commit, push, or delete tools.
Recommended production controls:
use a read-only API role and separate credentials for mutation;
keep TLS verification enabled;
pin dependencies and verify the container image;
run as a non-root user with a read-only filesystem;
restrict outbound network access to Panorama;
do not log API keys, authorization headers, cookies, or full XML that may contain sensitive data;
treat rule descriptions, tags, and object names as untrusted data;
require deterministic server-side checks before any future write;
keep candidate commit and firewall push as separate approved actions;
test rollback and audit procedures in a lab.
Docker
Build and run locally:
docker build -t panorama-mcp-server ./panorama-mcp-server
docker run --rm -i \
--env-file panorama-mcp-server/.env \
panorama-mcp-serverFor a shared HTTP deployment, do not publish port 8000 directly to a management network. Use an authenticated reverse proxy, HTTPS, network policy, and short-lived credentials.
Test and lint
pytest -q
ruff check .The tests are offline and do not contact Panorama. An integration test suite should use a disposable lab or a mocked HTTP transport with sanitized XML fixtures.
Limitations
The project supports PAN-OS XML API rule reads only.
The device-group XPath assumes a standard Panorama configuration tree.
Candidate changes, locks, and commit queue state are returned as explicit not-collected values.
No configuration mutation, commit, push, delete, or arbitrary command execution is exposed.
Object-group expansion is not performed by this version; unresolved object semantics must remain review-required.
References
Palo Alto Networks: Panorama Commit, Validation, and Preview Operations
Palo Alto Networks: About the PAN-OS API
Model Context Protocol: Security Best Practices
Model Context Protocol Python SDK
Available Tools
4 toolsget_security_rulesB
Fetch normalized security rules from one Panorama device group and rulebase.
Inputs: rulebase, device_group. Returns: result
list_device_groupsA
List Panorama device groups visible to the configured read-only API key.
Inputs: no named parameters. Returns: result
preclear_rule_requestB
Run deterministic read-only preclear checks before a rule change is considered.
Inputs: request (required), rulebase, device_group. Returns: result
search_policy_coverageA
Find exact duplicates, coverage, conflicts, and partial overlaps without changing Panorama.
Inputs: request (required), rulebase, device_group. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: fetching rules, listing groups, searching for policy overlap, and running preclear checks. There is no ambiguity in what each tool does.
All tool names follow a consistent verb_noun pattern (get_, list_, search_, preclear_), using snake_case throughout. The naming is predictable and clear.
With only 4 tools, the server is tightly scoped to read-only policy analysis and preclear workflows. Each tool earns its place, and the count falls well within the ideal 3-15 range.
The set covers the core read-only workflow: list accessible groups, fetch rules, analyze coverage/conflicts, and run preclear checks. Minor gaps exist (e.g., no direct rule-detail retrieval for a single rule), but the essential operations are present and coherent.
Maintenance
Related MCP Connectors
The MCP server that vets MCP servers: identity, risk grade and per-tool risk before you install.
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
Authenticated MCP server for ClearPolicy policy and compliance workflows.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that analyzes firewall rule overlap, duplication, shadowing, and conflicts across multi-vendor firewall policies.242Apache 2.0
- AlicenseCqualityDmaintenanceA local MCP server for the LimaCharlie security platform that provides investigation, administration, and content-review workflows via a broad read-only tool surface with explicit organization scoping and audit logging.100MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server for Cisco Firepower Management Center (FMC) 7.4.x, allowing LLMs to query firewall configuration, search network objects, and check deployment status through natural language.Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA read-only MCP server for inspecting AWS resources, detecting misconfigurations, and estimating costs across EC2, S3, and IAM, enabling agents to safely query and analyze cloud infrastructure.-