
Eset Mcp
io.github.maciekaz由 GitHub 账号 maciekaz 发布v2.0.0更新于 Nov 4, 2026
MCP server for the ESET ecosystem - Connect cloud + PROTECT On-Prem, multi-tenant, RO/RW
概览
让助手通过 101 个工具及组合工具查询和管理 ESET 安全控制台(云端 ESET Connect、PROTECT On-Prem、Inspect、Cloud Office)的 MCP 服务器。
- 可以做什么
- 搜索、读取和查看设备、用户、策略、组、事件、检测与漏洞信息
- 运行高层组合工具:跨实体搜索、设备完整画像、事件上下文和最新检测
- 管理应用、资产、设备、身份、安装程序、移动设备、网络访问、补丁、策略、隔离区、用户、漏洞和 Web 访问防护对象(仅 RW 模式提供写入工具)
- 以资源形式读取服务器配置与工具目录,并运行内置提示词进行闲置设备审计、漏洞报告和事件分诊
- 通过请求头把每次调用路由到云区域或本地部署控制台,并自动处理分页、重试和响应大小限制
- 适用场景
- 当助手需要处理 ESET 终端安全数据时适用,例如事件分诊、设备与漏洞审计、策略管理,并可在单个服务器上同时覆盖多个云端与本地部署租户。
- 运行要求
- 以本地 Docker 镜像通过 stdio 运行,或作为 Streamable HTTP 服务运行。需要 ESET API 凭据:env 模式下使用 ESET_USER 与 ESET_PASSWORD,basic 模式下每次请求携带 Authorization Basic 头。可选配置包括区域、部署类型、本地服务器地址、Cloudflare Access 服务令牌、CA 证书包及日志与指标选项。建议使用专用 ESET API 用户。
安装
在 SourceWeft 中
- 打开 控制台中的 Eset Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ESET-MCP
[Tests] [License: MIT] [MCP spec]
A Model Context Protocol server for the entire ESET management surface: ESET Connect (cloud, all regions), ESET PROTECT On-Prem, ESET Inspect, and ESET Cloud Office. Drive any of them from any MCP host (Claude Desktop, Claude Code, or a custom agent) through tools, resources, and prompts.
Built as a single hub for any number of ESET deployments. One process fronts cloud and on-prem consoles at the same time; clients pick the target per request via headers; non-default on-prem origins require an operator allowlist. MCP receives credentials (Basic auth, plus an optional URL override and optional Cloudflare Access service token), routes the call to the right backend, mints its own tokens, and keeps tenants isolated in the pool.
⚠️ Just to be clear, fellas
This is an independent, community-driven open-source project and is not affiliated with, officially supported by, or endorsed by ESET, spol. s r.o. ESET and its product names are registered trademarks of their respective owners.While every effort has been made to ensure this software is safe and robust (including the strict Read-Only mode gate), this code is provided "AS IS", without any warranty of any kind. You are solely responsible for how you use this tool and any changes made to your ESET environment.
2.0.0 — breaking security update: See the v1 → v2 migration guide. Authentication endpoints are private to the adapter and never exposed as tools. The 101 business tools, their input schemas and four composites retain their existing contracts. Read the required upgrade settings before updating an HTTP or On-Prem deployment. MCP 2026 base protocol and transports are supported; the existing custom Basic profile is retained, not advertised as MCP OAuth 2.1 authorization.
Table of contents
- Features
- Architecture at a glance
- Security
- Quick start
- Configuration
- Multi-tenant deployment (basic-auth mode)
- On-prem ESET PROTECT support
- Production deployment (HTTPS via Caddy)
- Tools, resources & prompts
- Architecture
- Tests
- Refreshing the OpenAPI specs
- License
Features
Complete API coverage
- 101 business tools auto-generated from 16 official ESET Connect OpenAPI 3.0.1 specs, covering application-management, asset-management, automation, device-management, identity, incident-management, installer-management, mobile-device-management, network-access-protection, patch-management, policy-management, quarantine-management, user-management, vulnerability-management, and web-access-protection.
- 4 high-level composites that fold 3-6 raw calls into one:
eset_search,device_full_profile,incident_full_context,latest_detections.
Read-only / read-write modes
ESET_MODE=RO→ catalog exposes only read-only tools (51 total). Write tools are hidden fromlist_toolsentirely.ESET_MODE=RW→ all 105 tools advertised; mutating tools carrydestructiveHint: truein their MCP annotations.- Independent of the ESET account's underlying permissions.
- A defence-in-depth in-memory gate rejects RW tool names in RO mode before any HTTP request is sent.
Authentication
ESET_AUTH_MODE=env- single tenant, credentials from.env.ESET_AUTH_MODE=basic- multi tenant, clients passAuthorization: Basic <base64(user:password)>per request (plus optionalX-ESET-Regionfor a different cloud region, orX-ESET-Server-URLto route the request to an on-prem PROTECT console). One server fronts many ESET accounts and can mix cloud + on-prem in the same process.- Per-tenant OAuth tokens, pooled and isolated by
(user, password_hash, deployment, region-or-server-url, cf_secret_hash). Rotating a password or Cloudflare Access service token mints a fresh client; cloud and on-prem clients for the same user never share a pool entry.
Transports
- stdio - JSON-RPC over stdin/stdout for local hosts.
- Streamable HTTP - MCP 2026-07-28, with legacy 2025-11-25 compatibility.
Multi-region
eu / de / us / ca / jpn. Fixed via ESET_REGION in env mode;
per-request via X-ESET-Region in basic mode.
Cloud + on-prem in one process
In addition to the cloud regions, a single MCP server can front
customer-hosted ESET PROTECT On-Prem consoles. The on-prem auth wire
format (POST /GetTokens with a camelCase response) and per-host URL
structure are handled transparently; clients pick the target per request
via the X-ESET-Server-URL header. See
On-prem ESET PROTECT support.
Cloudflare Access (optional)
When the on-prem console sits behind a Cloudflare Access tunnel, MCP
authenticates as a service token
(env-default or per-request X-ESET-CF-Access-Client-Id /
X-ESET-CF-Access-Client-Secret) and rides through to the origin. The
CF token is an extra ingress layer in front of - not a replacement for -
the ESET account credentials. Cloud requests never carry these headers.
Resilience
- OAuth2 with proactive refresh ~5 min before token expiry and a forced refresh + retry on 401.
- 429 retries with exponential backoff (up to 3 attempts, honours
Retry-After). - Pagination (
nextPageToken) walked transparently. - 202 long-polling with the
response-idheader, up to 10 minutes.
Response shaping (context-window protection)
A single uncapped list_* call can return hundreds of KB - enough to
overflow a model's context. Two transformations are applied to every
tool response:
fieldsprojection - every GET tool exposes an optionalfields: [string]parameter that filters each list-item down to the requested keys (e.g.["uuid", "displayName"]). Applied server-side after fetch.- Byte cap (
ESET_MCP_RESPONSE_BYTES_MAX, default 100 KB) - if a payload still exceeds the budget, the longest list is trimmed while every top-level field (nextPageToken,totalSize, …) is preserved, and a_cappedmetadata block is attached with an actionable hint on how to continue. Agents retain full access to the data through pagination.
Agent-friendly errors
HTTP errors are mapped to readable hints: 403 → check Permission Sets in ESET PROTECT Hub; 401 → server refreshes the token automatically; 429 → back off; 5xx → retry shortly.
Observability (logs + Prometheus)
- Structured logs to stderr. Text (default) for dev, JSON Lines for
prod log shippers via
ESET_MCP_LOG_FORMAT=json. Every tool call, token refresh, HTTP retry and pool eviction emits a typedeventrecord with low-cardinality fields (tool, deployment, status, duration_ms, response_bytes, ...). - Prometheus metrics at an opt-in
/metricsendpoint (ESET_MCP_METRICS_ENABLED=true, requirespip install eset-mcp[metrics]). Counters for tool calls, token refreshes, HTTP retries, cap hits; histograms for tool duration and response sizes; gauge for client pool size. - What never enters logs or metrics: passwords,
Authorizationheaders, CF Access secrets, request/response bodies, query strings, substituted path parameters (which can leak UUIDs). A defensive deny-list in the logger strips known-sensitive keys before any formatter sees them. - Failure isolation: telemetry emission is wrapped in a try/except so
a broken metrics registry or formatter can never turn a successful
tool call into an error to the agent.
/metricsreturns 500 (not 503) if exposition ever raises - the worker stays up. - Quieting in production: set
ESET_LOG_LEVEL=WARNINGto mute the per-call INFO events but keep retries / errors visible; setESET_LOG_LEVEL=ERRORto silence everything but hard failures. Disable metrics entirely withESET_MCP_METRICS_ENABLED=false(default). The three knobs are independent.
Architecture at a glance
The simplest setup: credentials in .env, one MCP host, one ESET cloud
region. Good for personal use, a single team, or a desktop AI client like
Claude Desktop or Claude Code.
[Single-tenant: one ESET account, one deployment]
For real multi-tenant or enterprise deployments, put a credentials manager in front of ESET-MCP. The diagram below shows one such pattern using IBM mcp-context-forge as the "creds management" layer - any equivalent MCP gateway (or your own auth proxy) works the same way:
[Multi-tenant: many clients, one MCP, many backends]
The forge holds per-tenant secrets and injects Authorization: Basic,
X-ESET-Region, X-ESET-Server-URL, and X-ESET-CF-Access-* headers per
request. ESET-MCP routes each request to the right backend (cloud region,
on-prem PROTECT console, or on-prem behind Cloudflare Access) and the
per-tenant LRU client pool keeps OAuth tokens fully isolated between
tenants. This is a working pattern, not aspirational - the headers, pool
keys, and routing rules described here are all in the test suite under
tests/test_concurrency.py and tests/test_onprem.py.
Security
Credentials
- In
envmode the password is read once at startup and kept in memory. - In
basicmode the password is on the wire only for the duration of the request, and in memory only while the per-tenant client is hot in the LRU pool. It is never logged. - The pool key uses a SHA-256 hash of the password rather than the password itself.
- OAuth access/refresh tokens are held per-tenant; tokens never cross tenant boundaries within a single session.
Authentication modes & transport
basic mode over plain HTTP would leak passwords. The server enforces
HTTP transport for basic mode at startup but does not enforce TLS -
that is the deployment's job. The prod docker-compose profile fronts
the server with Caddy + Let's Encrypt.
Missing / malformed Authorization in basic mode → HTTP 401 with a
WWW-Authenticate: Basic challenge. Unknown region in X-ESET-Region
→ HTTP 400. An unapproved on-prem origin is rejected with HTTP 403.
RO / RW isolation
Two independent layers:
- Catalog hiding -
list_toolsfilters out every non-GET tool in RO mode. The agent never sees write tools. - Defence-in-depth gate -
call_toolvalidates the tool's declared mode againstESET_MODEbefore any HTTP request goes out. Hard-coded clients, prompt-injection attempts, and stale agent snapshots all hit the gate and receive a structuredModeForbiddenErrortext response (no exception, no network call).
In RW mode, mutating tools carry destructiveHint: true so MCP hosts
that respect annotations can require a per-call confirmation.
Per-tenant isolation (basic-auth mode)
- Auth headers are parsed in dedicated ASGI middleware and stashed in a request scope. Handlers use the SDK's explicit HTTP request, so legacy session tasks cannot retain another request's identity. Legacy sessions are bound to credentials, region/origin, CF pair and TLS/network policy.
- Each request resolves to a
Credentialsinstance keyed by the complete connection identity. Passwords and CF values are hashed in the index; hashes must not be logged. - An LRU bound on the client pool prevents unbounded memory growth from random-credential spraying.
Network surface
- The explicit
http/devprofiles publish only127.0.0.1:8765and require Basic credentials. - In the
prodprofile the MCP container has no published port - Caddy joins the same docker bridge network and proxies HTTPS in. The only host ports are 80 (HTTP-01 ACME) and 443 (HTTPS). - Cloud traffic goes to fixed ESET regional domains. On-prem traffic goes to the configured default or an explicitly allowed origin. DNS is checked at connection time; redirects and implicit environment proxies are disabled.
Dependency & code audit
- Ruff: clean (
select = E F W I B UP RUF). - Runtime dependencies include
mcp,httpx,httpcore,jsonschema,pydanticandpython-dotenv; exact versions are inrequirements.lock. Plusstarlette+uvicornwhen running HTTP.
Out of scope (by design)
- No webhook receivers.
- No persistent token storage; application logs go to stderr. Caddy error logs remove request headers and URI.
- No on-disk caching of OAuth tokens.
- No write-back of
basic-mode credentials to disk.
Responsible disclosure
Please open a private security advisory rather than a public issue: https://github.com/maciekaz/ESET-MCP/security/advisories/new.
Quick start
Use the signed 2.0.0 image. Upgrading from v1 requires the
configuration changes below; the :1 tag stays on the v1 line.
Published-image pin policy:
:2- latest 2.x.x (updates within the major):2.0- latest 2.0.x (updates within the minor):2.0.0- exact version:latest- most recent stable release; may cross major versions:main/:sha-<short>- edge builds from main (not for production)
Wire up to Claude Desktop / Claude Code (stdio)
HTTP transport (local Basic authentication)
Send the ESET credentials in the Basic header as shown below. For remote access, use the production HTTPS profile and configure its public host.
Verify the image (cosign keyless)
Verify the release workflow identity and pin the resolved image digest for deployments:
From source (contributors / local hacking)
Docker Compose (builds this checkout)
The compose file builds this checkout as eset-mcp:2.0.0-local. HTTP
profiles use Basic authentication. Published images described above are
release artifacts; this working tree does not publish or update them.
One-off stdio via compose:
Hacking on the source? Use the dev profile to build from your local checkout instead of pulling:
Configuration
All settings live in .env. Required fields are marked in
.env.example.
Use a dedicated API user - not your console login. Create one in ESET PROTECT Hub / ESET Business Account → API users.
Multi-tenant deployment (basic-auth mode)
Every HTTP request must carry:
Example Python client:
⚠️ Basic auth without TLS leaks credentials. Always run
basicmode behind HTTPS.
On-prem ESET PROTECT support
ESET ships PROTECT as both a cloud service (the ESET Connect API at
*.eset.systems) and an on-prem console customers self-host. The on-prem
REST API lives on a single host (default port 9443) and uses a different
authentication endpoint - POST /GetTokens with a JSON body and a
camelCase response - but otherwise shares the URL structure of the cloud
API. ESET-MCP supports both, in the same process.
How the server decides cloud vs on-prem
So a single MCP server can front the cloud for most clients and route
specific requests to one or more on-prem consoles - keyed entirely by which
URL each client sends in X-ESET-Server-URL.
Single-tenant on-prem (env mode)
Multi-tenant on-prem (basic auth, per-request URL)
Client targeting on-prem:
Same MCP server, different request - same headers minus X-ESET-Server-URL
- stays on cloud.
What works on on-prem vs cloud
The tool catalog is identical for both deployments (all 101 OpenAPI-derived tools plus the 4 composites). At call time the server uses cloud paths for cloud credentials and on-prem paths for on-prem credentials.
- Historical mappings retained:
device_*,asset_groups_*,policy_*andtask_*retain their existing paths and overrides. Endpoint availability depends on the PROTECT version and installed modules. - Cloud-only modules:
incident_*,mobile_*,wap_*,nap_*,quarantine_*and most ofvuln_*correspond to separate ESET products (ESET Inspect, Cloud Office Security, MDM) that are not part of the on-prem PROTECT installation. Calling them against an on-prem console may return an ESET error; failures are sanitized and returned withisError=true. The historical catalog is preserved for compatibility. - Path overrides: a few endpoints have a different URL on-prem - e.g.
POST /v1/devices/{uuid}:renameis:renameDeviceon-prem. These are declared ineset_mcp/openapi/onprem-path-overrides.jsonand applied automatically when the request targets on-prem.
Cloudflare Access in front of the on-prem console
When the on-prem PROTECT console is exposed via a Cloudflare tunnel and gated by Cloudflare Access, MCP can authenticate as a service token. The chain becomes MCP → Cloudflare Access → ESET on-prem.
Two values per token pair, supplied either via .env:
…or per-request in basic-auth mode (overrides the env defaults - handy when each tenant has its own tunnel and its own service token):
MCP translates the X-ESET-CF-* input headers into the actual
CF-Access-Client-Id / CF-Access-Client-Secret headers that Cloudflare
Access expects, and attaches them to every outbound call - both the
POST /GetTokens auth handshake and every subsequent ESET API request.
The CF secret is treated like the password: never logged, only its SHA-256 hash enters the client pool key. Rotating the secret mints a fresh client
- fresh ESET token. Cloud requests never carry CF Access headers regardless of env defaults - ESET Connect is a public SaaS.
Security notes for on-prem
X-ESET-Server-URLaccepts onlyhttps://URLs with no path, query or fragment. Trailing slashes are stripped. Anything else → HTTP 400.ESET_ONPREM_VERIFY_SSL=falsedisables TLS certificate verification and exposes the connection to MITM. The server logs a single WARNING per client construction when it's disabled. Use only on trusted intranets with self-signed certs you cannot replace.- On-prem tokens are held in memory per
(user, password_hash, server_url, cf_secret_hash)- same isolation rules as cloud tokens. The pool keys them separately so cloud and on-prem clients never collide, and two clients hitting the same on-prem URL with different CF service tokens get separate pool entries. - Sending only one of the two
X-ESET-CF-*headers returns HTTP 400 rather than silently falling back to the env default (almost certain operator typo).
Production deployment (HTTPS via Caddy)
The prod docker-compose profile launches Caddy in front of the MCP
server. Caddy fetches a Let's Encrypt cert on first start (HTTP-01
challenge - ports 80 / 443 must be reachable from the public internet)
and proxies HTTPS to the internal MCP container.
You get:
- HTTPS on 443 with auto-renewing Let's Encrypt cert.
- HTTP-01 challenge on 80.
- MCP container bound only to the docker bridge network - no published port.
- gzip / zstd compression; raw access logs disabled and error-log headers removed.
- Only
/mcpis public; metrics stay on the private container network.
Tools, resources & prompts
Composite high-level tools
Each composite degrades gracefully when a sub-call returns 403/404
(e.g. on tenants missing a module). The shape carries skipped /
truncated flags where applicable.
Resources
eset://config/mode-ROorRW.eset://config/region- current region (per-request in basic-auth mode).eset://config/deployment-cloudoronprem (<server-url>)for this request.eset://config/tools-catalog- JSON catalog of mode-allowed raw business tools (name, mode, method, path, service, description).eset://docs/rate-limits- quick reminder about the 10 req/s ceiling.
Prompts
audit_inactive_devices(days=30)- offboarding candidates.vulnerability_report- per-device CVE report.incident_triage- open incidents + related detections.
Architecture
Tests
The default suite covers API contracts, synthetic failures, MCP HTTP and stdio,
and loopback TLS. It blocks external connections and does not load .env.
To run integration tests with configured ESET credentials, explicitly set
ESET_RUN_LIVE_TESTS=1. See the test instructions for baseline
fixture maintenance and container probes.
Refreshing the OpenAPI specs
tests/test_catalog_vs_openapi.py flags any new or changed operations
after a refresh.
License
MIT
来源:README.md,提交 627ed39
工具
0版本历史
2- v2.0.0最新Nov 4, 2026
- v1.0.3Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分