PolicyPilot MCP Server
Enables LLM agents to automate Check Point firewall rule changes by translating natural language access requests into correct, first-match-safe policy updates via MCP tools.
README
<div align="center">
π§ PolicyPilot
Agentic Check Point access automation
Turn a plain-language access request into the correct, first-match-safe policy change β applied to a real R82.10 management server or pushed straight to the gateway as a dynamic layer β and drivable by an LLM agent over MCP.
</div>
PolicyPilot connects to a real Check Point R82.10 Management Server (and/or gateways) and does exactly what its API account is permitted to β least privilege. You describe the access you want; the engine computes the minimal change, places it first-match-safe, previews it, and applies it on approval β with one-click rollback. No more hand-editing rulebases or guessing where a rule belongs.
π‘ One sentence β the right rule. "Allow 10.1.1.50 to the DNS servers and publish" becomes a correct Accept rule on your SMS β reusing existing objects, placed above the right deny, and published. That's the whole pitch.
π€ Two automation rails, one engine
The same decision brain drives two ways to apply a change β both fully agent-drivable over the same /mcp
endpoint (21 tools total, mcp-scope key as Authorization: Bearer):
| Rail | What it does | How | Publish gate |
|---|---|---|---|
| Management access policy β SMS | Create / widen an access rule in the policy rulebase, then publish. | Management Web API (web_api) |
mcp_allow_publish |
| Dynamic Layers β Gateway | Author an access rulebase and push it straight to the gateway as a dynamic layer, out-of-band of SmartConsole. | Gaia API (set-dynamic-content, sk182252) |
mcp_allow_layer_push |
The two rails carry separate publish gates β enabling agent writes to the SMS does not enable a live
gateway push, and vice versa. dry-run and the built-in mock target are always allowed. The SMS engine
deliberately treats the dynamic layer as out-of-band (skips it from matching), so the two rails are
complementary halves of "automate access," never overlapping.
π§ The decision engine
- Reuse / widen / create β finds whether the access already exists (no-op), can be granted by widening an existing rule, or needs a new rule.
- First-match-safe placement β inserts above the right deny, below the right stealth/cleanup, in the right section β so the new rule is neither shadowed nor shadowing.
- Every access-rule column β action (Accept / Drop / Reject / Ask / Inform / Apply Layer) plus content (data-types), time, install-on (gateways) and VPN (communities).
- Reuse-only object resolution β resolves a source/destination/service to an existing Check Point object by dedicated commands; never blindly creates duplicates.
- One-click rollback β every published change records its inverse op-list; revert restores the prior state.
- Provably conservative analysis β
analyze_policyonly flags a rule as shadowed when it can prove it, and abstains on opaque/application cells rather than guessing.
See the access-automation white paper for how it reasons about a rulebase.
π Drive it four ways
- π€ MCP server β both rails as 21 tools an LLM agent (n8n, Claude Desktop, Cursor,
VS Code, any MCP client) calls over
/mcp. Two ready-made n8n workflows ship indocs/: management access agent and dynamic-layer agent, both connecting to the same/mcpwith an mcp-scope key. With the Autopilot preset, one sentence ending "β¦and publish the changes" resolves, applies and publishes in a single turn (management rail). In-app onboarding at/mcp-guide. - π REST API β the same brain at
/dbapi/v1for any HTTP client (api-scope key auth), mirroring the tools across both rails (incl./gateways,/dynamic-layers,/dynamic-layers/push), auto-documented in the portal OpenAPI (/docs). - π« Ticket webhook β a ServiceNow / Jira / any webhook becomes a Check Point rule, with optional write-back.
Authenticated with the
X-PolicyPilot-Tokenheader. - π₯ The portal UI β review a decision, see the placement, apply on approval β plus a live API explorer
(Swagger) at
/api-explorerfor testing Management / Gaia API calls directly.
π The MCP-agent QA battery is a standing set of one-sentence "β¦and publish" prompts that exercise every tool, outcome, and column β the demo script and the regression check in one.
π Quick start (local dev)
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
export PILOT_ADMIN_PASSWORD='<choose-a-strong-password>' # else a random one is printed at startup
export PILOT_SESSION_SECRET=$(openssl rand -base64 32)
uvicorn app.main:app --reload
Open http://localhost:8000, sign in as admin, then:
- Management Servers β add your R82.10 SMS (host + API account).
- Access automation β describe an access request β preview the decision (no-op / widen / create) β apply.
- MCP for agents (
/mcp-guide) β mint an mcp-scope key and connect n8n / your agent.
The MCP protocol layer needs the official
mcpSDK (installed from your Check Point Artifactory, not public PyPI). Until it's present the/mcpendpoint is simply absent β the rest of PolicyPilot is unaffected.
βοΈ Deploy (Dokploy)
Build from the Dockerfile, expose port 8000, add a domain (Traefik handles Let's Encrypt TLS), mount
/data for the SQLite DB, and set the PILOT_* env vars (PILOT_SESSION_SECRET, PILOT_ENCRYPTION_KEY,
PILOT_BASE_URL, PILOT_ADMIN_PASSWORD). See DEPLOY.md.
π Security / org policy
- Portal endpoints require login; machine access uses named, scoped (
mcp/webhook/api), revocable API keys with optional expiry (shown once, SHA-256-hashed at rest). - TLS to the SMS/gateway is always verified. Self-signed lab boxes are handled by cert pinning (trust-on-first-use or a pasted cert) β verification is never disabled.
- Saved management / gateway credentials are AES-256-GCM encrypted at rest (
PILOT_ENCRYPTION_KEY). - Publish is opt-in β an agent cannot reach live policy unless an admin enables it; otherwise applies are dry-runs (validate + discard). Parameterized queries throughout; defensive HTTP headers (anti-clickjacking, nosniff, HSTS).
- Use a least-privilege API account on the SMS β PolicyPilot only does what it's permitted to.
β Tests
pip install pytest && pytest -q # 626 tests, all green
π More
- docs/mcp-n8n.md β connect n8n / an LLM agent over MCP + the REST API.
- docs/policypilot-management-agent.json β ready-made n8n agent for the management access rail.
- docs/policypilot-dynamic-layer-agent.json β ready-made n8n agent for the dynamic-layer rail.
- docs/mcp-agent-qa.md β the one-sentence "β¦and publish" QA battery (demo + regression).
- docs/live-validation.md β the 15-minute post-deploy smoke test for both rails against a real lab.
- docs/access-automation-whitepaper.md β how the engine reasons.
- docs/integrations/access-automation.md β the ticketβrule flow.
- docs/integrations/management-export.md β pull & export policy as Terraform / Ansible /
mgmt_cli. - docs/integrations/gaia-export.md β export a gateway's Gaia OS config.
- docs/integrations/dynamic-layers.md β the gateway-direct (dynamic-layer) rail.
- docs/settings.md β secrets, API keys, the SMS session cache.
- CHANGELOG.md β what's in this release.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.