checkpoint-harmony-mcp 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checkpoint_harmony_mcp-0.2.4/.env.example +19 -0
- checkpoint_harmony_mcp-0.2.4/.github/workflows/ci.yml +19 -0
- checkpoint_harmony_mcp-0.2.4/.github/workflows/publish.yml +35 -0
- checkpoint_harmony_mcp-0.2.4/.gitignore +13 -0
- checkpoint_harmony_mcp-0.2.4/CHANGELOG.md +130 -0
- checkpoint_harmony_mcp-0.2.4/LICENSE +21 -0
- checkpoint_harmony_mcp-0.2.4/PKG-INFO +285 -0
- checkpoint_harmony_mcp-0.2.4/README.md +253 -0
- checkpoint_harmony_mcp-0.2.4/docs/ENDPOINTS.md +48 -0
- checkpoint_harmony_mcp-0.2.4/pyproject.toml +52 -0
- checkpoint_harmony_mcp-0.2.4/scripts/run.ps1 +13 -0
- checkpoint_harmony_mcp-0.2.4/scripts/run.sh +8 -0
- checkpoint_harmony_mcp-0.2.4/scripts/setup.ps1 +5 -0
- checkpoint_harmony_mcp-0.2.4/scripts/setup.sh +5 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/__init__.py +1 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/auth.py +73 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/client.py +181 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/config.py +23 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/errors.py +18 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/server.py +51 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/tools/__init__.py +0 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/tools/_common.py +242 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/tools/entities.py +316 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/tools/events.py +284 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/tools/exceptions.py +100 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/tools/scopes.py +20 -0
- checkpoint_harmony_mcp-0.2.4/src/checkpoint_harmony_mcp/tools/sectool_exceptions.py +220 -0
- checkpoint_harmony_mcp-0.2.4/tests/__init__.py +0 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_auth.py +91 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_client.py +164 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_common.py +77 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_common_async.py +154 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_config.py +31 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_entities_tools.py +374 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_errors.py +15 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_events_tools.py +375 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_exceptions_tools.py +113 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_scope.py +76 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_sectool_exceptions.py +130 -0
- checkpoint_harmony_mcp-0.2.4/tests/test_server.py +44 -0
- checkpoint_harmony_mcp-0.2.4/uv.lock +1841 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Check Point Harmony Email & Collaboration API credentials (Infinity Portal API key)
|
|
2
|
+
CHECKPOINT_CLIENT_ID=your-client-id
|
|
3
|
+
CHECKPOINT_SECRET=your-client-secret
|
|
4
|
+
|
|
5
|
+
# Region gateway. Auth URL = gateway + /auth/external; API URL = gateway + /app/hec-api
|
|
6
|
+
# US example shown; use the gateway for your tenant's region (EU/AU/IN).
|
|
7
|
+
CHECKPOINT_AUTH_URL=https://cloudinfra-gw-us.portal.checkpoint.com/auth/external
|
|
8
|
+
CHECKPOINT_API_URL=https://cloudinfra-gw-us.portal.checkpoint.com/app/hec-api
|
|
9
|
+
|
|
10
|
+
# Optional. The server auto-discovers the scope when this is blank (single-tenant).
|
|
11
|
+
# Set it explicitly only if your key has access to multiple scopes (the server will
|
|
12
|
+
# tell you the available values). Discover manually with the scopes_list tool.
|
|
13
|
+
CHECKPOINT_SCOPE=
|
|
14
|
+
|
|
15
|
+
# Optional
|
|
16
|
+
CHECKPOINT_TIMEOUT=30
|
|
17
|
+
LOG_LEVEL=INFO
|
|
18
|
+
MCP_HTTP_HOST=127.0.0.1
|
|
19
|
+
MCP_HTTP_PORT=8765
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
pull_request:
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
- name: Install uv
|
|
11
|
+
uses: astral-sh/setup-uv@v5
|
|
12
|
+
with:
|
|
13
|
+
python-version: "3.11"
|
|
14
|
+
- name: Install dependencies
|
|
15
|
+
run: uv sync --extra dev
|
|
16
|
+
- name: Lint
|
|
17
|
+
run: uv run ruff check .
|
|
18
|
+
- name: Test
|
|
19
|
+
run: uv run pytest -v
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: pypi
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read # required for actions/checkout on a private repo
|
|
14
|
+
id-token: write # required for PyPI Trusted Publishing (OIDC)
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.11"
|
|
21
|
+
- name: Verify tag matches package version
|
|
22
|
+
run: |
|
|
23
|
+
TAG="${GITHUB_REF_NAME#v}"
|
|
24
|
+
PKG="$(grep -m1 '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')"
|
|
25
|
+
echo "tag=$TAG pyproject=$PKG"
|
|
26
|
+
if [ "$TAG" != "$PKG" ]; then
|
|
27
|
+
echo "::error::Tag v$TAG does not match pyproject version $PKG"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
- name: Build distributions
|
|
31
|
+
run: uv build
|
|
32
|
+
- name: Check distributions
|
|
33
|
+
run: uvx twine check dist/*
|
|
34
|
+
- name: Publish to PyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [0.2.4] - 2026-06-06
|
|
8
|
+
|
|
9
|
+
First published release on PyPI. No functional changes to the MCP tools since 0.2.3 —
|
|
10
|
+
this release covers packaging and repository hardening.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- CI installs dependencies via `uv sync` + runs through `uv run`, replacing a
|
|
14
|
+
`uv pip install --system` step that failed on the runner's externally-managed
|
|
15
|
+
system Python (PEP 668).
|
|
16
|
+
- The publish workflow now verifies the pushed tag matches the `pyproject.toml` version
|
|
17
|
+
and runs `twine check` on the built artifacts before uploading.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
- Internal development docs (design specs and plans) and the vendored OpenAPI spec are no
|
|
21
|
+
longer tracked in the repository.
|
|
22
|
+
|
|
23
|
+
[0.2.4]: https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/releases/tag/v0.2.4
|
|
24
|
+
|
|
25
|
+
## [0.2.3] - 2026-06-06
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- `events_find` now caps results to a `limit` (default 25), stopping the page scan early
|
|
29
|
+
once enough matches are collected, and returns a `truncated` flag (`true` when the limit
|
|
30
|
+
or the page-scan cap was hit). This prevents oversized responses when a sender matches
|
|
31
|
+
thousands of events. `entities_find` was already capped.
|
|
32
|
+
|
|
33
|
+
[0.2.3]: https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/releases/tag/v0.2.3
|
|
34
|
+
|
|
35
|
+
## [0.2.2] - 2026-06-06
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- `entities_find` and `events_find` now filter **server-side** and default to the **last
|
|
39
|
+
30 days** when `start_date` is omitted. Matching tries exact first and falls back to
|
|
40
|
+
contains, reported via a new `matchMode` field (`exact` | `contains` | `none`).
|
|
41
|
+
`entities_find` uses precise `entityExtendedFilter` operators and no longer returns
|
|
42
|
+
`pagesScanned`/`scanCapHit`; `events_find` narrows via the `description` filter (or
|
|
43
|
+
`eventIds` for `event_id`) and retains `pagesScanned`/`scanCapHit`. `entities_find`
|
|
44
|
+
also gains `limit`/`max_records` and an `entity_id` direct-lookup short-circuit.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
- `entities_query`'s `extended_filter` is now a properly-typed array, so MCP clients
|
|
48
|
+
serialize it as JSON instead of a rejected string; it also accepts a JSON string
|
|
49
|
+
defensively. Server-side entity filtering is now usable directly.
|
|
50
|
+
|
|
51
|
+
[0.2.2]: https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/releases/tag/v0.2.2
|
|
52
|
+
|
|
53
|
+
## [0.2.1] - 2026-06-06
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- Reverted a v0.2.0 regression that sent `events_action`/`entities_action` action names
|
|
57
|
+
and params as JSON arrays and dropped the required `entityType` field, which caused the
|
|
58
|
+
live API to reject quarantine/restore. Action bodies now use scalar enum names and
|
|
59
|
+
scalar params again; `entities_action` again requires `entity_type` (the entity's
|
|
60
|
+
`saasEntityType`, e.g. `office365_emails_email`).
|
|
61
|
+
- Corrected `urlrep_delete`/`dlp_delete` to delete exceptions via
|
|
62
|
+
`DELETE /v1.0/sectool-exceptions/{family}/exceptions` with a
|
|
63
|
+
`{requestData: {exception_type, exception_str_list}}` body. The previous
|
|
64
|
+
`POST .../exceptions` call with an `exception_str` field was rejected by the API
|
|
65
|
+
("Exception is invalid!").
|
|
66
|
+
|
|
67
|
+
[0.2.1]: https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/releases/tag/v0.2.1
|
|
68
|
+
|
|
69
|
+
## [0.2.0] - 2026-06-05
|
|
70
|
+
|
|
71
|
+
### Changed (breaking)
|
|
72
|
+
- **Action body wire shape:** `eventActionName`/`entityActionName` and their `…Param`
|
|
73
|
+
fields are now sent as JSON arrays per the API reference. Tool argument signatures
|
|
74
|
+
are unchanged (callers still pass a single string); wrapping happens internally.
|
|
75
|
+
- **Removed undocumented body/query fields:** dropped the `entity_type=` kwarg from
|
|
76
|
+
`entities_action`, the `scope=` kwarg from `events_action` / `entities_action` /
|
|
77
|
+
all five `exceptions_*` tools, and the `exc_id=` query plumbing in `exceptions_list`.
|
|
78
|
+
None of these appeared in the API reference. Pass scope via `CHECKPOINT_SCOPE`
|
|
79
|
+
or the `scopes` header — never in the body.
|
|
80
|
+
- **Bulk action return shape:** when `events_action`/`entities_action` is called with
|
|
81
|
+
multiple IDs and `wait=True`, it now returns `{tasks: [...], summary: {...}}`
|
|
82
|
+
aggregated across all returned tasks. Single-ID + wait still returns the legacy
|
|
83
|
+
`{taskId, status, finalState, raw}` shape.
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
- 10 sectool exception tools across two families: **URL Reputation**
|
|
87
|
+
(`urlrep_list/get/create/update/delete` with types `allow-url`, `allow-domain`,
|
|
88
|
+
`block-url`, `block-domain`) and **DLP** (`dlp_list/get/create/update/delete`
|
|
89
|
+
with types `hash`, `text_content`, `sender_email`, `recipient_email`).
|
|
90
|
+
- `entities_download` — fetch a secured-entity message as an `.eml`
|
|
91
|
+
(returns `{filename, contentType, sizeBytes, base64}`).
|
|
92
|
+
- Proactive client-side rate limiting per the documented limits: 1 rps for
|
|
93
|
+
Anti-Phishing exception writes; 10 rps for URL-rep + DLP exception writes.
|
|
94
|
+
- Documented additional `events_action` verbs (`dismiss`, `severityChange`,
|
|
95
|
+
`senttoadmin`) and the `entityExtendedFilter` operator set
|
|
96
|
+
(`is/contains/startsWith/isEmpty/isNot/notContains/isNotEmpty/greaterThan/lessThan`).
|
|
97
|
+
- `exceptions_*` tools now accept `spam_whitelist` alongside `whitelist`/`blacklist`.
|
|
98
|
+
|
|
99
|
+
### Fixed
|
|
100
|
+
- Scope auto-discovery: multiple discovered scopes are now joined with commas (per
|
|
101
|
+
the API reference) instead of raising. Multi-scope keys work without manual config.
|
|
102
|
+
- Auth: prefer the documented `expiresIn`; if absent, parse the ISO `expires`
|
|
103
|
+
timestamp; if both are absent, fall back to the prior 3600 s default.
|
|
104
|
+
|
|
105
|
+
[0.2.0]: https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/releases/tag/v0.2.0
|
|
106
|
+
|
|
107
|
+
## [0.1.0] - 2026-06-05
|
|
108
|
+
|
|
109
|
+
Initial release.
|
|
110
|
+
|
|
111
|
+
### Added
|
|
112
|
+
- 15 MCP tools across four areas of the Harmony Email & Collaboration smart-api (v1.50):
|
|
113
|
+
- **Scopes:** `scopes_list`.
|
|
114
|
+
- **Security Events:** `events_get_by_id`, `events_query`, `events_find`,
|
|
115
|
+
`events_action`, `events_get_task_status`.
|
|
116
|
+
- **Secured Entities:** `entities_get_by_id`, `entities_query`, `entities_find`,
|
|
117
|
+
`entities_action`.
|
|
118
|
+
- **Exceptions:** `exceptions_list`, `exceptions_get`, `exceptions_create`,
|
|
119
|
+
`exceptions_update`, `exceptions_delete`.
|
|
120
|
+
- Client-credentials auth with token caching/refresh and **automatic scope discovery**
|
|
121
|
+
(optional `CHECKPOINT_SCOPE`).
|
|
122
|
+
- Chat-friendly query output: compact summaries, `limit`, `max_records` auto-pagination
|
|
123
|
+
(cap 500), `count_only` histograms, and `full` raw mode.
|
|
124
|
+
- `*_find` tools for locating a specific message/event by sender, recipient, subject,
|
|
125
|
+
message-ID, or entity-ID.
|
|
126
|
+
- Action tools that wait for task completion by default and return the final entity state;
|
|
127
|
+
normalized task status.
|
|
128
|
+
- stdio and HTTP transports; `respx`-mocked test suite; CI on push/PR.
|
|
129
|
+
|
|
130
|
+
[0.1.0]: https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/releases/tag/v0.1.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kierston Grantham
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: checkpoint-harmony-mcp
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: MCP server for the Check Point Harmony Email & Collaboration API
|
|
5
|
+
Project-URL: Homepage, https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server
|
|
6
|
+
Project-URL: Repository, https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server
|
|
7
|
+
Project-URL: Issues, https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/issues
|
|
8
|
+
Author-email: Kierston Grantham <Space-C0wboy@users.noreply.github.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: avanan,checkpoint,email-security,harmony,mcp,security
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Information Technology
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Communications :: Email
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: fastmcp<4,>=3
|
|
23
|
+
Requires-Dist: httpx>=0.27
|
|
24
|
+
Requires-Dist: pydantic-settings>=2.2
|
|
25
|
+
Requires-Dist: pydantic>=2.6
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
29
|
+
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
30
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# Check Point Harmony Email & Collaboration MCP Server
|
|
34
|
+
|
|
35
|
+
[](https://pypi.org/project/checkpoint-harmony-mcp/)
|
|
36
|
+
[](https://pypi.org/project/checkpoint-harmony-mcp/)
|
|
37
|
+
[](LICENSE)
|
|
38
|
+
[](https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server/actions/workflows/ci.yml)
|
|
39
|
+
|
|
40
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) server that exposes the
|
|
41
|
+
Check Point **Harmony Email & Collaboration** smart-api (formerly Avanan) to AI
|
|
42
|
+
assistants. It provides **26 tools** across Security Events, Secured Entities,
|
|
43
|
+
Exceptions, URL Reputation, DLP, and Scopes — full parity with the v1.50 API.
|
|
44
|
+
|
|
45
|
+
> [!IMPORTANT]
|
|
46
|
+
> **Unofficial project.** This is an independent, community-built MCP server developed
|
|
47
|
+
> against Check Point's published API documentation. It is **not** an official Check Point
|
|
48
|
+
> product and is not affiliated with, endorsed by, or supported by Check Point Software
|
|
49
|
+
> Technologies. "Check Point", "Harmony", and "Avanan" are trademarks of Check Point
|
|
50
|
+
> Software Technologies. For official support of the Harmony Email & Collaboration platform
|
|
51
|
+
> itself, contact Check Point directly.
|
|
52
|
+
|
|
53
|
+
> [!WARNING]
|
|
54
|
+
> **Beta software — not yet recommended for production environments.** This project is
|
|
55
|
+
> under active development. The tool surface and individual tool body shapes may still
|
|
56
|
+
> change between minor versions, and not every endpoint has been exhaustively exercised
|
|
57
|
+
> against every tenant configuration. Use against a lab or non-production scope until
|
|
58
|
+
> you're confident in the behavior for your use case.
|
|
59
|
+
>
|
|
60
|
+
> **This server can also perform destructive actions against your Harmony environment.**
|
|
61
|
+
> Tools can quarantine and restore real email and modify allow/block-list exceptions. A
|
|
62
|
+
> hallucinated tool argument from your AI assistant could alter your mail flow in ways
|
|
63
|
+
> that affect email security.
|
|
64
|
+
>
|
|
65
|
+
> **Recommended posture:**
|
|
66
|
+
> - Try the server against a non-production or lab scope first.
|
|
67
|
+
> - Use a Check Point API key scoped to the **minimum permissions** your use case requires.
|
|
68
|
+
> - Review every destructive tool call before allowing execution. Claude Desktop requires
|
|
69
|
+
> tool-call approval by default — keep that enabled.
|
|
70
|
+
> - Treat the API key (Client ID + Secret) with the same care as portal admin credentials,
|
|
71
|
+
> because functionally it is one.
|
|
72
|
+
> - The HTTP transport binds to `127.0.0.1` by default. Do not expose it to the public
|
|
73
|
+
> internet without adding authentication.
|
|
74
|
+
|
|
75
|
+
## Tools
|
|
76
|
+
|
|
77
|
+
| Area | Count | Tools |
|
|
78
|
+
|------|-------|-------|
|
|
79
|
+
| Scopes | 1 | `scopes_list` |
|
|
80
|
+
| Security Events | 5 | `events_get_by_id`, `events_query`, `events_find`, `events_action`, `events_get_task_status` |
|
|
81
|
+
| Secured Entities | 5 | `entities_get_by_id`, `entities_query`, `entities_find`, `entities_action`, `entities_download` |
|
|
82
|
+
| Exceptions (Anti-Phishing) | 5 | `exceptions_list`, `exceptions_get`, `exceptions_create`, `exceptions_update`, `exceptions_delete` |
|
|
83
|
+
| URL Reputation | 5 | `urlrep_list`, `urlrep_get`, `urlrep_create`, `urlrep_update`, `urlrep_delete` |
|
|
84
|
+
| DLP | 5 | `dlp_list`, `dlp_get`, `dlp_create`, `dlp_update`, `dlp_delete` |
|
|
85
|
+
|
|
86
|
+
**26 tools total.** Highlights:
|
|
87
|
+
|
|
88
|
+
- **Query tools** (`events_query`, `entities_query`) return a compact summary of up to
|
|
89
|
+
`limit` records (default 25). Use `max_records` (cap 500) to auto-paginate, `count_only`
|
|
90
|
+
for a `{recordsNumber, histogram}` triage view, or `full=true` for raw objects.
|
|
91
|
+
`events_query` requires a date range (`startDate`).
|
|
92
|
+
- **Find tools** (`events_find`, `entities_find`) locate a specific message/event by
|
|
93
|
+
sender, recipient, subject, message-ID, or entity-ID. They filter **server-side** and
|
|
94
|
+
default to the **last 30 days** (override with `start_date`/`end_date`), trying an exact
|
|
95
|
+
match first and falling back to `contains` — the result's `matchMode` says which hit.
|
|
96
|
+
Both cap returned matches to `limit` (default 25) and set `truncated` when more exist.
|
|
97
|
+
Power users can pass a raw server-side `extended_filter` to `entities_query`.
|
|
98
|
+
- **Action tools** (`events_action`, `entities_action`) wait for completion by default and
|
|
99
|
+
return the final entity state; pass `wait=false` for fire-and-forget. `entities_action`
|
|
100
|
+
requires `entity_type` — the target entity's `saasEntityType` (e.g.
|
|
101
|
+
`office365_emails_email`), as returned by `entities_query`/`entities_find`.
|
|
102
|
+
- **`exceptions_*`** (anti-phishing) types are `whitelist`, `blacklist`, and `spam_whitelist`
|
|
103
|
+
(case-insensitive). **URL-Reputation** exception types are `allow-url`, `allow-domain`,
|
|
104
|
+
`block-url`, `block-domain`. **DLP** exception types are `hash`, `text_content`,
|
|
105
|
+
`sender_email`, `recipient_email`.
|
|
106
|
+
- **`entities_download`** returns the secured entity's message as an `.eml`
|
|
107
|
+
(base64-encoded for transport).
|
|
108
|
+
- **Rate limits enforced client-side:** Anti-Phishing exception writes are paced to
|
|
109
|
+
**1 rps**; URL-Rep + DLP exception writes to **10 rps**, matching the API reference.
|
|
110
|
+
- **`events_action` verbs:** `quarantine`, `restore`, `dismiss`, `severityChange`
|
|
111
|
+
(param `{"newSeverity": "Low|Medium|High|Highest"}`), `senttoadmin`.
|
|
112
|
+
- **Server-side filters** for `entities_query` via `extended_filter`: each entry is
|
|
113
|
+
`{saasAttrName, saasAttrOp, saasAttrValue}`; operators are `is`, `contains`,
|
|
114
|
+
`startsWith`, `isEmpty`, `isNot`, `notContains`, `isNotEmpty`, `greaterThan`,
|
|
115
|
+
`lessThan`. Use dotted paths like `entityPayload.fromEmail`.
|
|
116
|
+
|
|
117
|
+
> [!NOTE]
|
|
118
|
+
> `events_query` and `events_find` require a date range — include `startDate` (and ideally
|
|
119
|
+
> `endDate`). Without it the upstream API returns an opaque `500`.
|
|
120
|
+
|
|
121
|
+
See [`docs/ENDPOINTS.md`](docs/ENDPOINTS.md) for the full tool ↔ endpoint mapping.
|
|
122
|
+
|
|
123
|
+
## Quick start
|
|
124
|
+
|
|
125
|
+
### Install
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# with uv (recommended)
|
|
129
|
+
uv tool install checkpoint-harmony-mcp
|
|
130
|
+
|
|
131
|
+
# or with pip
|
|
132
|
+
pip install checkpoint-harmony-mcp
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
For development from source:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
git clone https://github.com/Space-C0wboy/Checkpoint-Harmony-Email-MCP-Server
|
|
139
|
+
cd Checkpoint-Harmony-Email-MCP-Server
|
|
140
|
+
uv venv && uv pip install -e ".[dev]"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Getting an API key
|
|
144
|
+
|
|
145
|
+
Generate an **account-scoped** Infinity Portal API key for the **Email & Collaboration**
|
|
146
|
+
service. The easiest path also shows you the exact authentication URL for your region:
|
|
147
|
+
|
|
148
|
+
1. In the **Harmony Email & Collaboration** console, confirm the correct **account /
|
|
149
|
+
company** is selected, then click the **Settings** gear next to the company name →
|
|
150
|
+
**API Keys**. (Equivalently: Infinity Portal **Global Settings → API Keys → New
|
|
151
|
+
Account API key**.)
|
|
152
|
+
2. Click **New**, choose **Service: Email & Collaboration**, optionally set an expiration,
|
|
153
|
+
then **Create**.
|
|
154
|
+
3. Copy the **Client ID**, **Secret Key**, and **Authentication URL** it displays — the
|
|
155
|
+
secret is shown only once. These map to `CHECKPOINT_CLIENT_ID`, `CHECKPOINT_SECRET`,
|
|
156
|
+
and `CHECKPOINT_AUTH_URL`. Set `CHECKPOINT_API_URL` to your region's gateway +
|
|
157
|
+
`/app/hec-api` (see Region gateways below).
|
|
158
|
+
|
|
159
|
+
No role is requested for Email & Collaboration keys — they are granted Admin access scoped
|
|
160
|
+
to that single service.
|
|
161
|
+
|
|
162
|
+
> [!WARNING]
|
|
163
|
+
> Use an **account** API key, not a **user** key. A user-scoped key (the
|
|
164
|
+
> `/auth/external/user` endpoint) is bound to the user's home region and is **not** accepted
|
|
165
|
+
> by the smart-api — it authenticates successfully but every data call returns an opaque
|
|
166
|
+
> `500`. If you decode such a token you'll see `"authType": "EXTERNAL_USER"`; an account key
|
|
167
|
+
> shows `"EXTERNAL"`. Always generate the key via *Global Settings → API Keys → New Account
|
|
168
|
+
> API key* (or the Harmony console **gear → API Keys**).
|
|
169
|
+
|
|
170
|
+
### Configuration
|
|
171
|
+
|
|
172
|
+
Copy `.env.example` to `.env` and set:
|
|
173
|
+
|
|
174
|
+
| Variable | Required | Description |
|
|
175
|
+
|----------|----------|-------------|
|
|
176
|
+
| `CHECKPOINT_CLIENT_ID` | yes | Infinity Portal API key Client ID |
|
|
177
|
+
| `CHECKPOINT_SECRET` | yes | Infinity Portal API key Secret (accessKey) |
|
|
178
|
+
| `CHECKPOINT_AUTH_URL` | yes | Region gateway + `/auth/external` |
|
|
179
|
+
| `CHECKPOINT_API_URL` | yes | Region gateway + `/app/hec-api` |
|
|
180
|
+
| `CHECKPOINT_SCOPE` | no* | Auto-discovered when blank (single tenant); set explicitly only for multi-scope keys |
|
|
181
|
+
| `CHECKPOINT_TIMEOUT` | no | Request timeout in seconds (default 30) |
|
|
182
|
+
| `LOG_LEVEL` | no | default `INFO` |
|
|
183
|
+
| `MCP_HTTP_HOST` / `MCP_HTTP_PORT` | no | HTTP transport bind, defaults `127.0.0.1:8765` |
|
|
184
|
+
|
|
185
|
+
\* When blank, the server auto-discovers the scope (single-tenant). Set it explicitly only
|
|
186
|
+
if your key has access to multiple scopes; discover values with the `scopes_list` tool.
|
|
187
|
+
|
|
188
|
+
**Region gateways:**
|
|
189
|
+
|
|
190
|
+
- EU `https://cloudinfra-gw.portal.checkpoint.com`
|
|
191
|
+
- US `https://cloudinfra-gw-us.portal.checkpoint.com`
|
|
192
|
+
- AU `https://cloudinfra-gw.ap.portal.checkpoint.com`
|
|
193
|
+
- IN `https://cloudinfra-gw.in.portal.checkpoint.com`
|
|
194
|
+
|
|
195
|
+
(Auth URL = gateway + `/auth/external`; API URL = gateway + `/app/hec-api`.)
|
|
196
|
+
|
|
197
|
+
### Run
|
|
198
|
+
|
|
199
|
+
- stdio (default): `uv run checkpoint-harmony-mcp` (or just `checkpoint-harmony-mcp` if installed as a tool)
|
|
200
|
+
- HTTP: `checkpoint-harmony-mcp --transport http --port 8765`
|
|
201
|
+
|
|
202
|
+
## Editor integration
|
|
203
|
+
|
|
204
|
+
### Claude Desktop
|
|
205
|
+
|
|
206
|
+
Edit `claude_desktop_config.json`:
|
|
207
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
208
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"mcpServers": {
|
|
213
|
+
"checkpoint-harmony": {
|
|
214
|
+
"command": "checkpoint-harmony-mcp",
|
|
215
|
+
"env": {
|
|
216
|
+
"CHECKPOINT_CLIENT_ID": "your-client-id",
|
|
217
|
+
"CHECKPOINT_SECRET": "your-client-secret",
|
|
218
|
+
"CHECKPOINT_AUTH_URL": "https://cloudinfra-gw-us.portal.checkpoint.com/auth/external",
|
|
219
|
+
"CHECKPOINT_API_URL": "https://cloudinfra-gw-us.portal.checkpoint.com/app/hec-api"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
If running from source instead of an installed tool, use `uv` with `--directory`:
|
|
227
|
+
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"mcpServers": {
|
|
231
|
+
"checkpoint-harmony": {
|
|
232
|
+
"command": "uv",
|
|
233
|
+
"args": ["run", "--directory", "/absolute/path/to/Checkpoint-Harmony-Email-MCP-Server", "checkpoint-harmony-mcp"],
|
|
234
|
+
"env": { "CHECKPOINT_CLIENT_ID": "...", "CHECKPOINT_SECRET": "...", "CHECKPOINT_AUTH_URL": "...", "CHECKPOINT_API_URL": "..." }
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Restart Claude Desktop, then confirm `checkpoint-harmony` appears in the tools menu.
|
|
241
|
+
|
|
242
|
+
### Claude Code
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
claude mcp add checkpoint-harmony \
|
|
246
|
+
--env CHECKPOINT_CLIENT_ID=your-client-id \
|
|
247
|
+
--env CHECKPOINT_SECRET=your-client-secret \
|
|
248
|
+
--env CHECKPOINT_AUTH_URL=https://cloudinfra-gw-us.portal.checkpoint.com/auth/external \
|
|
249
|
+
--env CHECKPOINT_API_URL=https://cloudinfra-gw-us.portal.checkpoint.com/app/hec-api \
|
|
250
|
+
-- checkpoint-harmony-mcp
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Scope auto-discovery
|
|
254
|
+
|
|
255
|
+
The Harmony API requires a `scopes` value on every call, but it isn't shown in the
|
|
256
|
+
Infinity Portal. This server resolves it for you: leave `CHECKPOINT_SCOPE` **blank** and,
|
|
257
|
+
on first use, it calls `scopes_list` and uses your single scope automatically (logging it
|
|
258
|
+
so you can pin it later). Set `CHECKPOINT_SCOPE` explicitly only if your key spans
|
|
259
|
+
multiple scopes — the server will list the available values in an error if so.
|
|
260
|
+
|
|
261
|
+
> [!TIP]
|
|
262
|
+
> For a single-tenant key, just leave `CHECKPOINT_SCOPE` unset — there is nothing to look
|
|
263
|
+
> up in the portal. Only multi-scope keys need it set explicitly.
|
|
264
|
+
|
|
265
|
+
## Example prompts
|
|
266
|
+
|
|
267
|
+
- *"How many phishing emails did we get today?"* → `events_query` with `count_only`.
|
|
268
|
+
- *"Find the email from `scdc205@proton.me` to me on June 4th."* → `entities_find`.
|
|
269
|
+
- *"Quarantine event `<id>`, then restore it."* → `events_action` (quarantine → restore).
|
|
270
|
+
- *"Block the sender `bad@example.com`."* / *"Remove that block."* → `exceptions_create` / `exceptions_delete`.
|
|
271
|
+
- *"Show me the full detail for entity `<id>`."* → `entities_get_by_id`.
|
|
272
|
+
|
|
273
|
+
## Development
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
uv run pytest # full suite (HTTP fully mocked with respx; no live calls)
|
|
277
|
+
uv run ruff check . # lint
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Releases publish to PyPI automatically when a `v*` tag is pushed (see
|
|
281
|
+
`.github/workflows/publish.yml`).
|
|
282
|
+
|
|
283
|
+
## License
|
|
284
|
+
|
|
285
|
+
[MIT](LICENSE)
|